]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
x86: drop hypervisor_cpuid_base
authorWei Liu <liuwe@microsoft.com>
Thu, 19 Sep 2019 14:04:25 +0000 (15:04 +0100)
committerWei Liu <liuwe@microsoft.com>
Tue, 5 Nov 2019 11:19:52 +0000 (11:19 +0000)
The only user is Xen specific code in PV shim. We can therefore export
the variable directly.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/guest/xen/xen.c
xen/arch/x86/pv/shim.c
xen/include/asm-x86/guest/xen.h

index 7b7a5badabb29d4de15dbc488a337e78b7fd15d8..78fc6039964dd142cd9e77cf537e23f3cf58dc88 100644 (file)
@@ -37,7 +37,7 @@
 
 bool __read_mostly xen_guest;
 
-static __read_mostly uint32_t xen_cpuid_base;
+__read_mostly uint32_t xen_cpuid_base;
 extern char hypercall_page[];
 static struct rangeset *mem;
 
@@ -301,11 +301,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();
index 4329eaaefe722c9c15d28570db74ee4893d7a722..7dc24598ae69c10f0b0d00d27c1d3ef260ef48d2 100644 (file)
@@ -992,7 +992,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;
 }
index 7e04e4a7ab9ba5b767fb6afbbaa73670876c6c95..b015ed18830bb39d591f6377e008e380ad9572d2 100644 (file)
 
 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);