aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/pc.c b/hw/pc.c
index f02a2b5..553ba5c 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1408,8 +1408,9 @@ static void pc_init1(ram_addr_t ram_size,
}
/* Add virtio balloon device */
- if (pci_enabled && !no_virtio_balloon) {
- pci_create_simple(pci_bus, -1, "virtio-balloon-pci");
+ if (pci_enabled && virtio_balloon) {
+ pci_dev = pci_create("virtio-balloon-pci", virtio_balloon_devaddr);
+ qdev_init(&pci_dev->qdev);
}
/* Add virtio console devices */