|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [mini-os master] x86/pv: make start_info_ptr PV-only
commit 8174d3144bf02d5affbeb75c2a23b07523954ab9
Author: Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Jun 24 14:33:29 2025 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jun 24 14:33:29 2025 +0200
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>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
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 590f51a..b3fc835 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)
--
generated by git-patchbot for /home/xen/git/mini-os.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |