[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] mini-os: partially revert "remove using start_info ..."
commit 19034a2f807f4048cb628e8c04bbfd81b80eeb58 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Mon Aug 29 16:18:26 2016 +0200 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Tue Aug 30 09:14:09 2016 +0100 mini-os: partially revert "remove using start_info ..." Commit e33452c4f5547ed14defe6382b3b53664ac5bd8a ("remove using start_info in architecture independent code") removed the start_info variable completely. grub stubdom needs the start_info structure. Readd the start_info structure, but make it dependent on CONFIG_PARAVIRT. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- arch/x86/setup.c | 12 ++++++++++++ include/hypervisor.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index 86955cf..5278227 100644 --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -33,6 +33,14 @@ #include <xen/arch-x86/cpuid.h> #include <xen/arch-x86/hvm/start_info.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; +#endif + /* * Shared page for communicating with the hypervisor. * Events flags go here, for example. @@ -189,6 +197,10 @@ 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(); } diff --git a/include/hypervisor.h b/include/hypervisor.h index 3073a8a..f3b1f3c 100644 --- a/include/hypervisor.h +++ b/include/hypervisor.h @@ -27,7 +27,18 @@ #include <mini-os/traps.h> /* hypervisor.c */ -#ifndef CONFIG_PARAVIRT +#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) +#else int hvm_get_parameter(int idx, uint64_t *value); int hvm_set_parameter(int idx, uint64_t value); #endif -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |