diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-10-18 12:23:11 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-30 06:24:10 -0400 |
commit | f1c1da2bde712812a3e0f9a7a7ebe7a916a4b5f4 (patch) | |
tree | db3715f38fd012cece847d0f0918cbc12eb2123f /arch/x86/kvm | |
parent | 7697e71f72b45a1bd0abe70918c383100fcc8514 (diff) |
KVM: SVM: Keep intercepting task switching with NPT enabled
AMD processors apparently have a bug in the hardware task switching
support when NPT is enabled. If the task switch triggers a NPF, we can
get wrong EXITINTINFO along with that fault. On resume, spurious
exceptions may then be injected into the guest.
We were able to reproduce this bug when our guest triggered #SS and the
handler were supposed to run over a separate task with not yet touched
stack pages.
Work around the issue by continuing to emulate task switches even in
NPT mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e7ed4b1623b9..e32243eac2f4 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1084,7 +1084,6 @@ static void init_vmcb(struct vcpu_svm *svm) | |||
1084 | if (npt_enabled) { | 1084 | if (npt_enabled) { |
1085 | /* Setup VMCB for Nested Paging */ | 1085 | /* Setup VMCB for Nested Paging */ |
1086 | control->nested_ctl = 1; | 1086 | control->nested_ctl = 1; |
1087 | clr_intercept(svm, INTERCEPT_TASK_SWITCH); | ||
1088 | clr_intercept(svm, INTERCEPT_INVLPG); | 1087 | clr_intercept(svm, INTERCEPT_INVLPG); |
1089 | clr_exception_intercept(svm, PF_VECTOR); | 1088 | clr_exception_intercept(svm, PF_VECTOR); |
1090 | clr_cr_intercept(svm, INTERCEPT_CR3_READ); | 1089 | clr_cr_intercept(svm, INTERCEPT_CR3_READ); |