diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-07-27 12:14:21 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:50:04 -0400 |
commit | 7a190667bb316653cbb782fff95cfdfcf51ded45 (patch) | |
tree | 0a6199027ddb06e7e59f66c3dcfadaa54d619592 /arch/x86/kvm/svm.c | |
parent | 3f6a9d1693deaeef28d98109bc92c98dd94a8523 (diff) |
KVM: SVM: Emulate next_rip svm feature
This patch implements the emulations of the svm next_rip
feature in the nested svm implementation in kvm.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 09704a0501d7..116e0341bf4c 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1918,6 +1918,7 @@ static int nested_svm_vmexit(struct vcpu_svm *svm) | |||
1918 | nested_vmcb->control.exit_info_2 = vmcb->control.exit_info_2; | 1918 | nested_vmcb->control.exit_info_2 = vmcb->control.exit_info_2; |
1919 | nested_vmcb->control.exit_int_info = vmcb->control.exit_int_info; | 1919 | nested_vmcb->control.exit_int_info = vmcb->control.exit_int_info; |
1920 | nested_vmcb->control.exit_int_info_err = vmcb->control.exit_int_info_err; | 1920 | nested_vmcb->control.exit_int_info_err = vmcb->control.exit_int_info_err; |
1921 | nested_vmcb->control.next_rip = vmcb->control.next_rip; | ||
1921 | 1922 | ||
1922 | /* | 1923 | /* |
1923 | * If we emulate a VMRUN/#VMEXIT in the same host #vmexit cycle we have | 1924 | * If we emulate a VMRUN/#VMEXIT in the same host #vmexit cycle we have |
@@ -3360,7 +3361,12 @@ static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) | |||
3360 | entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper | 3361 | entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper |
3361 | ASID emulation to nested SVM */ | 3362 | ASID emulation to nested SVM */ |
3362 | entry->ecx = 0; /* Reserved */ | 3363 | entry->ecx = 0; /* Reserved */ |
3363 | entry->edx = 0; /* Do not support any additional features */ | 3364 | entry->edx = 0; /* Per default do not support any |
3365 | additional features */ | ||
3366 | |||
3367 | /* Support next_rip if host supports it */ | ||
3368 | if (svm_has(SVM_FEATURE_NRIP)) | ||
3369 | entry->edx |= SVM_FEATURE_NRIP; | ||
3364 | 3370 | ||
3365 | break; | 3371 | break; |
3366 | } | 3372 | } |