diff options
| -rw-r--r-- | arch/x86/include/asm/svm.h | 4 | ||||
| -rw-r--r-- | arch/x86/kvm/svm.c | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index b26a38d85356..1d91d05f9368 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h | |||
| @@ -81,7 +81,9 @@ struct __attribute__ ((__packed__)) vmcb_control_area { | |||
| 81 | u32 event_inj_err; | 81 | u32 event_inj_err; |
| 82 | u64 nested_cr3; | 82 | u64 nested_cr3; |
| 83 | u64 lbr_ctl; | 83 | u64 lbr_ctl; |
| 84 | u8 reserved_5[832]; | 84 | u64 reserved_5; |
| 85 | u64 next_rip; | ||
| 86 | u8 reserved_6[816]; | ||
| 85 | }; | 87 | }; |
| 86 | 88 | ||
| 87 | 89 | ||
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e9f79619e185..64b7f60dc5b8 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
| @@ -44,11 +44,11 @@ MODULE_LICENSE("GPL"); | |||
| 44 | #define SEG_TYPE_LDT 2 | 44 | #define SEG_TYPE_LDT 2 |
| 45 | #define SEG_TYPE_BUSY_TSS16 3 | 45 | #define SEG_TYPE_BUSY_TSS16 3 |
| 46 | 46 | ||
| 47 | #define SVM_FEATURE_NPT (1 << 0) | 47 | #define SVM_FEATURE_NPT (1 << 0) |
| 48 | #define SVM_FEATURE_LBRV (1 << 1) | 48 | #define SVM_FEATURE_LBRV (1 << 1) |
| 49 | #define SVM_FEATURE_SVML (1 << 2) | 49 | #define SVM_FEATURE_SVML (1 << 2) |
| 50 | #define SVM_FEATURE_NRIP (1 << 3) | 50 | #define SVM_FEATURE_NRIP (1 << 3) |
| 51 | #define SVM_FEATURE_PAUSE_FILTER (1 << 10) | 51 | #define SVM_FEATURE_PAUSE_FILTER (1 << 10) |
| 52 | 52 | ||
| 53 | #define NESTED_EXIT_HOST 0 /* Exit handled on host level */ | 53 | #define NESTED_EXIT_HOST 0 /* Exit handled on host level */ |
| 54 | #define NESTED_EXIT_DONE 1 /* Exit caused nested vmexit */ | 54 | #define NESTED_EXIT_DONE 1 /* Exit caused nested vmexit */ |
| @@ -320,6 +320,9 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) | |||
| 320 | { | 320 | { |
| 321 | struct vcpu_svm *svm = to_svm(vcpu); | 321 | struct vcpu_svm *svm = to_svm(vcpu); |
| 322 | 322 | ||
| 323 | if (svm->vmcb->control.next_rip != 0) | ||
| 324 | svm->next_rip = svm->vmcb->control.next_rip; | ||
| 325 | |||
| 323 | if (!svm->next_rip) { | 326 | if (!svm->next_rip) { |
| 324 | if (emulate_instruction(vcpu, 0, 0, EMULTYPE_SKIP) != | 327 | if (emulate_instruction(vcpu, 0, 0, EMULTYPE_SKIP) != |
| 325 | EMULATE_DONE) | 328 | EMULATE_DONE) |
