kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: SVM: Keep intercepting task switching with NPT enabled
@ 2011-10-18 16:23 Jan Kiszka
  2011-10-18 16:35 ` Roedel, Joerg
  2011-10-27 12:40 ` Marcelo Tosatti
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Kiszka @ 2011-10-18 16:23 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti, kvm; +Cc: Roedel, Joerg, Gleb Natapov

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>
---
 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 e7ed4b1..e32243e 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)
 	if (npt_enabled) {
 		/* Setup VMCB for Nested Paging */
 		control->nested_ctl = 1;
-		clr_intercept(svm, INTERCEPT_TASK_SWITCH);
 		clr_intercept(svm, INTERCEPT_INVLPG);
 		clr_exception_intercept(svm, PF_VECTOR);
 		clr_cr_intercept(svm, INTERCEPT_CR3_READ);
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-11-02 10:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 16:23 [PATCH] KVM: SVM: Keep intercepting task switching with NPT enabled Jan Kiszka
2011-10-18 16:35 ` Roedel, Joerg
2011-10-18 17:37   ` Avi Kivity
2011-10-19 14:12     ` Roedel, Joerg
2011-11-01 11:13     ` Roedel, Joerg
2011-11-01 13:39       ` Jan Kiszka
2011-11-01 15:30         ` Roedel, Joerg
2011-11-01 15:49           ` Jan Kiszka
2011-11-01 16:15             ` Roedel, Joerg
2011-11-01 18:22               ` Jan Kiszka
2011-11-02  9:55                 ` Roedel, Joerg
2011-11-02  9:59                   ` Jan Kiszka
2011-11-02 10:04                   ` Avi Kivity
2011-10-27 12:40 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).