diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 6ff88d6a9f..dfedf5bbf0 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -884,7 +884,8 @@ virCPUTranslate(virArch arch, return -1; if (cpu->mode == VIR_CPU_MODE_HOST_MODEL || - cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH) + cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH || + cpu->mode == VIR_CPU_MODE_MAXIMUM) return 0; if (virCPUModelIsAllowed(cpu->model, models)) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index d71d147207..3e34b14f79 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -474,8 +474,14 @@ ppc64Compute(virCPUDefPtr host, G_GNUC_FALLTHROUGH; case VIR_CPU_MODE_HOST_PASSTHROUGH: - /* host-model and host-passthrough: - * the guest CPU is the same as the host */ + case VIR_CPU_MODE_MAXIMUM: + /* host-model, host-passthrough & maximum: + * the guest CPU is the same as the host. + * + * Note for maximum, with non hardware virt + * the guest CPU is actually arbitrarily defined by + * the emulator, so this isn't strictly correct. + */ guest_model = ppc64ModelCopy(host_model); break; diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 2422e258ec..fe423f38f9 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -3050,7 +3050,8 @@ virCPUx86UpdateLive(virCPUDefPtr cpu, virCPUDataPtr dataEnabled, virCPUDataPtr dataDisabled) { - bool hostPassthrough = cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH; + bool hostPassthrough = (cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH || + cpu->mode == VIR_CPU_MODE_MAXIMUM); virCPUx86MapPtr map; g_autoptr(virCPUx86Model) model = NULL; g_autoptr(virCPUx86Model) modelDisabled = NULL;