From: Joerg Roedel Date: Wed, 9 Apr 2008 14:04:32 +0000 (+0200) Subject: KVM: SVM: do not intercept task switch with NPT X-Git-Tag: v2.6.26-rc1~1028^2~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3564990af1b9f77a63692c1079e9c41af229f066;p=linux-2.6-omap-h63xx.git KVM: SVM: do not intercept task switch with NPT 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 Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index da3ddef4760..8d04aed72f3 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -591,6 +591,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);