From 2266d44311321a833d569cd4deb46cca6021d0e7 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Fri, 22 Jun 2018 22:22:05 +0300 Subject: i386/cpu: make -cpu host support monitor/mwait When guest CPU PM is enabled, and with -cpu host, expose the host CPU MWAIT leaf in the CPUID so guest can make good PM decisions. Note: the result is 100% CPU utilization reported by host as host no longer knows that the CPU is halted. Signed-off-by: Michael S. Tsirkin Reviewed-by: Eduardo Habkost Message-Id: <20180622192148.178309-3-mst@redhat.com> Signed-off-by: Paolo Bonzini --- accel/tcg/user-exec-stub.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'accel') diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c index dbcf1ad..a32b449 100644 --- a/accel/tcg/user-exec-stub.c +++ b/accel/tcg/user-exec-stub.c @@ -2,6 +2,9 @@ #include "qemu-common.h" #include "qom/cpu.h" #include "sysemu/replay.h" +#include "sysemu/sysemu.h" + +bool enable_cpu_pm = false; void cpu_resume(CPUState *cpu) { -- cgit v1.1