Included the mention of WHPX when the option -cpu host doesn't have an accelerator option.
Signed-off-by: Andrew Nguyen <[email protected]> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4836 --- This is a resolution for issue #4836: https://gitlab.com/qemu-project/qemu/-/work_items/4836. "-cpu host" by itself is not permitted; an accelerator must be specified as well. For Linux, it is KVM. macOS is HVF and Windows is WHPX. Previously, QEMU would only tell the user to use either KVM or HVF, essentially excluding Windows users. This patch adds WHPX to the error message. A similar patch was made seven months ago in target/arm/cpu.c:1861. Signed-off-by: Andrew Nguyen <[email protected]> --- Changes: - cpu.c:10229: added WHPX to the error message when "-cpu host" doesn't include an accelerator --- target/i386/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index eab0d5a4d4..7dd5535f80 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -10229,7 +10229,8 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) if (xcc->host_cpuid_required && !accel_uses_host_cpuid()) { g_autofree char *name = x86_cpu_class_get_model_name(xcc); - error_setg(&local_err, "CPU model '%s' requires KVM or HVF", name); + error_setg(&local_err, "The '%s' CPU type can only be used with KVM, + HVF or WHPX", name); goto out; } --- base-commit: e9fa1f66f0d47c74b6766e1b8b87ad7c2a9394d5 change-id: 20261115-4836-cpu-host-error-1e85b17e0f1d Best regards, -- Andrew Nguyen <[email protected]>
