1
0
Fork 0

KVM: SVM: Fix nested sel_cr0 intercept path with decode-assists

This patch fixes a bug in the nested-svm path when
decode-assists is available on the machine. After a
selective-cr0 intercept is detected the rip is advanced
unconditionally. This causes the l1-guest to continue
running with an l2-rip.
This bug was with the sel_cr0 unit-test on decode-assists
capable hardware.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hifive-unleashed-5.1
Joerg Roedel 2011-04-18 11:42:52 +02:00 committed by Avi Kivity
parent 0521e4c0bc
commit 977b2d03e4
1 changed files with 3 additions and 0 deletions

View File

@ -2799,6 +2799,9 @@ static int cr_interception(struct vcpu_svm *svm)
case 0:
if (!check_selective_cr0_intercepted(svm, val))
err = kvm_set_cr0(&svm->vcpu, val);
else
return 1;
break;
case 3:
err = kvm_set_cr3(&svm->vcpu, val);