public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SVM: do not intercept task switch with NPT
@ 2008-04-09 14:04 Joerg Roedel
  2008-04-11 12:36 ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2008-04-09 14:04 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel, Joerg Roedel

When KVM uses NPT there is no reason to intercept task switches. This patch
removes the intercept for it in that case.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kvm/svm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ad27346..51defe6 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -590,6 +590,7 @@ static void init_vmcb(struct vcpu_svm *svm)
 	if (npt_enabled) {
 		/* Setup VMCB for Nested Paging */
 		control->nested_ctl = 1;
+		control->intercept &= ~(1ULL << INTERCEPT_TASK_SWITCH);
 		control->intercept_exceptions &= ~(1 << PF_VECTOR);
 		control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK|
 						INTERCEPT_CR3_MASK);
-- 
1.5.3.7



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

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

end of thread, other threads:[~2008-04-11 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 14:04 [PATCH] SVM: do not intercept task switch with NPT Joerg Roedel
2008-04-11 12:36 ` Avi Kivity
2008-04-11 12:46   ` Joerg Roedel
2008-04-11 12:52     ` Avi Kivity

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