[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MINI-OS PATCH 3/6] x86/pv: remove global start_info
Add an extern declaration for start_info_ptr when running in PV mode and use that instead of the copy held in start_info. This allows to drop start_info. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- arch/x86/setup.c | 17 +---------------- console.c | 2 +- include/hypervisor.h | 12 ++---------- xenbus.c | 2 +- 4 files changed, 5 insertions(+), 28 deletions(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index 1bdf9509..4e2f0749 100644 --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -35,17 +35,8 @@ #include <xen/arch-x86/hvm/start_info.h> #include <xen/hvm/params.h> -#ifdef CONFIG_PARAVIRT -/* - * This structure contains start-of-day info, such as pagetable base pointer, - * address of the shared_info structure, and things like that. - */ -union start_info_union start_info_union; -EXPORT_SYMBOL(start_info_union); -#endif - /* - * This pointer holds a reference to the copy of the start_info struct. + * This pointer holds a reference to the start_info struct. */ start_info_t *start_info_ptr; @@ -212,10 +203,6 @@ arch_init(void *par) /* print out some useful information */ print_start_of_day(par); -#ifdef CONFIG_PARAVIRT - memcpy(&start_info, par, sizeof(start_info)); -#endif - start_kernel(); } @@ -248,8 +235,6 @@ void arch_post_suspend(int canceled) if (canceled) { start_info_ptr->store_mfn = pfn_to_mfn(start_info_ptr->store_mfn); start_info_ptr->console.domU.mfn = pfn_to_mfn(start_info_ptr->console.domU.mfn); - } else { - memcpy(&start_info, start_info_ptr, sizeof(start_info_t)); } #endif diff --git a/console.c b/console.c index 0107b685..a4c50371 100644 --- a/console.c +++ b/console.c @@ -411,7 +411,7 @@ void xencons_ring_resume(struct consfront_dev *dev) if ( dev ) { #if CONFIG_PARAVIRT - get_console(&start_info); + get_console(start_info_ptr); #else get_console(0); #endif diff --git a/include/hypervisor.h b/include/hypervisor.h index aef142d1..f40bc8c3 100644 --- a/include/hypervisor.h +++ b/include/hypervisor.h @@ -28,16 +28,8 @@ /* hypervisor.c */ #ifdef CONFIG_PARAVIRT -/* - * a placeholder for the start of day information passed up from the hypervisor - */ -union start_info_union -{ - start_info_t start_info; - char padding[512]; -}; -extern union start_info_union start_info_union; -#define start_info (start_info_union.start_info) +/* A pointer to the start of day information passed up from the hypervisor. */ +extern start_info_t *start_info_ptr; #else int hvm_get_parameter(int idx, uint64_t *value); int hvm_set_parameter(int idx, uint64_t value); diff --git a/xenbus.c b/xenbus.c index 686428a4..43fdebd7 100644 --- a/xenbus.c +++ b/xenbus.c @@ -469,7 +469,7 @@ void resume_xenbus(int canceled) struct xsd_sockmsg *rep; #ifdef CONFIG_PARAVIRT - get_xenbus(&start_info); + get_xenbus(start_info_ptr); #else get_xenbus(0); #endif -- 2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |