mbox series

[v2,0/5] powerpc/rtas: miscellaneous cleanups

Message ID 20210408140630.205502-1-nathanl@linux.ibm.com (mailing list archive)
Headers show
Series powerpc/rtas: miscellaneous cleanups | expand

Message

Nathan Lynch April 8, 2021, 2:06 p.m. UTC
This is a reroll of the series posted here:
https://lore.kernel.org/linuxppc-dev/20210114220004.1138993-1-nathanl@linux.ibm.com/

Originally this work was prompted by failures on radix MMU PowerVM
guests when passing buffers to RTAS that lay outside of its idea of
the RMA. In v1 I approached this as a problem to be solved in Linux,
but RTAS development has since decided to change their code so that
the RMA restriction does not apply with radix.

So in v2 I retain the cleanups and discard the more significant change
which accommodated the misbehaving RTAS versions.

Changes since v1:
- Correct missing conversion of RTAS_RMOBUF_MAX ->
  RTAS_USER_REGION_SIZE in in_rmo_buf().
- Remove unnecessary braces in rtas_syscall_filter_init().
- Leave expression of RTAS_WORK_AREA_SIZE as-is instead of changing
  the factors in a confusing way, per discussion with Alexey.
- Drop "powerpc/rtas: constrain user region allocation to RMA"

Nathan Lynch (5):
  powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation
  powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX
  powerpc/rtas: remove ibm_suspend_me_token
  powerpc/rtas: move syscall filter setup into separate function
  powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

 arch/powerpc/include/asm/rtas.h |  6 +++---
 arch/powerpc/kernel/rtas-proc.c | 15 +++++++++++----
 arch/powerpc/kernel/rtas.c      | 34 +++++++++++++++++----------------
 3 files changed, 32 insertions(+), 23 deletions(-)

Comments

Christophe Leroy April 14, 2021, 5:02 p.m. UTC | #1
Le 08/04/2021 à 16:06, Nathan Lynch a écrit :
> This is a reroll of the series posted here:
> https://lore.kernel.org/linuxppc-dev/20210114220004.1138993-1-nathanl@linux.ibm.com/
> 
> Originally this work was prompted by failures on radix MMU PowerVM
> guests when passing buffers to RTAS that lay outside of its idea of
> the RMA. In v1 I approached this as a problem to be solved in Linux,
> but RTAS development has since decided to change their code so that
> the RMA restriction does not apply with radix.
> 
> So in v2 I retain the cleanups and discard the more significant change
> which accommodated the misbehaving RTAS versions.

Is there a link with https://github.com/linuxppc/issues/issues/252 ?

> 
> Changes since v1:
> - Correct missing conversion of RTAS_RMOBUF_MAX ->
>    RTAS_USER_REGION_SIZE in in_rmo_buf().
> - Remove unnecessary braces in rtas_syscall_filter_init().
> - Leave expression of RTAS_WORK_AREA_SIZE as-is instead of changing
>    the factors in a confusing way, per discussion with Alexey.
> - Drop "powerpc/rtas: constrain user region allocation to RMA"
> 
> Nathan Lynch (5):
>    powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation
>    powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX
>    powerpc/rtas: remove ibm_suspend_me_token
>    powerpc/rtas: move syscall filter setup into separate function
>    powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE
> 
>   arch/powerpc/include/asm/rtas.h |  6 +++---
>   arch/powerpc/kernel/rtas-proc.c | 15 +++++++++++----
>   arch/powerpc/kernel/rtas.c      | 34 +++++++++++++++++----------------
>   3 files changed, 32 insertions(+), 23 deletions(-)
>
Nathan Lynch April 15, 2021, 12:23 a.m. UTC | #2
Christophe Leroy <christophe.leroy@csgroup.eu> writes:

> Le 08/04/2021 à 16:06, Nathan Lynch a écrit :
>> This is a reroll of the series posted here:
>> https://lore.kernel.org/linuxppc-dev/20210114220004.1138993-1-nathanl@linux.ibm.com/
>> 
>> Originally this work was prompted by failures on radix MMU PowerVM
>> guests when passing buffers to RTAS that lay outside of its idea of
>> the RMA. In v1 I approached this as a problem to be solved in Linux,
>> but RTAS development has since decided to change their code so that
>> the RMA restriction does not apply with radix.
>> 
>> So in v2 I retain the cleanups and discard the more significant change
>> which accommodated the misbehaving RTAS versions.
>
> Is there a link with https://github.com/linuxppc/issues/issues/252 ?
>

No, not really.
Michael Ellerman April 19, 2021, 3:59 a.m. UTC | #3
On Thu, 8 Apr 2021 09:06:25 -0500, Nathan Lynch wrote:
> This is a reroll of the series posted here:
> https://lore.kernel.org/linuxppc-dev/20210114220004.1138993-1-nathanl@linux.ibm.com/
> 
> Originally this work was prompted by failures on radix MMU PowerVM
> guests when passing buffers to RTAS that lay outside of its idea of
> the RMA. In v1 I approached this as a problem to be solved in Linux,
> but RTAS development has since decided to change their code so that
> the RMA restriction does not apply with radix.
> 
> [...]

Applied to powerpc/next.

[1/5] powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation
      https://git.kernel.org/powerpc/c/c13ff6f3251318f5e1ff5b1a6d05f76996db672a
[2/5] powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX
      https://git.kernel.org/powerpc/c/01c1b9984a12a379f332c39c4b1fd96e473b93b0
[3/5] powerpc/rtas: remove ibm_suspend_me_token
      https://git.kernel.org/powerpc/c/0ab1c929ae38262c4deb18b4a2e03a4f0cb5c5ed
[4/5] powerpc/rtas: move syscall filter setup into separate function
      https://git.kernel.org/powerpc/c/0649cdc8237943c15fc977e96033dc8ae28cc2bd
[5/5] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE
      https://git.kernel.org/powerpc/c/e5d56763525e65417dad0d46572b234fa0008e40

cheers