mbox series

[0/5] Cleanup [h_enter|spapr_exit]_nested routines

Message ID 20230331065344.112341-1-harshpb@linux.ibm.com
Headers show
Series Cleanup [h_enter|spapr_exit]_nested routines | expand

Message

Harsh Prateek Bora March 31, 2023, 6:53 a.m. UTC
This patchset introduces helper routines to enable (and does) cleaning
up of h_enter_nested() and spapr_exit_nested() routines in existing api
for nested virtualization on Power/SPAPR for better code readability / 
maintenance. No functional changes intended with this patchset.

Harsh Prateek Bora (5):
  ppc: spapr: cleanup cr get/store with helper routines.
  ppc: spapr: cleanup h_enter_nested() with helper routines.
  ppc: spapr: assert early rather late in h_enter_nested()
  ppc: spapr: cleanup spapr_exit_nested() with helper routines.
  MAINTAINERS: Adding myself in the list for ppc/spapr

 MAINTAINERS          |   1 +
 hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
 target/ppc/cpu.c     |  17 +++
 target/ppc/cpu.h     |   2 +
 4 files changed, 161 insertions(+), 110 deletions(-)

Comments

Cédric Le Goater March 31, 2023, 10:39 a.m. UTC | #1
On 3/31/23 08:53, Harsh Prateek Bora wrote:
> This patchset introduces helper routines to enable (and does) cleaning
> up of h_enter_nested() and spapr_exit_nested() routines in existing api
> for nested virtualization on Power/SPAPR for better code readability /
> maintenance. No functional changes intended with this patchset.

Adding Nick since he did most of this work.

C.


> 
> Harsh Prateek Bora (5):
>    ppc: spapr: cleanup cr get/store with helper routines.
>    ppc: spapr: cleanup h_enter_nested() with helper routines.
>    ppc: spapr: assert early rather late in h_enter_nested()
>    ppc: spapr: cleanup spapr_exit_nested() with helper routines.
>    MAINTAINERS: Adding myself in the list for ppc/spapr
> 
>   MAINTAINERS          |   1 +
>   hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
>   target/ppc/cpu.c     |  17 +++
>   target/ppc/cpu.h     |   2 +
>   4 files changed, 161 insertions(+), 110 deletions(-)
>
Daniel Henrique Barboza March 31, 2023, 11:06 a.m. UTC | #2
On 3/31/23 07:39, Cédric Le Goater wrote:
> On 3/31/23 08:53, Harsh Prateek Bora wrote:
>> This patchset introduces helper routines to enable (and does) cleaning
>> up of h_enter_nested() and spapr_exit_nested() routines in existing api
>> for nested virtualization on Power/SPAPR for better code readability /
>> maintenance. No functional changes intended with this patchset.
> 
> Adding Nick since he did most of this work.


And also Fabiano.


Daniel

> 
> C.
> 
> 
>>
>> Harsh Prateek Bora (5):
>>    ppc: spapr: cleanup cr get/store with helper routines.
>>    ppc: spapr: cleanup h_enter_nested() with helper routines.
>>    ppc: spapr: assert early rather late in h_enter_nested()
>>    ppc: spapr: cleanup spapr_exit_nested() with helper routines.
>>    MAINTAINERS: Adding myself in the list for ppc/spapr
>>
>>   MAINTAINERS          |   1 +
>>   hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
>>   target/ppc/cpu.c     |  17 +++
>>   target/ppc/cpu.h     |   2 +
>>   4 files changed, 161 insertions(+), 110 deletions(-)
>>
>
Harsh Prateek Bora April 11, 2023, 4:15 a.m. UTC | #3
Hi Nick, Fabiano,

Any review comments, please?

regards,
Harsh

On 3/31/23 16:36, Daniel Henrique Barboza wrote:
> 
> 
> On 3/31/23 07:39, Cédric Le Goater wrote:
>> On 3/31/23 08:53, Harsh Prateek Bora wrote:
>>> This patchset introduces helper routines to enable (and does) cleaning
>>> up of h_enter_nested() and spapr_exit_nested() routines in existing api
>>> for nested virtualization on Power/SPAPR for better code readability /
>>> maintenance. No functional changes intended with this patchset.
>>
>> Adding Nick since he did most of this work.
> 
> 
> And also Fabiano.
> 
> 
> Daniel
> 
>>
>> C.
>>
>>
>>>
>>> Harsh Prateek Bora (5):
>>>    ppc: spapr: cleanup cr get/store with helper routines.
>>>    ppc: spapr: cleanup h_enter_nested() with helper routines.
>>>    ppc: spapr: assert early rather late in h_enter_nested()
>>>    ppc: spapr: cleanup spapr_exit_nested() with helper routines.
>>>    MAINTAINERS: Adding myself in the list for ppc/spapr
>>>
>>>   MAINTAINERS          |   1 +
>>>   hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
>>>   target/ppc/cpu.c     |  17 +++
>>>   target/ppc/cpu.h     |   2 +
>>>   4 files changed, 161 insertions(+), 110 deletions(-)
>>>
>>
Fabiano Rosas April 14, 2023, 12:04 p.m. UTC | #4
Harsh Prateek Bora <harshpb@linux.ibm.com> writes:

> This patchset introduces helper routines to enable (and does) cleaning
> up of h_enter_nested() and spapr_exit_nested() routines in existing api
> for nested virtualization on Power/SPAPR for better code readability / 
> maintenance. No functional changes intended with this patchset.

Do we have tests for this nested virtual hypervisor code? It would be
good to have at least a smoke test. I remember someone started adding
support to qemu-ppc-boot, probably Murilo. I suggest you take a look
around and maybe see what it takes to add it.

Just a L0 TCG with a small-ish qemu inside of it and a script to start
an L2.

>
> Harsh Prateek Bora (5):
>   ppc: spapr: cleanup cr get/store with helper routines.
>   ppc: spapr: cleanup h_enter_nested() with helper routines.
>   ppc: spapr: assert early rather late in h_enter_nested()
>   ppc: spapr: cleanup spapr_exit_nested() with helper routines.
>   MAINTAINERS: Adding myself in the list for ppc/spapr
>
>  MAINTAINERS          |   1 +
>  hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
>  target/ppc/cpu.c     |  17 +++
>  target/ppc/cpu.h     |   2 +
>  4 files changed, 161 insertions(+), 110 deletions(-)
Harsh Prateek Bora April 17, 2023, 7:21 a.m. UTC | #5
On 4/14/23 17:34, Fabiano Rosas wrote:
> Harsh Prateek Bora <harshpb@linux.ibm.com> writes:
> 
>> This patchset introduces helper routines to enable (and does) cleaning
>> up of h_enter_nested() and spapr_exit_nested() routines in existing api
>> for nested virtualization on Power/SPAPR for better code readability /
>> maintenance. No functional changes intended with this patchset.
> 
> Do we have tests for this nested virtual hypervisor code? It would be
> good to have at least a smoke test. I remember someone started adding
> support to qemu-ppc-boot, probably Murilo. I suggest you take a look
> around and maybe see what it takes to add it.
> 
> Just a L0 TCG with a small-ish qemu inside of it and a script to start
> an L2.
> 

This is something I already have in my to-do list, taking a note of your 
suggestions.

Thanks
Harsh

>>
>> Harsh Prateek Bora (5):
>>    ppc: spapr: cleanup cr get/store with helper routines.
>>    ppc: spapr: cleanup h_enter_nested() with helper routines.
>>    ppc: spapr: assert early rather late in h_enter_nested()
>>    ppc: spapr: cleanup spapr_exit_nested() with helper routines.
>>    MAINTAINERS: Adding myself in the list for ppc/spapr
>>
>>   MAINTAINERS          |   1 +
>>   hw/ppc/spapr_hcall.c | 251 ++++++++++++++++++++++++-------------------
>>   target/ppc/cpu.c     |  17 +++
>>   target/ppc/cpu.h     |   2 +
>>   4 files changed, 161 insertions(+), 110 deletions(-)
Cédric Le Goater April 17, 2023, 10:10 a.m. UTC | #6
On 4/17/23 09:21, Harsh Prateek Bora wrote:
> 
> 
> On 4/14/23 17:34, Fabiano Rosas wrote:
>> Harsh Prateek Bora <harshpb@linux.ibm.com> writes:
>>
>>> This patchset introduces helper routines to enable (and does) cleaning
>>> up of h_enter_nested() and spapr_exit_nested() routines in existing api
>>> for nested virtualization on Power/SPAPR for better code readability /
>>> maintenance. No functional changes intended with this patchset.
>>
>> Do we have tests for this nested virtual hypervisor code? It would be
>> good to have at least a smoke test. I remember someone started adding
>> support to qemu-ppc-boot, probably Murilo. I suggest you take a look
>> around and maybe see what it takes to add it.
>>
>> Just a L0 TCG with a small-ish qemu inside of it and a script to start
>> an L2.
>>
> 
> This is something I already have in my to-do list, taking a note of your suggestions.

When developing KVM support under the emulated PowerNV QEMU machines,
I was using this buildroot target :

   https://github.com/legoater/buildroot/commit/307ecbf7409e6fb060d7bbcc41201fdcacf0b0ca

I then used the same image to test the L2 support.

C.