[libvirt] [PATCH 1/2] Assign PCI address to primary video card in pseries guests

Vitor de Lima vitordelima at gmail.com
Wed Nov 6 16:13:54 UTC 2013


From: Vitor de Lima <vitor.lima at eldorado.org.br>

This patch assings a PCI address to the primary video card if it
does not have any kind of address. This fixes issues with pseries
guests.
---
 src/qemu/qemu_command.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e48c9c2..159d920 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2959,6 +2959,15 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
             goto error;
     }
 
+    /* Assign a PCI slot to the primary video card if there is not an
+     * assigned address. */
+    if (def->nvideos >=1 &&
+        def->videos[0]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
+        if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->videos[0]->info,
+                                                flags) < 0)
+            goto error;
+    }
+
     /* Further non-primary video cards which have to be qxl type */
     for (i = 1; i < def->nvideos; i++) {
         if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
-- 
1.8.1.4




More information about the libvir-list mailing list