aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2018-06-22 22:22:05 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-29 13:02:47 +0200
commit2266d44311321a833d569cd4deb46cca6021d0e7 (patch)
tree954cac47b13360c4ebafbc3f7cb2c4c2c31f9672 /accel
parent6f131f13e68d648a8e4f083c667ab1acd88ce4cd (diff)
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 <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180622192148.178309-3-mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/user-exec-stub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c
index dbcf1ade9c..a32b4496af 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)
{