@@ -8,6 +8,7 @@
#include "block_int.h"
#include "device-assignment.h"
#include "config.h"
+#include "virtio-blk.h"
#define PCI_BASE_CLASS_STORAGE 0x01
#define PCI_BASE_CLASS_NETWORK 0x02
@@ -162,8 +163,7 @@ static PCIDevice *qemu_system_hot_add_storage(const char *opts, int bus_nr)
drives_table[drive_idx].unit);
break;
case IF_VIRTIO:
- opaque = virtio_blk_init (pci_bus, 0x1AF4, 0x1001,
- drives_table[drive_idx].bdrv);
+ opaque = virtio_blk_init(pci_bus, drives_table[drive_idx].bdrv);
break;
default:
term_printf ("type %s not a hotpluggable PCI device.\n", buf);
@@ -39,6 +39,7 @@
#include "ia64intrin.h"
#include <unistd.h>
#include "device-assignment.h"
+#include "virtio-blk.h"
#include "qemu-kvm.h"
@@ -625,7 +626,7 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
int unit_id = 0;
while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
- virtio_blk_init(pci_bus, 0x1AF4, 0x1001, drives_table[index].bdrv);
+ virtio_blk_init(pci_bus, drives_table[index].bdrv);
unit_id++;
}
}
This QEMU commit: pci: virtio: use pci id defines (Gerd Hoffman) removed the vendor/device id parameters from virtio_blk_init(). Fixes: qemu/hw/device-hotplug.c: In function ‘qemu_system_hot_add_storage’: qemu/hw/device-hotplug.c:165: warning: implicit declaration of function ‘virtio_blk_init’ qemu/hw/device-hotplug.c:166: warning: assignment makes pointer from integer without a cast (Note: the ia64 fix is untested) Signed-off-by: Mark McLoughlin <markmc@redhat.com> --- qemu/hw/device-hotplug.c | 4 ++-- qemu/hw/ipf.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)