From 7d4c3d535c6f33e1d6d158aaf2108a27b45d743d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 26 Jun 2009 19:15:14 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/pc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/pc.c') 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 */ -- cgit v1.1