More blunt hacks to keep it building.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
#include <asm/paging.h>
#include <jailhouse/cell-config.h>
+#include <jailhouse/hypercall.h>
struct cell {
unsigned int id;
unsigned long page_offset;
struct cell *next;
+
+ union {
+ struct jailhouse_comm_region comm_region;
+ u8 padding[PAGE_SIZE];
+ } __attribute__((aligned(PAGE_SIZE))) comm_page;
};
extern struct cell linux_cell;
#define JAILHOUSE_CALL_ARG3 "r3"
#define JAILHOUSE_CALL_ARG4 "r4"
+#ifndef __asmeq
+#define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t"
+#endif
+
static inline __u32 jailhouse_call0(__u32 num)
{
register __u32 num_result asm(JAILHOUSE_CALL_NUM_RESULT) = num;
: "memory");
return num_result;
}
+
+static inline void
+jailhouse_send_msg_to_cell(struct jailhouse_comm_region *comm_region,
+ __u32 msg)
+{
+ comm_region->reply_from_cell = JAILHOUSE_MSG_NONE;
+ /* ensure reply was cleared before sending new message */
+ asm volatile("dmb ishst" : : : "memory");
+ comm_region->msg_to_cell = msg;
+}
+
+static inline void
+jailhouse_send_reply_from_cell(struct jailhouse_comm_region *comm_region,
+ __u32 reply)
+{
+ comm_region->msg_to_cell = JAILHOUSE_MSG_NONE;
+ /* ensure message was cleared before sending reply */
+ asm volatile("dmb ishst" : : : "memory");
+ comm_region->reply_from_cell = reply;
+}
int sipi_vector;
bool flush_caches;
bool shutdown_cpu;
+ int shutdown_state;
} __attribute__((aligned(PAGE_SIZE)));
static inline struct per_cpu *per_cpu(unsigned int cpu)
#include <jailhouse/processor.h>
#include <jailhouse/control.h>
#include <jailhouse/string.h>
+#include <jailhouse/paging.h>
void arch_dbg_write_init(void) {}
int phys_processor_id(void) { return 0; }
void arch_suspend_cpu(unsigned int cpu_id) {}
void *memcpy(void *dest, const void *src, unsigned long n) { return NULL; }
void arch_dbg_write(const char *msg) {}
void arch_shutdown(void) {}
+unsigned long arch_page_map_gphys2phys(struct per_cpu *cpu_data,
+ unsigned long gphys)
+{ return INVALID_PHYS_ADDR; }