[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MINI-OS PATCH 6/6] x86/pv: make start_info_ptr PV-only
Hide start_info_ptr via CONFIG_PARAVIRT in order to avoid accesses to it form not PV specific code. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- arch/x86/setup.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index 590f51a8..b3fc835a 100644 --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -35,11 +35,6 @@ #include <xen/arch-x86/hvm/start_info.h> #include <xen/hvm/params.h> -/* - * This pointer holds a reference to the start_info struct. - */ -start_info_t *start_info_ptr; - /* * Shared page for communicating with the hypervisor. * Events flags go here, for example. @@ -68,6 +63,11 @@ static inline void sse_init(void) { #endif #ifdef CONFIG_PARAVIRT +/* + * This pointer holds a reference to the start_info struct. + */ +start_info_t *start_info_ptr; + #define hpc_init() shared_info_t *map_shared_info(void) @@ -175,7 +175,9 @@ arch_init(void *par) { static char hello[] = "Bootstrapping...\n"; +#ifdef CONFIG_PARAVIRT start_info_ptr = par; +#endif hpc_init(); (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(hello), hello); @@ -226,7 +228,11 @@ int arch_suspend(void) * This hypercall returns 1 if the suspend * was cancelled and 0 if resuming in a new domain */ +#ifdef CONFIG_PARAVIRT return HYPERVISOR_suspend(virt_to_mfn(start_info_ptr)); +#else + return HYPERVISOR_suspend(0); +#endif } void arch_post_suspend(int canceled) -- 2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |