summaryrefslogtreecommitdiff
path: root/hw/virtio-balloon.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-26 15:22:57 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-26 15:22:57 +0000
commit99b3718ee12ae5f1b41ccd848fb2f80ddb94a04e (patch)
tree751fb9c9228b805f99b7c6e48331103b3922b736 /hw/virtio-balloon.c
parent14d50bef67881716bf750a1ddee9d2bb429e75f1 (diff)
downloadqemu-99b3718ee12ae5f1b41ccd848fb2f80ddb94a04e.tar.gz
qemu-99b3718ee12ae5f1b41ccd848fb2f80ddb94a04e.tar.bz2
qemu-99b3718ee12ae5f1b41ccd848fb2f80ddb94a04e.zip
Use the default subsystem vendor ID for virtio devices (Mark McLoughlin)
A subsystem vendor ID of zero isn't allowed, so we use our default ID. Gerd points out that although the PCI subsystem vendor ID is treated by the guest as the virtio vendor ID: /* we use the subsystem vendor/device id as the virtio vendor/device * id. this allows us to use the same PCI vendor/device id for all * virtio devices and to identify the particular virtio driver by * the subsytem ids */ vp_dev->vdev.id.vendor = pci_dev->subsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; it looks like only the device ID is used right now: # grep virtio modules.alias alias virtio:d00000001v* virtio_net alias virtio:d00000002v* virtio_blk alias virtio:d00000003v* virtio_console alias virtio:d00000004v* virtio-rng alias virtio:d00000005v* virtio_balloon alias pci:v00001AF4d*sv*sd*bc*sc*i* virtio_pci alias virtio:d00000009v* 9pnet_virtio so setting the subsystem vendor id to something != zero shouldn't cause trouble. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6440 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-balloon.c')
-rw-r--r--hw/virtio-balloon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
index 07655168db..696a108667 100644
--- a/hw/virtio-balloon.c
+++ b/hw/virtio-balloon.c
@@ -174,7 +174,8 @@ void *virtio_balloon_init(PCIBus *bus)
s = (VirtIOBalloon *)virtio_init_pci(bus, "virtio-balloon",
PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_BALLOON,
- 0, VIRTIO_ID_BALLOON,
+ PCI_VENDOR_ID_REDHAT_QUMRANET,
+ VIRTIO_ID_BALLOON,
0x05, 0x00, 0x00,
8, sizeof(VirtIOBalloon));
if (s == NULL)