Commit 2a140f3b authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini

KVM: x86: prevent MWAIT in guest with buggy MONITOR

The bug prevents MWAIT from waking up after a write to the monitored
cache line.
KVM might emulate a CPU model that shouldn't have the bug, so the guest
would not employ a workaround and possibly miss wakeups.
Better to avoid the situation.
Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
Acked-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 0d37d26f
......@@ -281,6 +281,9 @@ static inline bool kvm_mwait_in_guest(void)
return false;
}
if (boot_cpu_has_bug(X86_BUG_MONITOR))
return false;
/*
* Intel CPUs without CPUID5_ECX_INTERRUPT_BREAK are problematic as
* they would allow guest to stop the CPU completely by disabling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment