On Mon, Jun 08, 2020 at 05:18:44PM +0800, Jason Wang wrote:
On 2020/6/8 äå2:32, Michael S. Tsirkin wrote:
On Mon, Jun 08, 2020 at 11:32:31AM +0800, Jason Wang wrote:
On 2020/6/7 äå9:51, Michael S. Tsirkin wrote:I really meant driver_override. This is what people have been using
On Fri, Jun 05, 2020 at 04:54:17PM +0800, Jason Wang wrote:I think you mean doing it via "new_id", right.
On 2020/6/2 äå3:08, Jason Wang wrote:We can bind manually. It's not really for production anyway, so
Rethink about this. If we don't specify any ID, the binding won't work.Right, will do.+static const struct pci_device_id vp_vdpa_id_table[] = {This looks like it'll create a mess with either virtio pci
+ÂÂÂ { PCI_DEVICE(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID) },
+ÂÂÂ { 0 }
+};
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.
Thanks
not a big deal imho.
with pci-stub for years now.
Do you want me to implement "driver_overrid" in this series, or a NULL
id_table is sufficient?
Doesn't the pci subsystem create driver_override for all devices
on the pci bus?
IFCVF use this to avoid the binding to regular virtio device.Then regular virtio will still bind to it. It hasI meant something like:How about using a dedicated subsystem vendor id for this?If virtio vendor id is used then standard driver is expected
Thanks
to bind, right? Maybe use a dedicated vendor id?
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
drivers/virtio/virtio_pci_common.c: { PCI_DEVICE(PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_ANY_ID) },
Ow. Indeed:
#define IFCVF_VENDOR_ID 0x1AF4
Which is of course not an IFCVF vendor id, it's the Red Hat vendor ID.
I missed that.
Does it actually work if you bind a virtio driver to it?
I'm guessing no otherwise they wouldn't need IFC driver, right?
Looking at
pci_match_one_device() it checks both subvendor and subdevice there.
Thanks
But IIUC there is no guarantee that driver with a specific subvendor
matches in presence of a generic one.
So either IFC or virtio pci can win, whichever binds first.
I guess we need to blacklist IFC in virtio pci probe code. Ugh.