[PATCH v2] kvm: decode arguments of KVM_IOEVENTFD, KVM_IRQFD, and KVM_SET_GSI_ROUTING

Dmitry V. Levin ldv at strace.io
Sun Oct 22 14:03:51 UTC 2023


On Sat, Oct 21, 2023 at 10:09:39PM +0300, Daniel Cohen Hillel wrote:
> * configure.ac (AC_CHECK_TYPES): Add structs kvm_irqfd, kvm_irq_routing,
>            kvm_irq_routing_entry, and kvm_ioeventfd.
> * xlat/kvm_ioeventfd_flags.in: New file.
> * xlat/kvm_irqfd_flags.in: New file.
> * xlat/kvm_irq_routing_types.in: New file.
> * xlat/kvm_irq_routing_entry_flags.in: New file.
> * kvm.c [HAVE_STRUCT_KVM_IOEVENTFD]: Include "xlat/kvm_ioeventfd_flags.h"
>           (kvm_ioctl_decode_ioeventfd): New function
> [HAVE_STRUCT_KVM_IRQFD]: Include "xlat/kvm_irqfd_flags.h"
>           (kvm_ioctl_decode_irqfd): New function
> [HAVE_STRUCT_KVM_IRQ_ROUTING]: Include "xlat/kvm_irq_routing_types.h"
>           and "xlat/kvm_irq_routing_types.h".
>           (print_kvm_irq_routing_entrym kvm_ioctl_decode_irq_routing): New functions
> (kvm_ioctl) [HAVE_STRUCT_KVM_IOEVENTFD]: Use function kvm_ioctl_decode_ioeventfd
> (kvm_ioctl) [HAVE_STRUCT_KVM_IRQFD]: Use function kvm_ioctl_decode_irqfd
> (kvm_ioctl) [HAVE_STRUCT_KVM_IRQ_ROUTING]: Use functions (print_kvm_irq_routing_entrym kvm_ioctl_decode_irq_routing)
> * NEWS: Mention this improvement.
> ---
>  configure.ac                            |   6 +-
>  src/kvm.c                               | 137 ++++++++++++++++++++++++
>  src/xlat/kvm_ioeventfd_flags.in         |   4 +
>  src/xlat/kvm_irq_routing_entry_flags.in |   1 +
>  src/xlat/kvm_irq_routing_types.in       |   4 +
>  src/xlat/kvm_irqfd_flags.in             |   2 +
>  6 files changed, 153 insertions(+), 1 deletion(-)
>  create mode 100644 src/xlat/kvm_ioeventfd_flags.in
>  create mode 100644 src/xlat/kvm_irq_routing_entry_flags.in
>  create mode 100644 src/xlat/kvm_irq_routing_types.in
>  create mode 100644 src/xlat/kvm_irqfd_flags.in

We normally require that every new parser has to be accompanied by a test,
do you think you would be able to provide that as well?


-- 
ldv


More information about the Strace-devel mailing list