aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-06-26 19:15:14 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 14:18:08 -0500
commit7d4c3d535c6f33e1d6d158aaf2108a27b45d743d (patch)
treef7d84eeecedb731b67f50ffe319c0d5efc67434d /hw/pc.c
parent74efd61a75f1a400aa480ad08231ba31ccdec895 (diff)
Replace -no-virtio-balloon by -balloon
We want to do (at least) two things to the virtio-balloon device: suppress it, and control its PCI address. Option -no-virtio-balloon lets us do only the former. To get the latter, replace -no-virtio-balloon with -balloon none disable balloon device -balloon virtio[,addr=str] enable virtio balloon device (default) Syntax suggested by Anthony Liguori. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 f02a2b5799..553ba5c84e 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 */