aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-04-04 06:39:27 -0400
committerAvi Kivity <avi@redhat.com>2011-05-11 07:57:01 -0400
commit8a76d7f25f8f24fc5a328c8e15e4a7313cf141b9 (patch)
tree7adadd7663b006d75563c457c6b7c5f91a4d16d2 /arch/x86/kvm/vmx.c
parent8ea7d6aef84e278fcb121acff1bd4c3edaa95b8b (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/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 2b99ae72481f..3dfefe3bcd05 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4409,6 +4409,13 @@ static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
4409{ 4409{
4410} 4410}
4411 4411
4412static int vmx_check_intercept(struct kvm_vcpu *vcpu,
4413 struct x86_instruction_info *info,
4414 enum x86_intercept_stage stage)
4415{
4416 return X86EMUL_CONTINUE;
4417}
4418
4412static struct kvm_x86_ops vmx_x86_ops = { 4419static struct kvm_x86_ops vmx_x86_ops = {
4413 .cpu_has_kvm_support = cpu_has_kvm_support, 4420 .cpu_has_kvm_support = cpu_has_kvm_support,
4414 .disabled_by_bios = vmx_disabled_by_bios, 4421 .disabled_by_bios = vmx_disabled_by_bios,
@@ -4494,6 +4501,8 @@ static struct kvm_x86_ops vmx_x86_ops = {
4494 .adjust_tsc_offset = vmx_adjust_tsc_offset, 4501 .adjust_tsc_offset = vmx_adjust_tsc_offset,
4495 4502
4496 .set_tdp_cr3 = vmx_set_cr3, 4503 .set_tdp_cr3 = vmx_set_cr3,
4504
4505 .check_intercept = vmx_check_intercept,
4497}; 4506};
4498 4507
4499static int __init vmx_init(void) 4508static int __init vmx_init(void)