strace/linux/arch_kvm.c
Masatake YAMATO 647709d8e5 kvm: decode the argument of KVM_{SET, GET}_SREGS ioctl command
* configure.ac (AC_CHECK_TYPES): Add struct kvm_sregs.
* kvm.c [HAVE_STRUCT_KVM_SREGS] (kvm_ioctl_decode_sregs): New function.
(kvm_ioctl) [HAVE_STRUCT_KVM_SREGS] <KVM_SET_SREGS, KVM_GET_SREGS>:
Use it.
* linux/arch_kvm.c (arch_print_kvm_sregs): New function.
* linux/x86_64/arch_kvm.c (PRINT_FIELD_KVM_SREGS_STRUCT): New macro.
(kvm_ioctl_decode_regs_dtable, kvm_ioctl_decode_regs_segment,
arch_print_kvm_sregs): New functions.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2017-12-04 18:29:38 +00:00

20 lines
432 B
C

#ifdef HAVE_STRUCT_KVM_REGS
static void
arch_print_kvm_regs(struct tcb *const tcp,
const kernel_ulong_t addr,
const struct kvm_regs *const regs)
{
printaddr(addr);
}
#endif /* HAVE_STRUCT_KVM_REGS */
#ifdef HAVE_STRUCT_KVM_SREGS
static void
arch_print_kvm_sregs(struct tcb *const tcp,
const kernel_ulong_t addr,
const struct kvm_sregs *const sregs)
{
printaddr(addr);
}
#endif /* HAVE_STRUCT_KVM_SREGS */