[PATCH 0/7] target/arm/hvf cleanups

Richard Henderson posted 7 patches 2 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250818041354.2393041-1-richard.henderson@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Alexander Graf <agraf@csgraf.de>, Mads Ynddal <mads@ynddal.dk>, Paolo Bonzini <pbonzini@redhat.com>
target/arm/cpregs.h         |   3 +
target/arm/kvm-consts.h     |  11 ++
target/arm/helper.c         |  11 ++
target/arm/hvf/hvf.c        | 230 +++++++++---------------------------
target/arm/kvm.c            |  11 --
target/arm/hvf/sysreg.c.inc | 146 +++++++++++++++++++++++
6 files changed, 224 insertions(+), 188 deletions(-)
create mode 100644 target/arm/hvf/sysreg.c.inc
[PATCH 0/7] target/arm/hvf cleanups
Posted by Richard Henderson 2 months, 4 weeks ago
While working on other things cpregs related, I noticed that
target/arm/hvf failed to produce a sorted cpreg_indexes[].

I wondered if that explained the migration-test failure that
we have, but no such luck.  (I have no idea how to debug that
test, btw; so far it is still just a mysterious SIGSEGV.)


r~


Richard Henderson (7):
  target/arm: Introduce KVMID_AA64_SYS_REG64
  target/arm: Move compare_u64 to helper.c
  target/arm/hvf: Split out sysreg.c.inc
  target/arm/hvf: Add KVMID_TO_HVF, HVF_TO_KVMID
  target/arm/hvf: Remove hvf_sreg_match.key
  target/arm/hvf: Replace hvf_sreg_match with hvf_sreg_list
  target/arm/hvf: Sort the cpreg_indexes array

 target/arm/cpregs.h         |   3 +
 target/arm/kvm-consts.h     |  11 ++
 target/arm/helper.c         |  11 ++
 target/arm/hvf/hvf.c        | 230 +++++++++---------------------------
 target/arm/kvm.c            |  11 --
 target/arm/hvf/sysreg.c.inc | 146 +++++++++++++++++++++++
 6 files changed, 224 insertions(+), 188 deletions(-)
 create mode 100644 target/arm/hvf/sysreg.c.inc

-- 
2.43.0
Re: [PATCH 0/7] target/arm/hvf cleanups
Posted by Mads Ynddal 2 months, 3 weeks ago
> On 18 Aug 2025, at 06.13, Richard Henderson <richard.henderson@linaro.org> wrote:
> 
> While working on other things cpregs related, I noticed that
> target/arm/hvf failed to produce a sorted cpreg_indexes[].
> 
> I wondered if that explained the migration-test failure that
> we have, but no such luck.  (I have no idea how to debug that
> test, btw; so far it is still just a mysterious SIGSEGV.)
> 
> 
> r~
> 
> 
> Richard Henderson (7):
>  target/arm: Introduce KVMID_AA64_SYS_REG64
>  target/arm: Move compare_u64 to helper.c
>  target/arm/hvf: Split out sysreg.c.inc
>  target/arm/hvf: Add KVMID_TO_HVF, HVF_TO_KVMID
>  target/arm/hvf: Remove hvf_sreg_match.key
>  target/arm/hvf: Replace hvf_sreg_match with hvf_sreg_list
>  target/arm/hvf: Sort the cpreg_indexes array
> 
> target/arm/cpregs.h         |   3 +
> target/arm/kvm-consts.h     |  11 ++
> target/arm/helper.c         |  11 ++
> target/arm/hvf/hvf.c        | 230 +++++++++---------------------------
> target/arm/kvm.c            |  11 --
> target/arm/hvf/sysreg.c.inc | 146 +++++++++++++++++++++++
> 6 files changed, 224 insertions(+), 188 deletions(-)
> create mode 100644 target/arm/hvf/sysreg.c.inc
> 
> -- 
> 2.43.0
> 

I noted the issue with HV_SYS_REG_MDCR_EL2, but assume we'll fix it down
the line.

For the series:

Reviewed-by: Mads Ynddal <mads@ynddal.dk>
Re: [PATCH 0/7] target/arm/hvf cleanups
Posted by Philippe Mathieu-Daudé 2 months, 4 weeks ago
On 18/8/25 06:13, Richard Henderson wrote:
> While working on other things cpregs related, I noticed that
> target/arm/hvf failed to produce a sorted cpreg_indexes[].
> 
> I wondered if that explained the migration-test failure that
> we have, but no such luck.  (I have no idea how to debug that
> test, btw; so far it is still just a mysterious SIGSEGV.)

I'm experiencing a pleasant speedup. I suppose this is
expected, due to the array rearrangement.

> Richard Henderson (7):
>    target/arm: Introduce KVMID_AA64_SYS_REG64
>    target/arm: Move compare_u64 to helper.c
>    target/arm/hvf: Split out sysreg.c.inc
>    target/arm/hvf: Add KVMID_TO_HVF, HVF_TO_KVMID
>    target/arm/hvf: Remove hvf_sreg_match.key
>    target/arm/hvf: Replace hvf_sreg_match with hvf_sreg_list
>    target/arm/hvf: Sort the cpreg_indexes array
Series:
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>