• Gabriel L. Somlo's avatar
    kvm: x86: emulate monitor and mwait instructions as nop · 87c00572
    Gabriel L. Somlo authored
    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>
    87c00572
cpuid.c 20.2 KB