[PATCH 07/33] qemu_domain.c: disable default devices for PowerNV machines

Daniel Henrique Barboza posted 33 patches 4 years ago
There is a newer version of this series
[PATCH 07/33] qemu_domain.c: disable default devices for PowerNV machines
Posted by Daniel Henrique Barboza 4 years ago
PowerNV domains will support pcie-root devices as PHBs, in a similar
fashion as pSeries domains supports the spapr-pci-host-bridge as a
pci-root model.

Set 'addPCIRoot' to false since we'll not be using this buses in this
machine. 'addDefaultMemballoon' is also set to false since the balloon
driver wasn't really tested with the PowerNV kernel.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 src/qemu/qemu_domain.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 88487c6293..d0bb4938ec 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3678,6 +3678,15 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
          * add the definition if not already present */
         if (qemuDomainIsPSeries(def))
             addPanicDevice = true;
+
+        if (qemuDomainIsPowerNV(def)) {
+            addPCIRoot = false;
+            addDefaultUSB = false;
+            addDefaultUSBKBD = false;
+            addDefaultUSBMouse = false;
+            addDefaultMemballoon = false;
+        }
+
         break;
 
     case VIR_ARCH_ALPHA:
-- 
2.34.1