public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/3] Add segment limit checks to emulator
@ 2010-07-11 22:56 Mohammed Gamal
  2010-07-11 22:56 ` [RFC PATCH v3 1/3] Add helper methods to get segment limits Mohammed Gamal
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Mohammed Gamal @ 2010-07-11 22:56 UTC (permalink / raw)
  To: avi; +Cc: mtosatti, kvm, Mohammed Gamal

fter some conversation with Avi concerning why unreal mode has been seen to work
with KVM on Intel. It clears out the scenario is caused as follows:

- guest enters big real mode
- kvm squashes limit to 64k-1
- guest executes instructions with offset > 64k
- cpu issues #GP due to limit violation
- kvm handle_rmode_exception() -> emulator
- emulator ignores limit, emulates instruction

With these applied I am getting vmentry failures with SeaBIOS and
gPXE. I could still get SeaBIOS to work with emulate_invalid_guest_state=1.
So it's needless to say that these patches are not meant for merging!

--------

Changes from v2:
- Addeded generic segment limit check helpers
- Removed individual segment register segment helpers as they're no longer needed

--------

Mohammed Gamal (3):
  Add helper methods to get segment limits
  x86 emulator: Add segment limit checking helpers
  x86 emulator: Add segment limit checks to emulator

 arch/x86/include/asm/kvm_emulate.h |    1 +
 arch/x86/include/asm/kvm_host.h    |    1 +
 arch/x86/kvm/emulate.c             |  112 ++++++++++++++++++++++++++++-------
 arch/x86/kvm/svm.c                 |    8 +++
 arch/x86/kvm/vmx.c                 |    8 +++
 arch/x86/kvm/x86.c                 |   12 ++++
 6 files changed, 119 insertions(+), 23 deletions(-)


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

end of thread, other threads:[~2010-07-26 17:47 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-11 22:56 [RFC PATCH v3 0/3] Add segment limit checks to emulator Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 1/3] Add helper methods to get segment limits Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 2/3] x86 emulator: Add segment limit checking helpers Mohammed Gamal
2010-07-11 22:56 ` [RFC PATCH v3 3/3] x86 emulator: Add segment limit checks to emulator functions Mohammed Gamal
2010-07-12  6:26 ` [RFC PATCH v3 0/3] Add segment limit checks to emulator Avi Kivity
2010-07-12 12:36   ` Mohammed Gamal
2010-07-12 13:13     ` Avi Kivity
     [not found]       ` <AANLkTimHvpE05chocuoQnY0ydOMchMcIInu9QX5F_pV4@mail.gmail.com>
2010-07-12 13:51         ` Avi Kivity
2010-07-12 14:41           ` Gleb Natapov
2010-07-12 14:49             ` Avi Kivity
2010-07-24 15:45       ` Kevin O'Connor
2010-07-24 16:16         ` Kevin O'Connor
2010-07-25  8:55           ` Avi Kivity
2010-07-25 16:42             ` Kevin O'Connor
2010-07-25 17:19               ` Kevin O'Connor
2010-07-25 18:34                 ` Avi Kivity
2010-07-25 18:55                   ` Kevin O'Connor
2010-07-25  8:54         ` Avi Kivity
2010-07-25 16:23           ` Kevin O'Connor
2010-07-26 11:47             ` Avi Kivity
2010-07-26 17:47               ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox