aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-04-09 10:04:32 -0400
committerAvi Kivity <avi@qumranet.com>2008-04-27 05:01:23 -0400
commit3564990af1b9f77a63692c1079e9c41af229f066 (patch)
tree5420c89cbab3f70db4efbb0c4042cfb42a707115
parentd4c9ff2d1b78e385471b3f4d80c0596909926ef7 (diff)
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 <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/svm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index da3ddef47605..8d04aed72f3a 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)
591 if (npt_enabled) { 591 if (npt_enabled) {
592 /* Setup VMCB for Nested Paging */ 592 /* Setup VMCB for Nested Paging */
593 control->nested_ctl = 1; 593 control->nested_ctl = 1;
594 control->intercept &= ~(1ULL << INTERCEPT_TASK_SWITCH);
594 control->intercept_exceptions &= ~(1 << PF_VECTOR); 595 control->intercept_exceptions &= ~(1 << PF_VECTOR);
595 control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK| 596 control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK|
596 INTERCEPT_CR3_MASK); 597 INTERCEPT_CR3_MASK);