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

After 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. So it's needless to say that these patches are not meant for merging!

Mohammed Gamal (3):
  Add helper methods to get segment limits
  x86 emulator: Add cs_base() helper
  x86 emulator: Add segment limit checks and helper functions

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


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

end of thread, other threads:[~2010-07-08  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07 21:23 [RFC PATCH 0/3] Add segment limit checks to emulator Mohammed Gamal
2010-07-07 21:23 ` [RFC PATCH 1/3] Add helper methods to get segment limits Mohammed Gamal
2010-07-07 21:23 ` [RFC PATCH 2/3] x86 emulator: Add cs_base() helper Mohammed Gamal
2010-07-07 21:23 ` [RFC PATCH 3/3] x86 emulator: Add segment limit checks and helper functions Mohammed Gamal
2010-07-08  8:01   ` Avi Kivity
2010-07-08  8:05 ` [RFC PATCH 0/3] Add segment limit checks to emulator Stefan Hajnoczi
2010-07-08  8:07 ` Avi Kivity

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).