qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e19afd: target/arm/monitor: Introduce qmp_que


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e19afd: target/arm/monitor: Introduce qmp_query_cpu_model_...
Date: Sat, 02 Nov 2019 10:57:10 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e19afd5667819d74ab25d1a1171efe7b5002c6ee
      
https://github.com/qemu/qemu/commit/e19afd5667819d74ab25d1a1171efe7b5002c6ee
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    A docs/arm-cpu-features.rst
    M qapi/machine-target.json
    M target/arm/monitor.c

  Log Message:
  -----------
  target/arm/monitor: Introduce qmp_query_cpu_model_expansion

Add support for the query-cpu-model-expansion QMP command to Arm. We
do this selectively, only exposing CPU properties which represent
optional CPU features which the user may want to enable/disable.
Additionally we restrict the list of queryable cpu models to 'max',
'host', or the current type when KVM is in use. And, finally, we only
implement expansion type 'full', as Arm does not yet have a "base"
CPU type. More details and example queries are described in a new
document (docs/arm-cpu-features.rst).

Note, certainly more features may be added to the list of advertised
features, e.g. 'vfp' and 'neon'. The only requirement is that we can
detect invalid configurations and emit failures at QMP query time.
For 'vfp' and 'neon' this will require some refactoring to share a
validation function between the QMP query and the CPU realize
functions.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Reviewed-by: Beata Michalska <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: bd31b751a3c1ac964c78f30424c6eb497d7d29db
      
https://github.com/qemu/qemu/commit/bd31b751a3c1ac964c78f30424c6eb497d7d29db
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M tests/Makefile.include
    A tests/arm-cpu-features.c

  Log Message:
  -----------
  tests: arm: Introduce cpu feature tests

Now that Arm CPUs have advertised features lets add tests to ensure
we maintain their expected availability with and without KVM.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Message-id: address@hidden
[PMM: squash in fix to avoid failure on aarch32-compat]
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 73234775ad61892409ef9cbde9100b3bdee8a70f
      
https://github.com/qemu/qemu/commit/73234775ad61892409ef9cbde9100b3bdee8a70f
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M target/arm/cpu.c
    M target/arm/cpu64.c
    M target/arm/monitor.c
    M tests/arm-cpu-features.c

  Log Message:
  -----------
  target/arm: Allow SVE to be disabled via a CPU property

Since 97a28b0eeac14 ("target/arm: Allow VFP and Neon to be disabled via
a CPU property") we can disable the 'max' cpu model's VFP and neon
features, but there's no way to disable SVE. Add the 'sve=on|off'
property to give it that flexibility. We also rename
cpu_max_get/set_sve_vq to cpu_max_get/set_sve_max_vq in order for them
to follow the typical *_get/set_<property-name> pattern.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Reviewed-by: Beata Michalska <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 0df9142d27d519f8686c8e92b8cfc4e04f2ddbe3
      
https://github.com/qemu/qemu/commit/0df9142d27d519f8686c8e92b8cfc4e04f2ddbe3
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M docs/arm-cpu-features.rst
    M include/qemu/bitops.h
    M target/arm/cpu.c
    M target/arm/cpu.h
    M target/arm/cpu64.c
    M target/arm/helper.c
    M target/arm/monitor.c
    M tests/arm-cpu-features.c

  Log Message:
  -----------
  target/arm/cpu64: max cpu: Introduce sve<N> properties

Introduce cpu properties to give fine control over SVE vector lengths.
We introduce a property for each valid length up to the current
maximum supported, which is 2048-bits. The properties are named, e.g.
sve128, sve256, sve384, sve512, ..., where the number is the number of
bits. See the updates to docs/arm-cpu-features.rst for a description
of the semantics and for example uses.

Note, as sve-max-vq is still present and we'd like to be able to
support qmp_query_cpu_model_expansion with guests launched with e.g.
-cpu max,sve-max-vq=8 on their command lines, then we do allow
sve-max-vq and sve<N> properties to be provided at the same time, but
this is not recommended, and is why sve-max-vq is not mentioned in the
document.  If sve-max-vq is provided then it enables all lengths smaller
than and including the max and disables all lengths larger. It also has
the side-effect that no larger lengths may be enabled and that the max
itself cannot be disabled. Smaller non-power-of-two lengths may,
however, be disabled, e.g. -cpu max,sve-max-vq=4,sve384=off provides a
guest the vector lengths 128, 256, and 512 bits.

This patch has been co-authored with Richard Henderson, who reworked
the target/arm/cpu64.c changes in order to push all the validation and
auto-enabling/disabling steps into the finalizer, resulting in a nice
LOC reduction.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Reviewed-by: Beata Michalska <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 40b3fd21fb6567ade28007277eb653bc727aa415
      
https://github.com/qemu/qemu/commit/40b3fd21fb6567ade28007277eb653bc727aa415
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M target/arm/kvm64.c

  Log Message:
  -----------
  target/arm/kvm64: Add kvm_arch_get/put_sve

These are the SVE equivalents to kvm_arch_get/put_fpsimd. Note, the
swabbing is different than it is for fpsmid because the vector format
is a little-endian stream of words.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 14e99e0fbbc6b5d99ad99ab32183e1ffe40f8984
      
https://github.com/qemu/qemu/commit/14e99e0fbbc6b5d99ad99ab32183e1ffe40f8984
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M target/arm/cpu64.c
    M target/arm/kvm.c
    M target/arm/kvm64.c
    M target/arm/kvm_arm.h
    M tests/arm-cpu-features.c

  Log Message:
  -----------
  target/arm/kvm64: max cpu: Enable SVE when available

Enable SVE in the KVM guest when the 'max' cpu type is configured
and KVM supports it. KVM SVE requires use of the new finalize
vcpu ioctl, so we add that now too. For starters SVE can only be
turned on or off, getting all vector lengths the host CPU supports
when on. We'll add the other SVE CPU properties in later patches.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Reviewed-by: Beata Michalska <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 0cdb4020b34b455fb9ef1e6283407d952cb02e63
      
https://github.com/qemu/qemu/commit/0cdb4020b34b455fb9ef1e6283407d952cb02e63
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M target/arm/kvm.c
    M target/arm/kvm32.c
    M target/arm/kvm64.c

  Log Message:
  -----------
  target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features

kvm_arm_create_scratch_host_vcpu() takes a struct kvm_vcpu_init
parameter. Rather than just using it as an output parameter to
pass back the preferred target, use it also as an input parameter,
allowing a caller to pass a selected target if they wish and to
also pass cpu features. If the caller doesn't want to select a
target they can pass -1 for the target which indicates they want
to use the preferred target and have it passed back like before.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Reviewed-by: Beata Michalska <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 6fa8a37949d912bb463caa0c139ff0ca88c6ec33
      
https://github.com/qemu/qemu/commit/6fa8a37949d912bb463caa0c139ff0ca88c6ec33
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M docs/arm-cpu-features.rst
    M target/arm/cpu64.c
    M target/arm/kvm64.c
    M target/arm/kvm_arm.h
    M tests/arm-cpu-features.c

  Log Message:
  -----------
  target/arm/cpu64: max cpu: Support sve properties with KVM

Extend the SVE vq map initialization and validation with KVM's
supported vector lengths when KVM is enabled. In order to determine
and select supported lengths we add two new KVM functions for getting
and setting the KVM_REG_ARM64_SVE_VLS pseudo-register.

This patch has been co-authored with Richard Henderson, who reworked
the target/arm/cpu64.c changes in order to push all the validation and
auto-enabling/disabling steps into the finalizer, resulting in a nice
LOC reduction.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 87014c6b3660ce54a57cb72171d6f93306b0c44a
      
https://github.com/qemu/qemu/commit/87014c6b3660ce54a57cb72171d6f93306b0c44a
  Author: Andrew Jones <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M docs/arm-cpu-features.rst
    M target/arm/cpu.c
    M target/arm/cpu.h
    M target/arm/cpu64.c
    M target/arm/kvm64.c
    M tests/arm-cpu-features.c

  Log Message:
  -----------
  target/arm/kvm: host cpu: Add support for sve<N> properties

Allow cpu 'host' to enable SVE when it's available, unless the
user chooses to disable it with the added 'sve=off' cpu property.
Also give the user the ability to select vector lengths with the
sve<N> properties. We don't adopt 'max' cpu's other sve property,
sve-max-vq, because that property is difficult to use with KVM.
That property assumes all vector lengths in the range from 1 up
to and including the specified maximum length are supported, but
there may be optional lengths not supported by the host in that
range. With KVM one must be more specific when enabling vector
lengths.

Signed-off-by: Andrew Jones <address@hidden>
Reviewed-by: Eric Auger <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Tested-by: Masayoshi Mizuma <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 98be6b7d62124a1ec9a7094c2a30981f82a07f9f
      
https://github.com/qemu/qemu/commit/98be6b7d62124a1ec9a7094c2a30981f82a07f9f
  Author: Edgar E. Iglesias <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M hw/arm/boot.c

  Log Message:
  -----------
  hw/arm/boot: Rebuild hflags when modifying CPUState at boot

Rebuild hflags when modifying CPUState at boot.

Fixes: e979972a6a
Signed-off-by: Edgar E. Iglesias <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Luc Michel <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 2529ab43b8a05534494704e803e0332d111d8b91
      
https://github.com/qemu/qemu/commit/2529ab43b8a05534494704e803e0332d111d8b91
  Author: Christophe Lyon <address@hidden>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M target/arm/translate-vfp.inc.c

  Log Message:
  -----------
  target/arm: Allow reading flags from FPSCR for M-profile

rt==15 is a special case when reading the flags: it means the
destination is APSR. This patch avoids rejecting
vmrs apsr_nzcv, fpscr
as illegal instruction.

Cc: address@hidden
Signed-off-by: Christophe Lyon <address@hidden>
Message-id: address@hidden
[PMM: updated the comment]
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 2bf2ee1b7c42251a3400084cbdedf26b149ab162
      
https://github.com/qemu/qemu/commit/2bf2ee1b7c42251a3400084cbdedf26b149ab162
  Author: Peter Maydell <address@hidden>
  Date:   2019-11-02 (Sat, 02 Nov 2019)

  Changed paths:
    A docs/arm-cpu-features.rst
    M hw/arm/boot.c
    M include/qemu/bitops.h
    M qapi/machine-target.json
    M target/arm/cpu.c
    M target/arm/cpu.h
    M target/arm/cpu64.c
    M target/arm/helper.c
    M target/arm/kvm.c
    M target/arm/kvm32.c
    M target/arm/kvm64.c
    M target/arm/kvm_arm.h
    M target/arm/monitor.c
    M target/arm/translate-vfp.inc.c
    M tests/Makefile.include
    A tests/arm-cpu-features.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/pmaydell/tags/pull-target-arm-20191101-2' into staging

target-arm queue:
 * Support SVE in KVM guests
 * Don't UNDEF on M-profile 'vmrs apsr_nzcv, fpscr'
 * Update hflags after boot.c modifies CPU state

# gpg: Signature made Sat 02 Nov 2019 10:38:59 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Peter Maydell <address@hidden>" [ultimate]
# gpg:                 aka "Peter Maydell <address@hidden>" [ultimate]
# gpg:                 aka "Peter Maydell <address@hidden>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20191101-2:
  target/arm: Allow reading flags from FPSCR for M-profile
  hw/arm/boot: Rebuild hflags when modifying CPUState at boot
  target/arm/kvm: host cpu: Add support for sve<N> properties
  target/arm/cpu64: max cpu: Support sve properties with KVM
  target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features
  target/arm/kvm64: max cpu: Enable SVE when available
  target/arm/kvm64: Add kvm_arch_get/put_sve
  target/arm/cpu64: max cpu: Introduce sve<N> properties
  target/arm: Allow SVE to be disabled via a CPU property
  tests: arm: Introduce cpu feature tests
  target/arm/monitor: Introduce qmp_query_cpu_model_expansion

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/b7c9a7f353c0...2bf2ee1b7c42



reply via email to

[Prev in Thread] Current Thread [Next in Thread]