Nested Virtualization: function hooks
PATCH 3/14 Nested Virtualization: function hooks
Signature · 7 lines
-- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
# HG changeset patch
# User cegger
# Date 1287134038 -7200
add nestedhvm function hooks for svm/vmx specific code
Signed-off-by Christoph Egger <[email protected]>
xen/arch/x86/hvm/hvm.c +92 -0
@@ -3310,6 +3310,98 @@ int hvm_debug_op(struct vcpu *v, int32_t } +int nhvm_vcpu_initialise (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_initialise) +return hvm_funcs.nhvm_vcpu_initialise (v); +return -EOPNOTSUPP ; +} + +int nhvm_vcpu_destroy (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_destroy) +return hvm_funcs.nhvm_vcpu_destroy (v); +return -EOPNOTSUPP ; +} + +int nhvm_vcpu_reset (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_reset) +return hvm_funcs.nhvm_vcpu_reset (v); +return -EOPNOTSUPP ; +} + +int nhvm_vcpu_hostrestore (struct vcpu *v,struct cpu_user_regs *regs) +{ +if (hvm_funcs.nhvm_vcpu_hostrestore) +return hvm_funcs.nhvm_vcpu_hostrestore (v, regs); +return -EOPNOTSUPP ; +} + +int nhvm_vcpu_vmentry (struct vcpu *v,struct cpu_user_regs *regs, +unsigned int inst_len) +{ +if (hvm_funcs.nhvm_vcpu_vmentry) +return hvm_funcs.nhvm_vcpu_vmentry (v, regs, inst_len); +return -EOPNOTSUPP ; +} + +int nhvm_vcpu_vmexit (struct vcpu *v,struct cpu_user_regs *regs, +uint64_t exitcode) +{ +if (hvm_funcs.nhvm_vcpu_vmexit) +return hvm_funcs.nhvm_vcpu_vmexit (v, regs, exitcode); +return -EOPNOTSUPP ; +} + +uint64_t nhvm_vmcx_exitcode_native2generic (struct vcpu *v,uint64_t exitcode) +{ +if (hvm_funcs.nhvm_vmcx_exitcode_native2generic) +return hvm_funcs.nhvm_vmcx_exitcode_native2generic (v, exitcode); +return -EOPNOTSUPP ; +} + +int nhvm_vmcx_guest_intercepts_trap (struct vcpu *v,unsigned int trap) +{ +if (hvm_funcs.nhvm_vmcx_guest_intercepts_trap) +return hvm_funcs.nhvm_vmcx_guest_intercepts_trap (v, trap); +return -EOPNOTSUPP ; +} + +int nhvm_vmcx_guest_intercepts_exitcode (struct vcpu *v, +struct cpu_user_regs *regs,uint64_t exitcode) +{ +if (hvm_funcs.nhvm_vmcx_guest_intercepts_exitcode) +return hvm_funcs.nhvm_vmcx_guest_intercepts_exitcode (v, regs, exitcode); +return -EOPNOTSUPP ; +} + +int nhvm_vmcx_prepare4vmexit (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vmcx_prepare4vmexit) +return hvm_funcs.nhvm_vmcx_prepare4vmexit (v); +return -EOPNOTSUPP ; +} + +int nhvm_vmcx_isvalid (struct vcpu *v,uint64_t vmcxaddr) +{ +if (hvm_funcs.nhvm_vmcx_isvalid) +return hvm_funcs.nhvm_vmcx_isvalid (v, vmcxaddr); +return -EOPNOTSUPP ; +} + +int +nhvm_vcpu_vmexit_trap (struct vcpu *v,unsigned int trapnr, +int errcode,unsigned long cr2) +{ +return hvm_funcs.nhvm_vcpu_vmexit_trap (v, trapnr, errcode, cr2); +} + +enum hvm_intblk nhvm_interrupt_blocked (struct vcpu *v) +{ +return hvm_funcs.nhvm_intr_blocked (v); +} +/* * Local variables: * mode: C
xen/include/asm-x86/hvm/hvm.h +66 -0
76 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel