KVM: nSVM: Do not report CLTS via SVM_EXIT_WRITE_CR0 to L1
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.
Signed-off-by Jan Kiszka <[email protected]>
--- arch/x86/kvm/svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/svm.c +2 -1
@@ -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
Quoted 7 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
CLTS only changes TS which is not monitored by selected CR0 interception. So skip any attempt to translate
WRITE_CR0toCR0_SEL_WRITEfor this instruction.Signed-off-by Jan Kiszka <[email protected]>
Reviewed-by Joerg Roedel <[email protected]>
Acked-by Joerg Roedel <[email protected]>