dm: virtio-input: adapt Windows virtio-input driver
Update PCIR_SUBDEV_0 and PCIR_REVID in PCI configuration space to adapt windows virtio-input driver. Otherwise virtio-input driver on Windows will not be loaded correctly. Tracked-On: #2962 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
parent
8115857956
commit
2f4e320730
|
@ -673,8 +673,9 @@ virtio_input_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
|||
pci_set_cfgdata16(dev, PCIR_VENDOR, VIRTIO_VENDOR);
|
||||
pci_set_cfgdata8(dev, PCIR_CLASS, PCIC_INPUTDEV);
|
||||
pci_set_cfgdata8(dev, PCIR_SUBCLASS, PCIS_INPUTDEV_OTHER);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, 0x1040 + VIRTIO_TYPE_INPUT);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBDEV_0, 0x1100);
|
||||
pci_set_cfgdata16(dev, PCIR_SUBVEND_0, VIRTIO_VENDOR);
|
||||
pci_set_cfgdata16(dev, PCIR_REVID, 1);
|
||||
|
||||
if (virtio_interrupt_init(&vi->base, virtio_uses_msix())) {
|
||||
DPRINTF(("%s, interrupt_init failed!\n", __func__));
|
||||
|
|
Loading…
Reference in New Issue