mini-os: repair stubdom build
v2 cover mini-os: repair stubdom build
The patch series adding HVMlite support for Mini-OS unfortunately broke building Xen's stubdoms. This small series repairs the broken bits again.
V2: patch 1: remove CONFIG_KEEP_STARTINFO
Juergen Gross (2):
mini-os: partially revert "remove using start_info ..."
mini-os: don't get xenbus parameters if xenbus is disabled
arch/x86/setup.c | 12 ++++++++++++ include/hypervisor.h | 13 ++++++++++++- include/xenbus.h | 5 ++++- 3 files changed, 28 insertions(+), 2 deletions(-)
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH v2 1/2 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.
--- arch/x86/setup.c | 12 ++++++++++++ include/hypervisor.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-)
arch/x86/setup.c +12 -0
@@ -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 (); }
include/hypervisor.h +12 -1
@@ -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
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH v2 2/2 mini-os: don't get xenbus parameters if xenbus is disabled
In reply to Juergen Grossget_xenbus() should be called only if CONFIG_XENBUS is set.
--- include/xenbus.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/xenbus.h +4 -1
@@ -9,10 +9,14 @@ typedef unsigned long xenbus_transaction_t;#ifdef CONFIG_XENBUS /* Initialize the XenBus system. */ void init_xenbus (void ); +void get_xenbus (void *p);#else static inline void init_xenbus (void ) { } +static inline void get_xenbus (void *p) +{ +}#endif /* Read the value associated with a path. Returns a malloc'd error
@@ -31,7 +35,6 @@ typedef struct xenbus_event *xenbus_event_queue;extern uint32_t xenbus_evtchn; -void get_xenbus (void *p);char *xenbus_watch_path_token (xenbus_transaction_t xbt,const char *path,const char *token,xenbus_event_queue *events);char *xenbus_unwatch_path_token (xenbus_transaction_t xbt,const char *path,const char *token);extern struct wait_queue_head xenbus_watch_queue;
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
In reply to Juergen GrossHello,
include/hypervisor.h line 38
Quoted 5 lines · Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
include/hypervisor.h +5
-0+union start_info_union +{ +start_info_t start_info; +char padding[512 ]; +};
Why defining a union? 512 is actually not enough for start_info_t.
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
Quoted 8 lines · Samuel Thibault, on Mon 29 Aug 2016 22:49:07 +0200, wrote:
include/hypervisor.h line 38
Quoted 5 lines · Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
include/hypervisor.h +5
-0+union start_info_union +{ +start_info_t start_info; +char padding[512 ]; +};Why defining a union? 512 is actually not enough for
start_info_t.
Ah, sorry, that was already there :)
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
In reply to Juergen GrossQuoted 8 lines · Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
Commit
e33452c4f5547ed14defe6382b3b53664ac5bd8a("remove usingstart_infoin architecture independent code") removed thestart_infovariable completely. grub stubdom needs thestart_infostructure.Readd the
start_infostructure, but make it dependent onCONFIG_PARAVIRT.Signed-off-by Juergen Gross <[email protected]>
Quoted 62 lines
--- arch/x86/setup.c | 12 ++++++++++++ include/hypervisor.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-)arch/x86/setup.c +12
-0@@ -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 (); }include/hypervisor.h +12
-1@@ -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 Signature · 1 line
2.6.6
Signature · 10 lines
Samuel FYLG> Tiens, vlà une URL qui va bien : FYLG> ftp://127.0.0.1/WaReZ/NiouZeS/WinDoZe/NeWSMoNGeR/SuPeR c'est gentil sauf que l'adresse ne fonctionne pas sa me fais une erreur -+- Furtif in Guide du Neuneu Usenet : <MODE CERVEAU OFF> -+- _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 10 lines · Juergen Gross
The patch series adding HVMlite support for Mini-OS unfortunately broke building Xen's stubdoms. This small series repairs the broken bits again.
V2: patch 1: remove
CONFIG_KEEP_STARTINFOJuergen Gross (2):
mini-os: partially revert "remove usingstart_info..."
mini-os: don't get xenbus parameters if xenbus is disabled
Pushed.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel