LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Bandan Das <bsd@redhat.com>
Cc: kvm@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] vfio-pci: Allow PCI IDs to be specified as module options
Date: Wed, 04 Mar 2015 15:18:42 -0700	[thread overview]
Message-ID: <1425507522.5200.311.camel@redhat.com> (raw)
In-Reply-To: <jpgy4ncv681.fsf@redhat.com>

On Wed, 2015-03-04 at 15:49 -0500, Bandan Das wrote:
> Hi Alex,
> 
> Alex Williamson <alex.williamson@redhat.com> writes:
> ...
> > +		if (fields < 2) {
> > +			pr_warn("vfio-pci: invalid id string \"%s\"\n", id);
> > +			continue;
> > +		}
> > +
> > +		pr_info("vfio-pci: add %04X:%04X sub=%04X:%04X cls=%08X/%08X\n",
> > +			vendor, device, subvendor, subdevice,
> > +			class, class_mask);
> > +
> > +		rc = pci_add_dynid(&vfio_pci_driver, vendor, device,
> > +				   subvendor, subdevice, class, class_mask, 0);
> > +		if (rc)
> > +			pr_warn("vfio-pci: failed to add dynamic id (%d)\n",
> > +				rc);
> Just a minor observation - maybe we should print out the
> vendor/device/subvendor/subdevice as part of the failure message too. The info
> message could potentially get lost in a system with high syslog traffic.

Thanks for the comment.  I don't think we want to duplicate the pr_info
above it, so are you thinking something like this?

                if (fields < 2) {
                        pr_warn("vfio-pci: invalid id string \"%s\"\n", id);
                        continue;
                }

                rc = pci_add_dynid(&vfio_pci_driver, vendor, device,
                                   subvendor, subdevice, class, class_mask, 0);
                if (rc)
                        pr_warn("vfio-pci: failed to add dynamic id: %04X:%04X sub=%04X:%04X cls=%08X/%08X (%d)\n",
                                vendor, device, subvendor, subdevice,
                                class, class_mask, rc);
                else
                        pr_info("vfio-pci: add %04X:%04X sub=%04X:%04X cls=%08X/%08X\n",
                                vendor, device, subvendor, subdevice,
                                class, class_mask);
        }


> > +	}
> > +}
> > +
> >  static int __init vfio_pci_init(void)
> >  {
> >  	int ret;
> > @@ -1053,6 +1097,8 @@ static int __init vfio_pci_init(void)
> >  	if (ret)
> >  		goto out_driver;
> >  
> > +	vfio_pci_fill_ids();
> > +
> >  	return 0;
> >  
> >  out_driver:
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html




  reply	other threads:[~2015-03-04 22:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 20:02 [PATCH 0/5] vfio-pci: Misc enhancements Alex Williamson
2015-03-04 20:02 ` [PATCH 1/5] vfio-pci: Allow PCI IDs to be specified as module options Alex Williamson
2015-03-04 20:49   ` Bandan Das
2015-03-04 22:18     ` Alex Williamson [this message]
2015-03-04 22:32       ` Bandan Das
2015-03-04 23:01         ` Alex Williamson
2015-03-06 22:11   ` Bjorn Helgaas
2015-03-11 20:14     ` Alex Williamson
2015-03-11 20:20       ` Bjorn Helgaas
2015-03-04 20:02 ` [PATCH 2/5] vfio-pci: Add module option to disable VGA region access Alex Williamson
2015-03-04 20:02 ` [PATCH 3/5] vfio-pci: Remove warning if try-reset fails Alex Williamson
2015-03-04 20:03 ` [PATCH 4/5] vfio-pci: Move idle devices to D3hot power state Alex Williamson
2015-03-04 20:03 ` [PATCH 5/5] vfio-pci: Add VGA arbiter client Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425507522.5200.311.camel@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=bsd@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --subject='Re: [PATCH 1/5] vfio-pci: Allow PCI IDs to be specified as module options' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).