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))
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;
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;