aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/nested.h
diff options
context:
space:
mode:
authorOliver Upton <oupton@google.com>2020-02-04 15:26:30 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-02-23 10:14:40 +0100
commite71237d3ff1abf9f3388337cfebf53b96df2020d (patch)
tree7b2d0cc07cb67c84412525dfa512ddd4812bc2a2 /arch/x86/kvm/vmx/nested.h
parentKVM: nVMX: Don't emulate instructions in guest mode (diff)
downloadlinux-dev-e71237d3ff1abf9f3388337cfebf53b96df2020d.tar.xz
linux-dev-e71237d3ff1abf9f3388337cfebf53b96df2020d.zip
KVM: nVMX: Refactor IO bitmap checks into helper function
Checks against the IO bitmap are useful for both instruction emulation and VM-exit reflection. Refactor the IO bitmap checks into a helper function. Signed-off-by: Oliver Upton <oupton@google.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
-rw-r--r--arch/x86/kvm/vmx/nested.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/nested.h b/arch/x86/kvm/vmx/nested.h
index 1db388f2a444..9aeda46f473e 100644
--- a/arch/x86/kvm/vmx/nested.h
+++ b/arch/x86/kvm/vmx/nested.h
@@ -33,6 +33,8 @@ int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata);
int get_vmx_mem_address(struct kvm_vcpu *vcpu, unsigned long exit_qualification,
u32 vmx_instruction_info, bool wr, int len, gva_t *ret);
void nested_vmx_pmu_entry_exit_ctls_update(struct kvm_vcpu *vcpu);
+bool nested_vmx_check_io_bitmaps(struct kvm_vcpu *vcpu, unsigned int port,
+ int size);
static inline struct vmcs12 *get_vmcs12(struct kvm_vcpu *vcpu)
{