diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-06-22 22:22:05 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-06-29 13:02:47 +0200 |
commit | 2266d44311321a833d569cd4deb46cca6021d0e7 (patch) | |
tree | 954cac47b13360c4ebafbc3f7cb2c4c2c31f9672 /target/i386/cpu.h | |
parent | 6f131f13e68d648a8e4f083c667ab1acd88ce4cd (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 'target/i386/cpu.h')
-rw-r--r-- | target/i386/cpu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 16c59b7099..8eaefeee3e 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1382,6 +1382,15 @@ struct X86CPU { /* if true the CPUID code directly forward host cache leaves to the guest */ bool cache_info_passthrough; + /* if true the CPUID code directly forwards + * host monitor/mwait leaves to the guest */ + struct { + uint32_t eax; + uint32_t ebx; + uint32_t ecx; + uint32_t edx; + } mwait; + /* Features that were filtered out because of missing host capabilities */ uint32_t filtered_features[FEATURE_WORDS]; |