The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=2117a66af54f63cc474b4358bbb6967267e452cb
commit 2117a66af54f63cc474b4358bbb6967267e452cb Author: Mitchell Horne <[email protected]> AuthorDate: 2021-05-06 21:16:10 +0000 Commit: Roger Pau Monné <[email protected]> CommitDate: 2021-05-17 08:56:52 +0000 xen: remove hypervisor_info This was a source of indirection needed to support PVHv1. Now that that support has been removed, we can eliminate it. Reviewed by: royger --- sys/x86/xen/hvm.c | 44 -------------------------------------------- sys/xen/xen-os.h | 27 ++++++--------------------- 2 files changed, 6 insertions(+), 65 deletions(-) diff --git a/sys/x86/xen/hvm.c b/sys/x86/xen/hvm.c index 9b5b588234c4..569b113364b1 100644 --- a/sys/x86/xen/hvm.c +++ b/sys/x86/xen/hvm.c @@ -489,47 +489,3 @@ xen_hvm_cpu_init(void) DPCPU_SET(vcpu_info, vcpu_info); } SYSINIT(xen_hvm_cpu_init, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_cpu_init, NULL); - -/* HVM/PVH start_info accessors */ -static vm_paddr_t -hvm_get_xenstore_mfn(void) -{ - - return (hvm_get_parameter(HVM_PARAM_STORE_PFN)); -} - -static evtchn_port_t -hvm_get_xenstore_evtchn(void) -{ - - return (hvm_get_parameter(HVM_PARAM_STORE_EVTCHN)); -} - -static vm_paddr_t -hvm_get_console_mfn(void) -{ - - return (hvm_get_parameter(HVM_PARAM_CONSOLE_PFN)); -} - -static evtchn_port_t -hvm_get_console_evtchn(void) -{ - - return (hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN)); -} - -static uint32_t -hvm_get_start_flags(void) -{ - - return (hvm_start_flags); -} - -struct hypervisor_info hypervisor_info = { - .get_xenstore_mfn = hvm_get_xenstore_mfn, - .get_xenstore_evtchn = hvm_get_xenstore_evtchn, - .get_console_mfn = hvm_get_console_mfn, - .get_console_evtchn = hvm_get_console_evtchn, - .get_start_flags = hvm_get_start_flags, -}; diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index 874c3b71b861..cd8a53aab54f 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -43,50 +43,35 @@ #include <xen/interface/xen.h> #ifndef __ASSEMBLY__ +#include <xen/hvm.h> #include <xen/interface/event_channel.h> -struct hypervisor_info { - vm_paddr_t (*get_xenstore_mfn)(void); - evtchn_port_t (*get_xenstore_evtchn)(void); - vm_paddr_t (*get_console_mfn)(void); - evtchn_port_t (*get_console_evtchn)(void); - uint32_t (*get_start_flags)(void); -}; -extern struct hypervisor_info hypervisor_info; - static inline vm_paddr_t xen_get_xenstore_mfn(void) { - return (hypervisor_info.get_xenstore_mfn()); + return (hvm_get_parameter(HVM_PARAM_STORE_PFN)); } static inline evtchn_port_t xen_get_xenstore_evtchn(void) { - return (hypervisor_info.get_xenstore_evtchn()); + return (hvm_get_parameter(HVM_PARAM_STORE_EVTCHN)); } static inline vm_paddr_t xen_get_console_mfn(void) { - return (hypervisor_info.get_console_mfn()); + return (hvm_get_parameter(HVM_PARAM_CONSOLE_PFN)); } static inline evtchn_port_t xen_get_console_evtchn(void) { - return (hypervisor_info.get_console_evtchn()); -} - -static inline uint32_t -xen_get_start_flags(void) -{ - - return (hypervisor_info.get_start_flags()); + return (hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN)); } #endif @@ -132,7 +117,7 @@ static inline bool xen_initial_domain(void) { - return (xen_domain() && (xen_get_start_flags() & SIF_INITDOMAIN) != 0); + return (xen_domain() && (hvm_start_flags & SIF_INITDOMAIN) != 0); } /* _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "[email protected]"
