On Mon, Mar 16, 2015 at 04:56:49PM +0530, Prerna Saxena wrote:
[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.
I thought the compat= mode was only used when mode == HOST_MODEL
and a model is specified. And HOST_MODEL with no model behaves like on
x86_64 - copies the features from the host capabilities.
Was this functionality broken by commit addce06 or did it never produce
useful results?
Jan
This commit forbids such a guest definition.
Signed-off-by: Prerna Saxena <prerna(a)linux.vnet.ibm.com>
---
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(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list