aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/hvcall.h
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>2020-12-16 16:12:18 +0530
committerPaul Mackerras <paulus@ozlabs.org>2021-02-10 14:31:08 +1100
commitbd1de1a0e6eff4bde5ceae969673b85b8446fd6a (patch)
tree543fdbe810211e27e2e089697188810301d9643a /arch/powerpc/include/asm/hvcall.h
parentKVM: PPC: Book3S HV: Rename current DAWR macros and variables (diff)
downloadlinux-dev-bd1de1a0e6eff4bde5ceae969673b85b8446fd6a.tar.xz
linux-dev-bd1de1a0e6eff4bde5ceae969673b85b8446fd6a.zip
KVM: PPC: Book3S HV: Add infrastructure to support 2nd DAWR
KVM code assumes single DAWR everywhere. Add code to support 2nd DAWR. DAWR is a hypervisor resource and thus H_SET_MODE hcall is used to set/ unset it. Introduce new case H_SET_MODE_RESOURCE_SET_DAWR1 for 2nd DAWR. Also, KVM will support 2nd DAWR only if CPU_FTR_DAWR1 is set. Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include/asm/hvcall.h')
-rw-r--r--arch/powerpc/include/asm/hvcall.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h
index cb4d07e2c0cc..ed6086d57b22 100644
--- a/arch/powerpc/include/asm/hvcall.h
+++ b/arch/powerpc/include/asm/hvcall.h
@@ -569,16 +569,22 @@ struct hv_guest_state {
u64 pidr;
u64 cfar;
u64 ppr;
+ /* Version 1 ends here */
+ u64 dawr1;
+ u64 dawrx1;
+ /* Version 2 ends here */
};
/* Latest version of hv_guest_state structure */
-#define HV_GUEST_STATE_VERSION 1
+#define HV_GUEST_STATE_VERSION 2
static inline int hv_guest_state_size(unsigned int version)
{
switch (version) {
case 1:
return offsetofend(struct hv_guest_state, ppr);
+ case 2:
+ return offsetofend(struct hv_guest_state, dawrx1);
default:
return -1;
}