* [PATCH v2 0/2] mini-os: repair stubdom build
@ 2016-08-29 14:18 Juergen Gross
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-29 14:18 UTC (permalink / raw)
To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
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(-)
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
2016-08-29 14:18 [PATCH v2 0/2] mini-os: repair stubdom build Juergen Gross
@ 2016-08-29 14:18 ` Juergen Gross
2016-08-29 20:49 ` Samuel Thibault
2016-08-29 20:57 ` Samuel Thibault
2016-08-29 14:18 ` [PATCH v2 2/2] mini-os: don't get xenbus parameters if xenbus is disabled Juergen Gross
2016-08-30 8:16 ` [PATCH v2 0/2] mini-os: repair stubdom build Wei Liu
2 siblings, 2 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-29 14:18 UTC (permalink / raw)
To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
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@suse.com>
---
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
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] mini-os: don't get xenbus parameters if xenbus is disabled
2016-08-29 14:18 [PATCH v2 0/2] mini-os: repair stubdom build Juergen Gross
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
@ 2016-08-29 14:18 ` Juergen Gross
2016-08-30 8:16 ` [PATCH v2 0/2] mini-os: repair stubdom build Wei Liu
2 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-29 14:18 UTC (permalink / raw)
To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
get_xenbus() should be called only if CONFIG_XENBUS is set.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
include/xenbus.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/xenbus.h b/include/xenbus.h
index 5646a25..c254652 100644
--- a/include/xenbus.h
+++ b/include/xenbus.h
@@ -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;
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
@ 2016-08-29 20:49 ` Samuel Thibault
2016-08-29 20:56 ` Samuel Thibault
2016-08-29 20:57 ` Samuel Thibault
1 sibling, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2016-08-29 20:49 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2
Hello,
Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
> +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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
2016-08-29 20:49 ` Samuel Thibault
@ 2016-08-29 20:56 ` Samuel Thibault
0 siblings, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2016-08-29 20:56 UTC (permalink / raw)
To: Juergen Gross, minios-devel, xen-devel, wei.liu2
Samuel Thibault, on Mon 29 Aug 2016 22:49:07 +0200, wrote:
> Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
> > +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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..."
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
2016-08-29 20:49 ` Samuel Thibault
@ 2016-08-29 20:57 ` Samuel Thibault
1 sibling, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2016-08-29 20:57 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2
Juergen Gross, on Mon 29 Aug 2016 16:18:26 +0200, wrote:
> 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@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> 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
> --
> 2.6.6
>
--
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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] mini-os: repair stubdom build
2016-08-29 14:18 [PATCH v2 0/2] mini-os: repair stubdom build Juergen Gross
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
2016-08-29 14:18 ` [PATCH v2 2/2] mini-os: don't get xenbus parameters if xenbus is disabled Juergen Gross
@ 2016-08-30 8:16 ` Wei Liu
2 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2016-08-30 8:16 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2, samuel.thibault
On Mon, Aug 29, 2016 at 04:18:25PM +0200, Juergen Gross wrote:
> 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
>
Pushed.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-08-30 8:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 14:18 [PATCH v2 0/2] mini-os: repair stubdom build Juergen Gross
2016-08-29 14:18 ` [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." Juergen Gross
2016-08-29 20:49 ` Samuel Thibault
2016-08-29 20:56 ` Samuel Thibault
2016-08-29 20:57 ` Samuel Thibault
2016-08-29 14:18 ` [PATCH v2 2/2] mini-os: don't get xenbus parameters if xenbus is disabled Juergen Gross
2016-08-30 8:16 ` [PATCH v2 0/2] mini-os: repair stubdom build Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).