[Skiboot] [PATCH] hw/npu2.c: Hardcode MSR_SF when setting up npu XTS contexts

Alistair Popple alistair at popple.id.au
Thu Jun 8 16:28:47 AEST 2017


We don't support anything other than 64-bit mode for address translations so we
can safely hardcode it.

Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 hw/npu2.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/npu2.c b/hw/npu2.c
index b02b8a2..9507e8a 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -1724,8 +1724,10 @@ static int64_t opal_npu_init_context(uint64_t phb_id, int pasid, uint64_t msr,
 			       !!(msr & MSR_HV));
 	xts_bdf_pid = SETFIELD(NPU2_XTS_PID_MAP_MSR_PR, xts_bdf_pid,
 			       !!(msr & MSR_PR));
-	xts_bdf_pid = SETFIELD(NPU2_XTS_PID_MAP_MSR_SF, xts_bdf_pid,
-			       !!(msr & MSR_SF));
+
+	/* We don't support anything other than 64-bit so we can safely hardcode
+	 * it here */
+	xts_bdf_pid = SETFIELD(NPU2_XTS_PID_MAP_MSR_SF, xts_bdf_pid, 1);
 
 	/* Finally set the PID/PASID */
 	xts_bdf_pid = SETFIELD(NPU2_XTS_PID_MAP_PASID, xts_bdf_pid, pasid);
-- 
2.1.4



More information about the Skiboot mailing list