[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 14/20] target/riscv/kvm.c: add multi-letter extension KVM
From: |
Andrew Jones |
Subject: |
Re: [PATCH v6 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties |
Date: |
Thu, 29 Jun 2023 11:14:23 +0200 |
On Wed, Jun 28, 2023 at 06:30:27PM -0300, Daniel Henrique Barboza wrote:
> Let's add KVM user properties for the multi-letter extensions that KVM
> currently supports: zicbom, zicboz, zihintpause, zbb, ssaia, sstc,
> svinval and svpbmt.
>
> As with MISA extensions, we're using the KVMCPUConfig type to hold
> information about the state of each extension. However, multi-letter
> extensions have more cases to cover than MISA extensions, so we're
> adding an extra 'supported' flag as well. This flag will reflect if a
> given extension is supported by KVM, i.e. KVM knows how to handle it.
> This is determined during KVM extension discovery in
> kvm_riscv_init_multiext_cfg(), where we test for EINVAL errors. Any
> other error different from EINVAL will cause an abort.
>
> The use of the 'user_set' is similar to what we already do with MISA
> extensions: the flag set only if the user is changing the extension
> state.
>
> The 'supported' flag will be used later on to make an exception for
> users that are disabling multi-letter extensions that are unknown to
> KVM.
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> ---
> target/riscv/cpu.c | 8 +++
> target/riscv/kvm.c | 119 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 127 insertions(+)
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
- [PATCH v6 08/20] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs, (continued)
- [PATCH v6 08/20] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 09/20] linux-headers: Update to v6.4-rc1, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 11/20] target/riscv/cpu: add misa_ext_info_arr[], Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 10/20] target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 12/20] target/riscv: add KVM specific MISA properties, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 13/20] target/riscv/kvm.c: update KVM MISA bits, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties, Daniel Henrique Barboza, 2023/06/28
- Re: [PATCH v6 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties,
Andrew Jones <=
- [PATCH v6 15/20] target/riscv/cpu.c: add satp_mode properties earlier, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 16/20] target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext(), Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 17/20] target/riscv/cpu.c: create KVM mock properties, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 18/20] target/riscv: update multi-letter extension KVM properties, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 19/20] target/riscv/kvm.c: add kvmconfig_get_cfg_addr() helper, Daniel Henrique Barboza, 2023/06/28
- [PATCH v6 20/20] target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM, Daniel Henrique Barboza, 2023/06/28