@@ -31,7 +31,7 @@ long cf_check pv_shim_cpu_up(void *data);
long cf_check pv_shim_cpu_down(void *data);
void pv_shim_online_memory(unsigned int nr, unsigned int order);
void pv_shim_offline_memory(unsigned int nr, unsigned int order);
-domid_t get_initial_domain_id(void);
+domid_t pv_shim_initial_domain_id(void);
uint64_t pv_shim_mem(uint64_t avail);
void pv_shim_fixup_e820(void);
const struct platform_bad_page *pv_shim_reserved_pages(unsigned int *size);
@@ -76,7 +76,7 @@ static inline void pv_shim_offline_memory(unsigned int nr, unsigned int order)
{
ASSERT_UNREACHABLE();
}
-static inline domid_t get_initial_domain_id(void)
+static inline domid_t pv_shim_initial_domain_id(void)
{
return 0;
}
@@ -328,7 +328,7 @@ int pv_shim_shutdown(uint8_t reason)
}
/* Update domain id. */
- d->domain_id = get_initial_domain_id();
+ d->domain_id = pv_shim_initial_domain_id();
/* Clean the iomem range. */
BUG_ON(iomem_deny_access(d, 0, ~0UL));
@@ -1016,7 +1016,7 @@ void pv_shim_offline_memory(unsigned int nr, unsigned int order)
}
}
-domid_t get_initial_domain_id(void)
+domid_t pv_shim_initial_domain_id(void)
{
uint32_t eax, ebx, ecx, edx;
@@ -45,6 +45,7 @@
#ifdef CONFIG_X86
#include <asm/guest.h>
+#include <asm/pv/shim.h>
#endif
/* Linux config option: propageted to domain0 */
@@ -2229,6 +2230,15 @@ int continue_hypercall_on_cpu(
return 0;
}
+domid_t get_initial_domain_id(void)
+{
+#ifdef CONFIG_X86
+ return pv_shim_initial_domain_id();
+#else
+ return 0;
+#endif
+}
+
/*
* Local variables:
* mode: C
@@ -171,4 +171,6 @@ extern bool vmtrace_available;
extern bool vpmu_is_available;
+domid_t get_initial_domain_id(void);
+
#endif /* __XEN_DOMAIN_H__ */