kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Correct monitor-mwait emulation as nop
@ 2014-06-18 14:19 Nadav Amit
  2014-06-18 14:19 ` [PATCH 1/3] KVM: x86: Emulator flag for instruction with no big real mode Nadav Amit
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Nadav Amit @ 2014-06-18 14:19 UTC (permalink / raw)
  To: pbonzini; +Cc: gleb, tglx, mingo, hpa, x86, linux-kernel, kvm, joro, Nadav Amit

KVM handles monitor-mwait as nop, but does not check any of the preconditions
for the instructions.  These instructions may generate all kind of exceptions
(#UD, #PF, #GP, #SS). They can also be executed in real-mode.  This patch-set
moves the handling of monitor-mwait to the emulator, to allow their execution
in either real-mode or protected-mode.  It tries to follow the SDM in checking
the preconditions and generating the necassary exceptions.

Thanks for reviewing the patch. Please try it with OS X to make sure it works
properly without generating unnecassary exception.

Nadav Amit (3):
  KVM: x86: Emulator flag for instruction with no big real mode
  KVM: x86: Emulator support for #UD on CPL>0
  KVM: x86: correct mwait and monitor emulation

 arch/x86/kvm/emulate.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++----
 arch/x86/kvm/svm.c     | 22 ++------------------
 arch/x86/kvm/vmx.c     | 27 ++++++++++---------------
 3 files changed, 64 insertions(+), 40 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-06-19 12:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 14:19 [PATCH 0/3] Correct monitor-mwait emulation as nop Nadav Amit
2014-06-18 14:19 ` [PATCH 1/3] KVM: x86: Emulator flag for instruction with no big real mode Nadav Amit
2014-06-18 14:19 ` [PATCH 2/3] KVM: x86: Emulator support for #UD on CPL>0 Nadav Amit
2014-06-18 16:29   ` Paolo Bonzini
2014-06-18 14:19 ` [PATCH 3/3] KVM: x86: correct mwait and monitor emulation Nadav Amit
2014-06-18 16:32   ` Paolo Bonzini
2014-06-18 16:43   ` Bandan Das
2014-06-18 16:44     ` Paolo Bonzini
2014-06-18 17:33       ` Bandan Das
2014-06-18 17:59   ` Eric Northup
2014-06-18 18:23     ` Nadav Amit
2014-06-18 18:30       ` Eric Northup
2014-06-18 18:59         ` Gabriel L. Somlo
2014-06-18 18:46     ` Gabriel L. Somlo
2014-06-18 19:09       ` Bandan Das
2014-06-19 10:18       ` Michael S. Tsirkin
     [not found]         ` <1B06E887-9D07-4E85-AE06-75B01787C488@gmail.com>
2014-06-19 11:23           ` Gleb Natapov
2014-06-19 11:52             ` Nadav Amit
2014-06-19 12:01               ` Michael S. Tsirkin
2014-06-19 12:07               ` Gleb Natapov
2014-06-19 12:10                 ` Nadav Amit
2014-06-19 12:16                   ` Gleb Natapov
2014-06-19 12:17                   ` Michael S. Tsirkin
2014-06-19 12:28                     ` Nadav Amit
2014-06-19 11:34     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).