[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: drop hypervisor_cpuid_base
commit 1c178ffb29aedd00d2fd2f83bccd27caadbc1195 Author: Wei Liu <liuwe@xxxxxxxxxxxxx> AuthorDate: Thu Sep 19 15:04:25 2019 +0100 Commit: Wei Liu <wl@xxxxxxx> CommitDate: Wed Dec 4 10:31:25 2019 +0000 x86: drop hypervisor_cpuid_base The only user is Xen specific code in PV shim. We can therefore export the variable directly. Move __read_mostly to its standard place while at it. Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/guest/xen/xen.c | 7 +------ xen/arch/x86/pv/shim.c | 2 +- xen/include/asm-x86/guest/xen.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c index a329e7c886..1e37086518 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -37,7 +37,7 @@ bool __read_mostly xen_guest; -static __read_mostly uint32_t xen_cpuid_base; +uint32_t __read_mostly xen_cpuid_base; extern char hypercall_page[]; static struct rangeset *mem; @@ -297,11 +297,6 @@ int hypervisor_free_unused_page(mfn_t mfn) return rangeset_remove_range(mem, mfn_x(mfn), mfn_x(mfn)); } -uint32_t hypervisor_cpuid_base(void) -{ - return xen_cpuid_base; -} - static void ap_resume(void *unused) { map_vcpuinfo(); diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index 35bf3945ac..351da970ef 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -995,7 +995,7 @@ domid_t get_initial_domain_id(void) if ( !pv_shim ) return 0; - cpuid(hypervisor_cpuid_base() + 4, &eax, &ebx, &ecx, &edx); + cpuid(xen_cpuid_base + 4, &eax, &ebx, &ecx, &edx); return (eax & XEN_HVM_CPUID_DOMID_PRESENT) ? ecx : 1; } diff --git a/xen/include/asm-x86/guest/xen.h b/xen/include/asm-x86/guest/xen.h index 7e04e4a7ab..b015ed1883 100644 --- a/xen/include/asm-x86/guest/xen.h +++ b/xen/include/asm-x86/guest/xen.h @@ -30,13 +30,13 @@ extern bool xen_guest; extern bool pv_console; +extern uint32_t xen_cpuid_base; void probe_hypervisor(void); void hypervisor_setup(void); void hypervisor_ap_setup(void); int hypervisor_alloc_unused_page(mfn_t *mfn); int hypervisor_free_unused_page(mfn_t mfn); -uint32_t hypervisor_cpuid_base(void); void hypervisor_resume(void); DECLARE_PER_CPU(unsigned int, vcpu_id); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |