]> err.no Git - linux-2.6/commitdiff
KVM: SVM: do not intercept task switch with NPT
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 9 Apr 2008 14:04:32 +0000 (16:04 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 09:01:23 +0000 (12:01 +0300)
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>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/svm.c

index da3ddef476055494dcd2d6b756c31b720dede373..8d04aed72f3a577cbc5a12d28d4edb759ed074fd 100644 (file)
@@ -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);