diff options
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 143d271d4431..442ca818c5a9 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1048,6 +1048,15 @@ static int emulate_on_interception(struct vcpu_svm *svm, | |||
1048 | return 1; | 1048 | return 1; |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | static int cr8_write_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | ||
1052 | { | ||
1053 | emulate_instruction(&svm->vcpu, NULL, 0, 0, 0); | ||
1054 | if (irqchip_in_kernel(svm->vcpu.kvm)) | ||
1055 | return 1; | ||
1056 | kvm_run->exit_reason = KVM_EXIT_SET_TPR; | ||
1057 | return 0; | ||
1058 | } | ||
1059 | |||
1051 | static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) | 1060 | static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) |
1052 | { | 1061 | { |
1053 | struct vcpu_svm *svm = to_svm(vcpu); | 1062 | struct vcpu_svm *svm = to_svm(vcpu); |
@@ -1202,7 +1211,7 @@ static int (*svm_exit_handlers[])(struct vcpu_svm *svm, | |||
1202 | [SVM_EXIT_WRITE_CR0] = emulate_on_interception, | 1211 | [SVM_EXIT_WRITE_CR0] = emulate_on_interception, |
1203 | [SVM_EXIT_WRITE_CR3] = emulate_on_interception, | 1212 | [SVM_EXIT_WRITE_CR3] = emulate_on_interception, |
1204 | [SVM_EXIT_WRITE_CR4] = emulate_on_interception, | 1213 | [SVM_EXIT_WRITE_CR4] = emulate_on_interception, |
1205 | [SVM_EXIT_WRITE_CR8] = emulate_on_interception, | 1214 | [SVM_EXIT_WRITE_CR8] = cr8_write_interception, |
1206 | [SVM_EXIT_READ_DR0] = emulate_on_interception, | 1215 | [SVM_EXIT_READ_DR0] = emulate_on_interception, |
1207 | [SVM_EXIT_READ_DR1] = emulate_on_interception, | 1216 | [SVM_EXIT_READ_DR1] = emulate_on_interception, |
1208 | [SVM_EXIT_READ_DR2] = emulate_on_interception, | 1217 | [SVM_EXIT_READ_DR2] = emulate_on_interception, |