Nested Virtualization: function hooks
PATCH 3/12 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 1292839430 -3600
add nestedhvm function hooks for svm/vmx specific code
Signed-off-by Christoph Egger <[email protected]>
xen/arch/x86/hvm/hvm.c +83 -0
@@ -3485,6 +3485,89 @@ 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_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 ; +} + +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); +} + +uint64_t nhvm_vcpu_guestcr3 (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_guestcr3) +return hvm_funcs.nhvm_vcpu_guestcr3 (v); +return -EOPNOTSUPP ; +} + +uint64_t nhvm_vcpu_hostcr3 (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_hostcr3) +return hvm_funcs.nhvm_vcpu_hostcr3 (v); +return -EOPNOTSUPP ; +} + +uint32_t nhvm_vcpu_asid (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vcpu_asid) +return hvm_funcs.nhvm_vcpu_asid (v); +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 ; +} + +bool_t nhvm_vmcx_hap_enabled (struct vcpu *v) +{ +if (hvm_funcs.nhvm_vmcx_hap_enabled) +return hvm_funcs.nhvm_vmcx_hap_enabled (v); +return -EOPNOTSUPP ; +} + +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 +61 -0
71 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel