mbox series

[0/2] riscv, kvm: support KVM_GET_REG_LIST

Message ID 20231003113259.771539-1-dbarboza@ventanamicro.com
Headers show
Series riscv, kvm: support KVM_GET_REG_LIST | expand

Message

Daniel Henrique Barboza Oct. 3, 2023, 11:32 a.m. UTC
Hi,

Starting on Linux 6.6 the QEMU RISC-V KVM driver now supports
KMV_GET_REG_LIST. This API will make it simpler for the QEMU KVM driver
to determine whether a KVM reg is present or not.

We'll use this API to fetch ISA_EXT regs during init(). The current
logic will be put in a legacy() helper and will still be used in case
the host KVM module does not support get-reg-list.

Patch 1 contains error handling changes in kvm_riscv_init_multiext_cfg()
where we're using &error_fatal and errno. 


Daniel Henrique Barboza (2):
  target/riscv/kvm: improve 'init_multiext_cfg' error msg
  target/riscv/kvm: support KVM_GET_REG_LIST

 target/riscv/kvm/kvm-cpu.c | 100 +++++++++++++++++++++++++++++++++++--
 1 file changed, 95 insertions(+), 5 deletions(-)

Comments

Alistair Francis Oct. 9, 2023, 1:14 a.m. UTC | #1
On Tue, Oct 3, 2023 at 9:34 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
> Hi,
>
> Starting on Linux 6.6 the QEMU RISC-V KVM driver now supports
> KMV_GET_REG_LIST. This API will make it simpler for the QEMU KVM driver
> to determine whether a KVM reg is present or not.
>
> We'll use this API to fetch ISA_EXT regs during init(). The current
> logic will be put in a legacy() helper and will still be used in case
> the host KVM module does not support get-reg-list.
>
> Patch 1 contains error handling changes in kvm_riscv_init_multiext_cfg()
> where we're using &error_fatal and errno.
>
>
> Daniel Henrique Barboza (2):
>   target/riscv/kvm: improve 'init_multiext_cfg' error msg
>   target/riscv/kvm: support KVM_GET_REG_LIST

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  target/riscv/kvm/kvm-cpu.c | 100 +++++++++++++++++++++++++++++++++++--
>  1 file changed, 95 insertions(+), 5 deletions(-)
>
> --
> 2.41.0
>
>