[PATCH] PowerPC : Do not allow an empty model spec for 'host-model'

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

 



[PATCH] PowerPC : Do not allow an empty model spec for 'host-model'

On PowerPC, a guest VM having CPU mode as 'host-model'
represents a 'compat' mode VM. This cannot have a NULL
CPU model.
This commit forbids such a guest definition.

Signed-off-by: Prerna Saxena <prerna@xxxxxxxxxxxxxxxxxx>
---
 src/cpu/cpu_powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/cpu_powerpc.c b/src/cpu/cpu_powerpc.c
index c77374c..62ad92b 100644
--- a/src/cpu/cpu_powerpc.c
+++ b/src/cpu/cpu_powerpc.c
@@ -549,12 +549,12 @@ ppcUpdate(virCPUDefPtr guest,
           const virCPUDef *host)
 {
     switch ((virCPUMode) guest->mode) {
-    case VIR_CPU_MODE_HOST_MODEL:
     case VIR_CPU_MODE_HOST_PASSTHROUGH:
         guest->match = VIR_CPU_MATCH_EXACT;
         virCPUDefFreeModel(guest);
         return virCPUDefCopyModel(guest, host, true);
 
+    case VIR_CPU_MODE_HOST_MODEL:
     case VIR_CPU_MODE_CUSTOM:
         return 0;
 
-- 
1.8.3.1

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]