This reverts commit
17f8453876f8b143022278e6438c8ebb157d1821.
It turned out to break 32-bit architectures: At least core_size and
entry must be of the size the hypervisor uses for pointer, otherwise
link-time initialization of those fields fail.
We will need a more sophisticated solution if including the header in
i386 mode is really necessary.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
static void enter_hypervisor(void *info)
{
struct jailhouse_header *header = info;
- jailhouse_entry entry = (jailhouse_entry)header->entry;
int err;
/* either returns 0 or the same error code across all CPUs */
- err = entry(smp_processor_id());
+ err = header->entry(smp_processor_id());
if (err)
error_code = err;
#ifndef _JAILHOUSE_ENTRY_H
#define _JAILHOUSE_ENTRY_H
-#include <asm/types.h>
#include <jailhouse/header.h>
+#include <asm/types.h>
#include <jailhouse/cell-config.h>
#define JAILHOUSE_SIGNATURE "JAILHOUS"
-typedef int (*jailhouse_entry)(unsigned int);
-
struct jailhouse_header {
/* filled at build time */
- __u8 signature[8];
- __u64 core_size;
- __u64 percpu_size;
-
- /* jailhouse_entry */
- __u64 entry;
+ char signature[8];
+ unsigned long core_size;
+ unsigned long percpu_size;
+ int (*entry)(unsigned int);
/* filled by loader */
- __u32 max_cpus;
- __u32 online_cpus;
+ unsigned int max_cpus;
+ unsigned int online_cpus;
};
.signature = JAILHOUSE_SIGNATURE,
.core_size = (unsigned long)__hv_core_end - JAILHOUSE_BASE,
.percpu_size = sizeof(struct per_cpu),
- .entry = (unsigned long)arch_entry,
+ .entry = arch_entry,
};