Skip to contentSkip to conversation

KVM: nSVM: Do not report CLTS via SVM_EXIT_WRITE_CR0 to L1

PATCH In review Jan Kiszka 2 participants 2 messages Jun 29, 2014 – Jul 1, 2014

Subsystems (3)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 KVM: nSVM: Do not report CLTS via SVM_EXIT_WRITE_CR0 to L1

From: Jan Kiszka <[email protected]>

CLTS only changes TS which is not monitored by selected CR0 interception. So skip any attempt to translate WRITE_CR0 to CR0_SEL_WRITE for this instruction.

---
 arch/x86/kvm/svm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/svm.c +2 -1
index b5e994a..c79766e1 100644
@@ -4205,7 +4205,8 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
 		if (info->intercept == x86_intercept_cr_write)
 			icpt_info.exit_code += info->modrm_reg;
 
-		if (icpt_info.exit_code != SVM_EXIT_WRITE_CR0)
+		if (icpt_info.exit_code != SVM_EXIT_WRITE_CR0 ||
+		    info->intercept == x86_intercept_clts)
 			break;
 
 		intercept = svm->nested.intercept;
Signature · 1 line
1.8.4.5