Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3564990a authored by Joerg Roedel's avatar Joerg Roedel Committed by Avi Kivity
Browse files

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent d4c9ff2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -591,6 +591,7 @@ static void init_vmcb(struct vcpu_svm *svm)
	if (npt_enabled) {
	if (npt_enabled) {
		/* Setup VMCB for Nested Paging */
		/* Setup VMCB for Nested Paging */
		control->nested_ctl = 1;
		control->nested_ctl = 1;
		control->intercept &= ~(1ULL << INTERCEPT_TASK_SWITCH);
		control->intercept_exceptions &= ~(1 << PF_VECTOR);
		control->intercept_exceptions &= ~(1 << PF_VECTOR);
		control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK|
		control->intercept_cr_read &= ~(INTERCEPT_CR0_MASK|
						INTERCEPT_CR3_MASK);
						INTERCEPT_CR3_MASK);