[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 5/6] Set the default machine as pseries for PPC64



From: Li Zhang <zhlcindy linux vnet ibm com>

pseries machine type is preferred for ppc64.
This patch is to set pseries as the default machine type.

Signed-off-by: Li Zhang <zhlcindy linux vnet ibm com>
---
 src/conf/capabilities.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 7cdb5b7..ba03a84 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -624,6 +624,12 @@ virCapabilitiesDefaultGuestMachine(virCapsPtr caps,
             guest->arch.id != arch)
             continue;
 
+        for (j = 0; j < guest->arch.defaultInfo.nmachines; j ++) {
+            if (arch == VIR_ARCH_PPC64 &&
+                STREQ(guest->arch.defaultInfo.machines[j]->name, "pseries"))
+                return guest->arch.defaultInfo.machines[j]->name;
+        }
+
         for (j = 0; j < guest->arch.ndomains; j++) {
             virCapsGuestDomainPtr dom = guest->arch.domains[j];
 
-- 
1.7.10.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]