diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-10-01 08:59:59 +0200 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-11-04 10:52:47 +1100 |
commit | 5d0a4134c1e4dbe118de8b9456079b76091bc44e (patch) | |
tree | 54d048fd7676fb37a6da1f01bd977b01a9276e39 /hw | |
parent | 4f194e774a19209b3aa3ced8423ba3044f06f1aa (diff) | |
download | skiboot-5d0a4134c1e4dbe118de8b9456079b76091bc44e.zip skiboot-5d0a4134c1e4dbe118de8b9456079b76091bc44e.tar.gz skiboot-5d0a4134c1e4dbe118de8b9456079b76091bc44e.tar.bz2 |
xive/p9: introduce NVT_SHIFT
This defines the size of our VP space which is constrained by the
definition of the END structure in the XIVE architecture for POWER9:
#define EQ_W6_NVT_BLOCK PPC_BITMASK32(9,12)
#define EQ_W6_NVT_INDEX PPC_BITMASK32(13,31)
The NVT/VP id is returned to the hypervisor by the OPAL call
opal_xive_get_vp_info() and later pushed in W2 of the OS CAM line when
a vCPU is dispatched on an HW thread.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xive.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -196,7 +196,10 @@ * * XXX Adjust that based on BAR value ? */ -#define MAX_VP_ORDER 19 /* 512k */ + +#define NVT_SHIFT 19 /* in sync with EQ_W6_NVT_INDEX */ + +#define MAX_VP_ORDER NVT_SHIFT /* 512k */ #define MAX_VP_COUNT (1ul << MAX_VP_ORDER) #define VP_PER_PAGE (0x10000 / 64) // Use sizeof ? #define IND_VP_TABLE_SIZE ((MAX_VP_COUNT / VP_PER_PAGE) * 8) @@ -4049,7 +4052,7 @@ static int64_t opal_xive_get_vp_info(uint64_t vp_id, } if (out_cam_value) - *out_cam_value = (blk << 19) | idx; + *out_cam_value = (blk << NVT_SHIFT) | idx; if (out_report_cl_pair) { *out_report_cl_pair = ((uint64_t)(vp->w6 & 0x0fffffff)) << 32; |