diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-14 10:33:21 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-14 10:33:21 -0700 |
commit | 59255ac55ba6ecd195ef97c6bcd1303a7f838c94 (patch) | |
tree | c21899d772e8b55b74c9943f48ae88d3bd8724c9 /arch/x86/kvm/svm.c | |
parent | 9106e24eb8e4dbe7f8de197317e68624ada540b0 (diff) | |
parent | 07818b5b1ba0f494a7255ab634bad2dd2b908ed0 (diff) |
Merge branch 'linux-linaro-lsk-v3.10' into linux-linaro-lsk-v3.10-rtlsk-v3.10-15.08-rt
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 03f7d03c92a2..ee36e1e94a98 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -495,8 +495,10 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); - if (svm->vmcb->control.next_rip != 0) + if (svm->vmcb->control.next_rip != 0) { + WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS)); svm->next_rip = svm->vmcb->control.next_rip; + } if (!svm->next_rip) { if (emulate_instruction(vcpu, EMULTYPE_SKIP) != @@ -4229,7 +4231,9 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu, break; } - vmcb->control.next_rip = info->next_rip; + /* TODO: Advertise NRIPS to guest hypervisor unconditionally */ + if (static_cpu_has(X86_FEATURE_NRIPS)) + vmcb->control.next_rip = info->next_rip; vmcb->control.exit_code = icpt_info.exit_code; vmexit = nested_svm_exit_handled(svm); |