]> xenbits.xensource.com Git - xen.git/commit
x86/nHVM: generic hook adjustments
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2015 08:39:52 +0000 (10:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2015 08:39:52 +0000 (10:39 +0200)
commit897c66dd94c78b4d5ef94e40860221383ed971d0
tree76d1f1477ae66c4eba2d6baf2c7ffd0011bc8c74
parenta5e8aff286d8e70850a17bc9eaa3f58d0112c141
x86/nHVM: generic hook adjustments

Some of the generic hooks were unused altogether - drop them.

Some of the hooks were used only to handle calls from the specific
vendor's code (SVM) - drop them too.

Several more hooks were pointlessly implementaed as out-of-line
functions, when most (all?) other HVM hooks use inline ones - make
them inlines. None of them are implemented by only one of SVM or VMX,
so also drop the conditionals. Funnily nhvm_vmcx_hap_enabled(), having
return type bool_t, nevertheless returned -EOPNOTSUPP.

nhvm_vmcx_guest_intercepts_trap() and its hook and implementations are
being made return bool_t, as they should have been from the beginning
(its sole caller only checks for a non-zero result).

Finally, make static whatever can as a result be static.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/nestedsvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/svm/nestedsvm.h
xen/include/asm-x86/hvm/vmx/vvmx.h