Skip to content

Commit

Permalink
hw/npu2.c: Hardcode MSR_SF when setting up npu XTS contexts
Browse files Browse the repository at this point in the history
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@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
apopple authored and stewartsmith committed Jun 20, 2017
1 parent 5b4a8c1 commit ebfcfaa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/npu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ebfcfaa

Please sign in to comment.