aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-06-19 08:21:00 +0100
committerWill Deacon <will.deacon@arm.com>2015-06-19 11:15:35 +0100
commit241f595f92c337426b50dc94327e48ae675b88f6 (patch)
tree494c1e9bb86669d271598a6816b150d428eebc14
parente96a27a10732d9958ae7eb2c0ee62a5072f427f3 (diff)
downloadkvmtool-241f595f92c337426b50dc94327e48ae675b88f6.tar.gz
powerpc: Define the hcall opcodes & return values we need
Now that we don't have the kernel header on hand, just define the minimum set of hcall opcodes and return values we need in order to build. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--powerpc/spapr.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/powerpc/spapr.h b/powerpc/spapr.h
index 0537f881..7a377d09 100644
--- a/powerpc/spapr.h
+++ b/powerpc/spapr.h
@@ -16,17 +16,32 @@
#include <inttypes.h>
-/* We need some of the H_ hcall defs, but they're __KERNEL__ only. */
-#define __KERNEL__
-#include <asm/hvcall.h>
-#undef __KERNEL__
-
#include "kvm/kvm.h"
#include "kvm/kvm-cpu.h"
typedef unsigned long target_ulong;
typedef uintptr_t target_phys_addr_t;
+#define H_SUCCESS 0
+#define H_HARDWARE -1 /* Hardware error */
+#define H_FUNCTION -2 /* Function not supported */
+#define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */
+
+#define H_SET_DABR 0x28
+#define H_LOGICAL_CI_LOAD 0x3c
+#define H_LOGICAL_CI_STORE 0x40
+#define H_LOGICAL_CACHE_LOAD 0x44
+#define H_LOGICAL_CACHE_STORE 0x48
+#define H_LOGICAL_ICBI 0x4c
+#define H_LOGICAL_DCBF 0x50
+#define H_GET_TERM_CHAR 0x54
+#define H_PUT_TERM_CHAR 0x58
+#define H_CPPR 0x68
+#define H_EOI 0x64
+#define H_IPI 0x6c
+#define H_XIRR 0x74
+#define MAX_HCALL_OPCODE H_XIRR
+
/*
* The hcalls above are standardized in PAPR and implemented by pHyp
* as well.