diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-04-04 06:39:27 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:57:01 -0400 |
commit | 8a76d7f25f8f24fc5a328c8e15e4a7313cf141b9 (patch) | |
tree | 7adadd7663b006d75563c457c6b7c5f91a4d16d2 /arch/x86/kvm/svm.c | |
parent | 8ea7d6aef84e278fcb121acff1bd4c3edaa95b8b (diff) |
KVM: x86: Add x86 callback for intercept check
This patch adds a callback into kvm_x86_ops so that svm and
vmx code can do intercept checks on emulated instructions.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index cb43e98eff63..798ebe695f1d 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -3868,6 +3868,13 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu) | |||
3868 | update_cr0_intercept(svm); | 3868 | update_cr0_intercept(svm); |
3869 | } | 3869 | } |
3870 | 3870 | ||
3871 | static int svm_check_intercept(struct kvm_vcpu *vcpu, | ||
3872 | struct x86_instruction_info *info, | ||
3873 | enum x86_intercept_stage stage) | ||
3874 | { | ||
3875 | return X86EMUL_CONTINUE; | ||
3876 | } | ||
3877 | |||
3871 | static struct kvm_x86_ops svm_x86_ops = { | 3878 | static struct kvm_x86_ops svm_x86_ops = { |
3872 | .cpu_has_kvm_support = has_svm, | 3879 | .cpu_has_kvm_support = has_svm, |
3873 | .disabled_by_bios = is_disabled, | 3880 | .disabled_by_bios = is_disabled, |
@@ -3953,6 +3960,8 @@ static struct kvm_x86_ops svm_x86_ops = { | |||
3953 | .adjust_tsc_offset = svm_adjust_tsc_offset, | 3960 | .adjust_tsc_offset = svm_adjust_tsc_offset, |
3954 | 3961 | ||
3955 | .set_tdp_cr3 = set_tdp_cr3, | 3962 | .set_tdp_cr3 = set_tdp_cr3, |
3963 | |||
3964 | .check_intercept = svm_check_intercept, | ||
3956 | }; | 3965 | }; |
3957 | 3966 | ||
3958 | static int __init svm_init(void) | 3967 | static int __init svm_init(void) |