summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kvm.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-08-08 17:17:09 +0200
committerAvi Kivity <avi@redhat.com>2011-09-25 19:52:23 +0300
commita15bd354f083f20f257db450488db52ac27df439 (patch)
tree06d382a5fd5a4811c00deeda261eca70975c445e /arch/powerpc/include/asm/kvm.h
parent77e675ad825d1106f973afd353e8af84cd8d3960 (diff)
KVM: PPC: Add support for explicit HIOR setting
Until now, we always set HIOR based on the PVR, but this is just wrong. Instead, we should be setting HIOR explicitly, so user space can decide what the initial HIOR value is - just like on real hardware. We keep the old PVR based way around for backwards compatibility, but once user space uses the SREGS based method, we drop the PVR logic. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm.h')
-rw-r--r--arch/powerpc/include/asm/kvm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h
index a4f6c85431f..a6a253ee81b 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/asm/kvm.h
@@ -149,6 +149,12 @@ struct kvm_regs {
#define KVM_SREGS_E_UPDATE_DBSR (1 << 3)
/*
+ * Book3S special bits to indicate contents in the struct by maintaining
+ * backwards compatibility with older structs. If adding a new field,
+ * please make sure to add a flag for that new field */
+#define KVM_SREGS_S_HIOR (1 << 0)
+
+/*
* In KVM_SET_SREGS, reserved/pad fields must be left untouched from a
* previous KVM_GET_REGS.
*
@@ -173,6 +179,8 @@ struct kvm_sregs {
__u64 ibat[8];
__u64 dbat[8];
} ppc32;
+ __u64 flags; /* KVM_SREGS_S_ */
+ __u64 hior;
} s;
struct {
union {