#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.
/* print out some useful information */
print_start_of_day(par);
+#ifdef CONFIG_PARAVIRT
+ memcpy(&start_info, par, sizeof(start_info));
+#endif
+
start_kernel();
}
#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