[PATCH for-9.0 00/21] target/arm: kvm cleanups

Richard Henderson posted 21 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231123044219.896776-1-richard.henderson@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
target/arm/kvm_arm.h   |  203 ------
accel/kvm/kvm-all.c    |    2 +-
target/arm/kvm.c       | 1372 +++++++++++++++++++++++++++++++++++++++-
target/arm/kvm64.c     | 1290 -------------------------------------
target/arm/meson.build |    2 +-
5 files changed, 1345 insertions(+), 1524 deletions(-)
delete mode 100644 target/arm/kvm64.c
[PATCH for-9.0 00/21] target/arm: kvm cleanups
Posted by Richard Henderson 1 year ago
This is primarily concerned with merging kvm64.c with kvm.c
and then unexporting everything that is not required outside.

r~

Chao Du (1):
  target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe

Richard Henderson (20):
  accel/kvm: Make kvm_has_guest_debug static
  target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init
  target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport
  target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport
  target/arm/kvm: Move kvm_arm_hw_debug_active and unexport
  target/arm/kvm: Move kvm_arm_handle_debug and unexport
  target/arm/kvm: Unexport kvm_arm_{get,put}_virtual_time
  target/arm/kvm: Inline kvm_arm_steal_time_supported
  target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport
  target/arm/kvm: Use a switch for kvm_arm_cpreg_level
  target/arm/kvm: Move kvm_arm_cpreg_level and unexport
  target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport
  target/arm/kvm: Merge kvm64.c into kvm.c
  target/arm/kvm: Unexport kvm_arm_vcpu_init
  target/arm/kvm: Unexport kvm_arm_vcpu_finalize
  target/arm/kvm: Unexport kvm_arm_init_cpreg_list
  target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init
  target/arm/kvm: Unexport kvm_{get,put}_vcpu_events
  target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm,qemu}
  target/arm/kvm: Unexport kvm_arm_vm_state_change

 target/arm/kvm_arm.h   |  203 ------
 accel/kvm/kvm-all.c    |    2 +-
 target/arm/kvm.c       | 1372 +++++++++++++++++++++++++++++++++++++++-
 target/arm/kvm64.c     | 1290 -------------------------------------
 target/arm/meson.build |    2 +-
 5 files changed, 1345 insertions(+), 1524 deletions(-)
 delete mode 100644 target/arm/kvm64.c

-- 
2.34.1
Re: [PATCH for-9.0 00/21] target/arm: kvm cleanups
Posted by Philippe Mathieu-Daudé 1 year ago
On 23/11/23 05:41, Richard Henderson wrote:
> This is primarily concerned with merging kvm64.c with kvm.c
> and then unexporting everything that is not required outside.
> 
> r~
> 
> Chao Du (1):
>    target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe
> 
> Richard Henderson (20):
>    accel/kvm: Make kvm_has_guest_debug static
>    target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init
>    target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport
>    target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport
>    target/arm/kvm: Move kvm_arm_hw_debug_active and unexport
>    target/arm/kvm: Move kvm_arm_handle_debug and unexport
>    target/arm/kvm: Unexport kvm_arm_{get,put}_virtual_time
>    target/arm/kvm: Inline kvm_arm_steal_time_supported
>    target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport
>    target/arm/kvm: Use a switch for kvm_arm_cpreg_level
>    target/arm/kvm: Move kvm_arm_cpreg_level and unexport
>    target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport
>    target/arm/kvm: Merge kvm64.c into kvm.c
>    target/arm/kvm: Unexport kvm_arm_vcpu_init
>    target/arm/kvm: Unexport kvm_arm_vcpu_finalize
>    target/arm/kvm: Unexport kvm_arm_init_cpreg_list
>    target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init
>    target/arm/kvm: Unexport kvm_{get,put}_vcpu_events
>    target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm,qemu}
>    target/arm/kvm: Unexport kvm_arm_vm_state_change

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH for-9.0 00/21] target/arm: kvm cleanups
Posted by Peter Maydell 11 months, 3 weeks ago
On Thu, 23 Nov 2023 at 04:43, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This is primarily concerned with merging kvm64.c with kvm.c
> and then unexporting everything that is not required outside.
>

Applied to target-arm.next for 9.0, thanks.

-- PMM
Re: [PATCH for-9.0 00/21] target/arm: kvm cleanups
Posted by Philippe Mathieu-Daudé 1 year ago
On 23/11/23 05:41, Richard Henderson wrote:
> This is primarily concerned with merging kvm64.c with kvm.c
> and then unexporting everything that is not required outside.


>   target/arm/kvm_arm.h   |  203 ------

Unrelated to this series goal, but I notice half of the API takes
CPUState, the other ARMCPU...

$ git grep -F 'CPUState *' target/arm/kvm_arm.h | wc -l
       16
$ git grep -F 'ARMCPU *' target/arm/kvm_arm.h | wc -l
       14

Since this is ARM specific, I'd expect it always take ARMCPU, and
call the generic KVM API casting with the CPU() macro.
Re: [PATCH for-9.0 00/21] target/arm: kvm cleanups
Posted by Philippe Mathieu-Daudé 1 year ago
On 23/11/23 18:40, Philippe Mathieu-Daudé wrote:
> On 23/11/23 05:41, Richard Henderson wrote:
>> This is primarily concerned with merging kvm64.c with kvm.c
>> and then unexporting everything that is not required outside.
> 
> 
>>   target/arm/kvm_arm.h   |  203 ------
> 
> Unrelated to this series goal, but I notice half of the API takes
> CPUState, the other ARMCPU...
> 
> $ git grep -F 'CPUState *' target/arm/kvm_arm.h | wc -l
>        16
> $ git grep -F 'ARMCPU *' target/arm/kvm_arm.h | wc -l
>        14
> 
> Since this is ARM specific, I'd expect it always take ARMCPU, and
> call the generic KVM API casting with the CPU() macro.

API clarification done here:
https://lore.kernel.org/qemu-devel/20231123183518.64569-1-philmd@linaro.org/