Skip to content
Commit 87c00572 authored by Gabriel L. Somlo's avatar Gabriel L. Somlo Committed by Paolo Bonzini
Browse files

kvm: x86: emulate monitor and mwait instructions as nop



Treat monitor and mwait instructions as nop, which is architecturally
correct (but inefficient) behavior. We do this to prevent misbehaving
guests (e.g. OS X <= 10.7) from crashing after they fail to check for
monitor/mwait availability via cpuid.

Since mwait-based idle loops relying on these nop-emulated instructions
would keep the host CPU pegged at 100%, do NOT advertise their presence
via cpuid, to prevent compliant guests from using them inadvertently.

Signed-off-by: default avatarGabriel L. Somlo <somlo@cmu.edu>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent b63cf42f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment