[PATCH] kvm: decode the argument of KVM_CHECK_EXTENSION

Eugene Syromiatnikov esyr at redhat.com
Thu Aug 16 11:00:28 UTC 2018


On Thu, Aug 16, 2018 at 11:26:48AM +0100, Pierre Marsais wrote:
> diff --git a/kvm.c b/kvm.c
> index c284e838..a518af90 100644
> --- a/kvm.c
> +++ b/kvm.c
> @@ -323,6 +323,16 @@ kvm_ioctl_decode_sregs(struct tcb *const tcp, const unsigned int code,
>  }
>  # endif /* HAVE_STRUCT_KVM_SREGS */
>  
> +# include "xlat/kvm_cap.h"
> +static int
> +kvm_ioctl_decode_check_extension(struct tcb *const tcp, const unsigned int code,
> +				 const kernel_ulong_t arg)
> +{
> +	tprints(", ");
> +	printxval(kvm_cap, arg, "KVM_CAP_???");

printxval_index will probably suit better, along with adding
#value_indexed directive to the xlat .in file.


More information about the Strace-devel mailing list