public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] KVM: Make the instruction emulator aware of Nested Virtualization
@ 2010-11-24 18:18 Joerg Roedel
  2010-11-24 18:18 ` [PATCH 1/9] KVM: Add infrastructure to emulate instruction intercepts Joerg Roedel
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Joerg Roedel @ 2010-11-24 18:18 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, linux-kernel

Hi Avi, Hi Marcelo,

here is a patch-set to make the instruction emulator aware of nested
virtualization. It basically works by introducing a new callback into
the x86_ops to check if a decoded instruction must be intercepted. If it
is intercepted the instruction emulator returns straight into the guest.

I am not entirely happy with this solution because it partially
duplicates the code in the x86_emulate_insn function. But there are so
many SVM specific cases that need to be taken care of that I consider
this solution the better one (even when looking at the diff-stat).
Keeping this (SVM-specific) complexity in the SVM specific code is
better than extending the generic instruction emulator code path.

The last patch removes the ugly hacks which were required without this
patch-set to correctly handle the selective-cr0-write intercept.

I appreciate your feedback.

Thanks,

	Joerg

Diffstat:

 arch/x86/include/asm/kvm_emulate.h |    2 +
 arch/x86/include/asm/kvm_host.h    |    3 +
 arch/x86/kvm/svm.c                 |  330 ++++++++++++++++++++++++++++++------
 arch/x86/kvm/vmx.c                 |    8 +
 arch/x86/kvm/x86.c                 |    5 +
 5 files changed, 297 insertions(+), 51 deletions(-)

Shortlog:

Joerg Roedel (9):
      KVM: Add infrastructure to emulate instruction intercepts
      KVM: SVM: Add checks for CRx read and write intercepts
      KVM: SVM: Add checks for DRx read and write intercepts
      KVM: SVM: Add intercept checks for descriptor table accesses
      KVM: SVM: Add checks for all group 7 instructions
      KVM: SVM: Add intercept checks for remaining twobyte instructions
      KVM: SVM: Add intercept checks for one-byte instructions
      KVM: SVM: Add checks for IO instructions
      KVM: SVM: Remove nested sel_cr0_write handling code



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

end of thread, other threads:[~2010-11-30  8:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 18:18 [PATCH 0/9] KVM: Make the instruction emulator aware of Nested Virtualization Joerg Roedel
2010-11-24 18:18 ` [PATCH 1/9] KVM: Add infrastructure to emulate instruction intercepts Joerg Roedel
2010-11-24 18:18 ` [PATCH 2/9] KVM: SVM: Add checks for CRx read and write intercepts Joerg Roedel
2010-11-24 18:18 ` [PATCH 3/9] KVM: SVM: Add checks for DRx " Joerg Roedel
2010-11-24 18:18 ` [PATCH 4/9] KVM: SVM: Add intercept checks for descriptor table accesses Joerg Roedel
2010-11-24 18:18 ` [PATCH 5/9] KVM: SVM: Add checks for all group 7 instructions Joerg Roedel
2010-11-24 18:18 ` [PATCH 6/9] KVM: SVM: Add intercept checks for remaining twobyte instructions Joerg Roedel
2010-11-24 18:18 ` [PATCH 7/9] KVM: SVM: Add intercept checks for one-byte instructions Joerg Roedel
2010-11-24 18:18 ` [PATCH 8/9] KVM: SVM: Add checks for IO instructions Joerg Roedel
2010-11-24 18:18 ` [PATCH 9/9] KVM: SVM: Remove nested sel_cr0_write handling code Joerg Roedel
2010-11-24 19:13 ` [PATCH 0/9] KVM: Make the instruction emulator aware of Nested Virtualization Avi Kivity
2010-11-25 11:46   ` Roedel, Joerg
2010-11-25 13:13     ` Roedel, Joerg
2010-11-25 15:17       ` Avi Kivity
2010-11-25 16:23         ` Roedel, Joerg
2010-11-29 17:23           ` Valdis.Kletnieks
2010-11-29 18:32             ` Joerg Roedel
2010-11-29 20:01               ` Valdis.Kletnieks
2010-11-30  8:47                 ` Roedel, Joerg
2010-11-25 15:15     ` Avi Kivity
2010-11-25 18:21       ` Roedel, Joerg
2010-11-26  8:28         ` Avi Kivity

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