On 2020/6/2 ??3:08, Jason Wang wrote:>> >>> +static const struct pci_device_id vp_vdpa_id_table[] = { >>> +??? { PCI_DEVICE(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID) }, >>> +??? { 0 } >>> +}; >> This looks like it'll create a mess with either virtio pci >> or vdpa being loaded at random. Maybe just don't specify >> any IDs for now. Down the road we could get a >> distinct vendor ID or a range of device IDs for this. > > > Right, will do. > > ThanksRethink about this. If we don't specify any ID, the binding won't work. How about using a dedicated subsystem vendor id for this? Thanks
On Fri, Jun 05, 2020 at 04:54:17PM +0800, Jason Wang wrote:> > On 2020/6/2 ??3:08, Jason Wang wrote: > > > > > > > +static const struct pci_device_id vp_vdpa_id_table[] = { > > > > +??? { PCI_DEVICE(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID) }, > > > > +??? { 0 } > > > > +}; > > > This looks like it'll create a mess with either virtio pci > > > or vdpa being loaded at random. Maybe just don't specify > > > any IDs for now. Down the road we could get a > > > distinct vendor ID or a range of device IDs for this. > > > > > > Right, will do. > > > > Thanks > > > Rethink about this. If we don't specify any ID, the binding won't work.We can bind manually. It's not really for production anyway, so not a big deal imho.> How about using a dedicated subsystem vendor id for this? > > ThanksIf virtio vendor id is used then standard driver is expected to bind, right? Maybe use a dedicated vendor id? -- MST
On 2020/6/7 ??9:51, Michael S. Tsirkin wrote:> On Fri, Jun 05, 2020 at 04:54:17PM +0800, Jason Wang wrote: >> On 2020/6/2 ??3:08, Jason Wang wrote: >>>>> +static const struct pci_device_id vp_vdpa_id_table[] = { >>>>> +??? { PCI_DEVICE(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID) }, >>>>> +??? { 0 } >>>>> +}; >>>> This looks like it'll create a mess with either virtio pci >>>> or vdpa being loaded at random. Maybe just don't specify >>>> any IDs for now. Down the road we could get a >>>> distinct vendor ID or a range of device IDs for this. >>> >>> Right, will do. >>> >>> Thanks >> >> Rethink about this. If we don't specify any ID, the binding won't work. > We can bind manually. It's not really for production anyway, so > not a big deal imho.I think you mean doing it via "new_id", right.> >> How about using a dedicated subsystem vendor id for this? >> >> Thanks > If virtio vendor id is used then standard driver is expected > to bind, right? Maybe use a dedicated vendor id?I meant something like: static const struct pci_device_id vp_vdpa_id_table[] = { ??? { PCI_DEVICE_SUB(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID, VP_TEST_VENDOR_ID, VP_TEST_DEVICE_ID) }, ??? { 0 } }; Thanks