Commit Graph

516 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
8a56b8a1b7 ioprio: move constant definitions to xlat
* xlat/ioprio_class.in: Add fallback values.
* xlat/ioprio_who.in: Likewise.
* ioprio.c: Remove IOPRIO_WHO_* and IOPRIO_CLASS_* enums.
2018-09-02 17:44:26 +00:00
Eugene Syromyatnikov
6177e74134 xlat: provide fallback definitions for epollevents
* xlat/epollevents.in: Provide fallback definitions, add EPOLLNVAL
constant (introduced by Linux commit v4.16-rc1~3^2~3).
2018-09-02 17:44:26 +00:00
Eugene Syromyatnikov
b05d2667e9 xlat: provide fallback definitions to pollflags
* xlat/pollflags.in: Add fallback definitions for POLLWRNORM,
POLLWRBAND, POLLMSG, POLLREMOVE, and POLLRDHUP.
2018-09-02 17:44:26 +00:00
Eugene Syromyatnikov
fdfc68a984 xlat: provide fallback values for socktypes
* xlat/socktypes.in: Provide fallback values.
2018-09-02 17:44:26 +00:00
Eugene Syromyatnikov
3f10639284 xlat: provide fallback values to route_nexthop_flags
* xlat/route_nexthop_flags.in: Add fallback values.
2018-09-02 17:44:26 +00:00
Eugene Syromyatnikov
618d4ed497 block: move fallback definitions for ioctl commands to xlat
* xlat/block_ioctl_cmds.in: New file.
* block.c: Include "xlat/block_ioctl_cmds.h" in XLAT_MACROS_ONLY mode.
(BLKPG, BLKTRACESETUP, BLKTRACESTART, BLKTRACESTOP, BLKTRACETEARDOWN,
BLKDISCARD, BLKIOMIN, BLKIOOPT, BLKALIGNOFF, BLKPBSZGET,
BLKDISCARDZEROES, BLKSECDISCARD, BLKROTATIONAL, BLKZEROOUT): Remove
fallback definitions as those are porvided by block_ioctl_cmds xlat now.
2018-09-01 14:38:12 +00:00
Eugene Syromyatnikov
1d7b8edda9 net: decode SOL_XDP socket option names
* xlat/sock_xdp_options.in: New file.
* net.c: Include "xlat/sock_xdp_options.h".
(print_sockopt_fd_level_name) <case SOL_XDP>: Print SOL_XDP socket
option names.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
45afd0c7a3 xlat: add SOL_XDP to socketlayers.in
* xlat/socketlayers.in (SOL_XDP): New constant, introduced by Linux
commit v4.18-rc1~114^2~304^2~4^2~14.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
dac524ad98 xlat: add AF_XDP to addrfams.in
* xlat/addrfams.in (AF_XDP): New constant, introduced by Linux commit
v4.18-rc1~114^2~304^2~4^2~14.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
587d1d5663 netlink_smc_diag: decode SMC_DIAG_SHUTDOWN attribute value
* xlat/sock_shutdown_flags.in: New file.
* netlink_smc_diag.c: Include "xlat/sock_shutdown_flags.h".
(decode_smc_diag_shutdown): New function.
(smc_diag_msg_nla_decoders) <[SMC_DIAG_SHUTDOWN]>: Use
decode_smc_diag_shutdown.
* tests/nlattr_smc_diag_msg.c: Add checks for SMC_DIAG_SHUTDOWN.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
6e7da52286 xlat: add BPF_PROG_TYPE_SK_REUSEPORT to bpf_prog_types.in
* xlat/bpf_prog_types.in (BPF_PROG_TYPE_SK_REUSEPORT): New constant,
introduced by Linux commit v4.19-rc1~140^2~24^2~2^2~5.
* tests/bpf.c: Update expected output.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
930864b083 xlat: add IPSTATS_MIB_REASM_OVERLAPS to snmp_ip_stats_mib.in
* xlat/snmp_ip_stats.in (IPSTATS_MIB_REASM_OVERLAPS): New constant,
introduced by Linux commit v4.19-rc1~140^2~128^2~2.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
3926f4a07d xlat: update bpf_map_types.in
* xlat/bpf_map_types.in (BPF_MAP_TYPE_CGROUP_STORAGE): New constant,
introduced by Linux commit v4.19-rc1~140^2~108^2~3^2~12.
(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY): New constant, introduced by Linux
commit v4.19-rc1~140^2~24^2~2^2~6.
* tests/bpf.c: Update expected output.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
24535be245 rtnl_link: add IFLA_MIN_MTU and IFLA_MAX_MTU attributes
Introduced by Linux commit v4.19-rc1~140^2~205^2~1.

* rtnl_link.c (ifinfomsg_nla_decoders) <[IFLA_MIN_MTU], [IFLA_MAX_MTU]>:
New decoder, calls decode_nla_u32.
* xlat/rtnl_link_attrs.in (IFLA_MIN_MTU, IFLA_MAX_MTU): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
4fa680e63f xlat: add IPV4_DEVCONF_BC_FORWARDING-1 to inet_devconf_indices.in
* xlat/inet_devconf_indices.in (IPV4_DEVCONF_BC_FORWARDING-1): New
constant, introduced by Linux commit v4.19-rc1~140^2~208^2~1.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
fb7c51690e rtnl_netconf: add NETCONFA_BC_FORWARDING attribute
Introduced by Linux commit v4.19-rc1~140^2~208^2~1.

* rtnl_netconf.c (netconfmsg_nla_decoders) <[NETCONFA_BC_FORWARDING]>:
New decoder, calls decode_nla_s32.
* xlat/rtnl_netconf_attrs.in (NETCONFA_BC_FORWARDING): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
df7dd5aa66 netlink_smc_diag: add SMC_DIAG_FALLBACK attribute support
Introduced by Linux commit v4.19-rc1~140^2~253^2~1.

* linux/smc_diag.h (SMC_DIAG_FALLBACK): New enumeration item.
(struct smc_diag_fallback): New type definition.
* netlink_smc_diag.c: Include "xlat/smc_decl_codes.h".
(decode_smc_diag_fallback): New function.
(smc_diag_msg_nla_decoders) <[SMC_DIAG_FALLBACK]>: New decoder, calls
decode_smc_diag_fallback.
* tests/nlattr_smc_diag_msg.c: Add checks for SMC_DIAG_FALLBACK
attribute decoding.
* xlat/smc_decl_codes.in: New file.
* xlat/smc_diag_attrs.in (SMC_DIAG_FALLBACK): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
fe8861f6b4 xlat: update v4l2_pix_fmts.in
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_FWHT): New constant, introduced by
Linux commit v4.19-rc1~137^2~221.
(V4L2_PIX_FMT_SBGGR14P, V4L2_PIX_FMT_SGBRG14P, V4L2_PIX_FMT_SGRBG14P,
V4L2_PIX_FMT_SRGGB14P): New constants, introduced by Linux commit
v4.19-rc1~137^2~97.
(V4L2_PIX_FMT_Y10P): New constant, introduced by Linux commit
v4.19-rc1~137^2~95.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
f7d175b562 netlink_smc_diag: decode smc_diag_msg.diag_fallback constant names
Introduced by Linux commit v4.19-rc1~140^2~285^2~4.

* xlat/smc_diag_mode.in: New file.
* netlink_smc_diag.c: Include "xlat/smc_diag_mode.h".
(decode_smc_diag_msg): Print diag_fallback field using smc_diag_mode
xlat.
* tests/netlink_sock_diag.c (test_smc_diag_msg): Update expected output.
* tests/nlattr_smc_diag_msg.c (print_smc_diag_msg): Likewise.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
701fd04d8a rtnl_link: add IFLA_BRPORT_BACKUP_PORT attribute
Introduced by Linux commit v4.19-rc1~140^2~288^2.

* xlat/rtnl_ifla_brport_attrs.in (IFLA_BRPORT_BACKUP_PORT): New
constant.
* rtnl_link.c (ifla_brport_nla_decoders) <[IFLA_BRPORT_BACKUP_PORT]>:
New decoder.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
cde23ff80c xlat: update nt_descriptor_types.in
* xlat/nt_descriptor_types.in (NT_VMCOREDD): New named constant,
introduced by Linux commit v4.18-rc1~114^2~252^2~2.
(NT_MIPS_DSP): New named constant, introduced by Linux commit
v4.19-rc1~42^2~63.
(NT_MIPS_FP_MODE): New named constant, introduced by Linux commit
v4.19-rc1~42^2~62.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
6b141f643a xlat: add AUDIT_INTEGRITY_POLICY_RULE to nl_audit_types.in
* xlat/nl_audit_types.in (AUDIT_INTEGRITY_POLICY_RULE): New constant,
introduced by Linux commit v4.19-rc1~124^2~5.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
d029a5efd1 rtnl_link: decode named constants for IFLA_XDP_ATTACHED attribute value
* xlat/rtnl_ifla_xdp_attached_mode.in: New file.
* rtnl_link.c: Include "xlat/rtnl_ifla_xdp_attached_mode.h".
(decode_ifla_xdp_attached): New function.
(ifla_xdp_nla_decoders) <[IFLA_XDP_ATTACHED]>: Use
decode_ifla_xdp_attached instead of decode_nla_u8.
* tests/nlattr_ifla_xdp.c: Add checks for IFLA_XDP_ATTACHED decoding.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
eded21f5c0 rtnl_link: add new IFLA_XDP_* attributes
Introduced by Linux commit v4.19-rc1~140^2~364^2~6^2~6.

* xlat/rtnl_ifla_xdp_attrs.in (IFLA_XDP_DRV_PROG_ID,
IFLA_XDP_SKB_PROG_ID, IFLA_XDP_HW_PROG_ID): New constants.
* rtnl_link.c (ifla_xdp_nla_decoders): Add decoders for
IFLA_XDP_DRV_PROG_ID, IFLA_XDP_SKB_PROG_ID, and IFLA_XDP_HW_PROG_ID.
* tests/nlattr_ifla_xdp.c: Add checks for new attributes.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
9624d9f09d xlat: update v4l2_control_ids.in
* xlat/v4l2_control_ids.in (V4L2_CID_MPEG_VIDEO_VP8_PROFILE): Renamed
from V4L2_CID_MPEG_VIDEO_VPX_PROFILE (the latter is now a synonym),
by Linux commit v4.19-rc1~137^2~270.
(V4L2_CID_MPEG_VIDEO_VP9_PROFILE): New constant, introduced by Linux
commit v4.19-rc1~137^2~269.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
db5235d0e9 xlat: add SO_TXTIME to sock_options.in
* xlat/sock_options.in (SO_TXTIME): New constant, introduced by Linux
commit v4.19-rc1~140^2~465^2~12.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
cf174ac87a netlink_smc_diag: implement SMC_DIAG_DMBINFO decoding
The message has been added by Linux commit v4.19-rc1~140^2~507^2~1.

* linux/smc_diag.h: Include "gcc_compat.h".
(enum): Add SMC_DIAG_DMBINFO.
(struct smcd_diag_dmbinfo): New type definition.
* xlat/smc_diag_attrs.in (SMC_DIAG_DMBINFO): New constant.
* netlink_smc_diag.c (decode_smc_diag_dmbinfo): New function.
(smc_diag_msg_nla_decoders) [SMC_DIAG_DMBINFO]: New decoder, calls
decode_smc_diag_dmbinfo.
* tests/nlattr_smc_diag_msg.c: Add SMC_DIAG_DMBINFO check.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
f9578731fc xlat: add SCTP_REUSE_PORT to sock_sctp_options.in
* xlat/sock_sctp_options.in (SCTP_REUSE_PORT): New constant, introduced
by Linux commit v4.19-rc1~140^2~518.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
9aa1efde58 xlat: add IN_MASK_CREATE to inotify_flags.in
* xlat/inotify_flags.in (IN_MASK_CREATE): New constant, introduced by
Linux commit v4.19-rc1~115^2.
* tests/inotify.c (main): Update expected output.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
2d88ec9e39 xlat: fix typo in smc_protocols.in
* xlat/smc_protocols.in: s/^MCPROTO_SMC/SMCPROTO_SMC/.
2018-08-19 10:26:18 +00:00
Zhibin Li
5ee385e2eb evdev: fix decoding of EVIOCGBIT(0, ...)
There is a comment in drivers/input/evdev.c which says:
/* EV_SYN==0 is EV_CNT, _not_ SYN_CNT, see EVIOCGBIT */

That is, EVIOCGBIT(0, ...) should return a bit mask with supported
event types instead of SYN_* event codes.

* defs.h (evdev_ev): New prototype.
* evdev.c: Include "xlat/evdev_ev.h" and remove "xlat/evdev_sync.h".
(bit_ioctl) <case EV_SYN>: Replace EV_SYN with 0, use evdev_ev
with XT_SORTED in decode_bitset invocation instead.
* ioctl.c: Do not include "xlat/evdev_ev.h".
(evdev_decode_number): Print nr == 0x20 as "0" instead of "EV_SYN".
* tests/ioctl_evdev.c (main): Use 0 instead of EV_SYN in EVIOCGBIT
output.
* xlat/evdev_sync.in: Remove.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: v4.10~89 "Add decoding for evdev ioctls"
2018-08-19 10:26:18 +00:00
Pierre Marsais
e38143b00e kvm: decode the argument of KVM_CHECK_EXTENSION
xlat/kvm_cap.in has been generated using the following command line:

grep '#define\s\+KVM_CAP' $linux/include/uapi/linux/kvm.h |
sed -E -e 's/^#define\s+([^ \t]+)\s*([0-9]+).*$/printf "%-40s%s\n" \1 \2/e' \
       -e 's/ {8}/\t/g; s/ +/\t/g'

* xlat/kvm_cap.in: New file.
* kvm.c: Include "xlat/kvm_cap.h".
(kvm_ioctl_decode_check_extension): New function.
(kvm_ioctl): Use it.
* tests/ioctl_kvm_run_common.c (main): Check decoding
of KVM_CHECK_EXTENSION command.

Signed-off-by: Pierre Marsais <pierre.marsais@lse.epita.fr>
2018-08-19 10:26:18 +00:00
0f09267db0 xlat: update V4L2_CID_USER_*_BASE constants
* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_S2255_BASE,
V4L2_CID_USER_SI476X_BASE, V4L2_CID_USER_SAA7134_BASE,
V4L2_CID_USER_ADV7180_BASE, V4L2_CID_USER_TC358743_BASE,
V4L2_CID_USER_MAX217X_BASE): New constants.
2018-08-19 10:26:18 +00:00
b89a69dec2 xlat: workaround V4L2_CID_USER_IMX_BASE Linux kernel ABI breakage
Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
by commit v4.13-rc1~141^2~121 because the old value was already used
by V4L2_CID_USER_MAX217X_BASE.

This is of course an ABI breakage that affects Linux kernels starting
with 4.13 and up to 4.18, as well as their LTS derivatives.

Since the imx driver didn't provide any public control ID definitions,
it looks like the best way to handle this situation is to pretend that
the old value of V4L2_CID_USER_IMX_BASE didn't exist.

* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_IMX_BASE): Redefine.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-19 10:26:18 +00:00
f22adb0c7c xlat: regenerate sock_options.in
* xlat/sock_options.in: Regenerate using maint/gen_xlat_defs.sh script.
* xlat/sock_options.sh: Remove.
2018-08-05 18:57:25 +00:00
a6ab0251f0 xlat: add fallback definitions to open_mode_flags
* xlat/open_mode_flags.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.  Implement a workaround for O_NDELAY.

Co-Authored-by: Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
Eugene Syromyatnikov
c20a515b6d xlat: remove non-Linux flags from open_mode_flags
* xlat/open_mode_flags.in (O_PRIV, FNDELAY, FAPPEND, FMARK, FDEFER,
FSHLOCK, FEXLOCK, FCREAT, FTRUNC, FEXCL, FNBIO, FSYNC, FNOCTTY,
O_SHLOCK, O_EXLOCK): Remove flags that are not present in Linux.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-08-05 18:57:25 +00:00
22f0253f33 xlat: add fallback definitions to madvise_cmds
* xlat/madvise_cmds.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
d7da491c34 xlat: add fallback definitions to mmap_flags
* xlat/mmap_flags.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.  Implement a workaround for MAP_RENAME.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
e9e2dec950 xlat: update RTA_* constants
* xlat/rtnl_route_attrs.in: Add RTA_IP_PROTO, RTA_SPORT, and RTA_DPORT
* constants introduced by Linux kernel commit v4.18-rc1~114^2~165^2~2.
2018-08-04 11:45:20 +00:00
a72d6cdea0 xlat: update IFLA_BRPORT_* constants
* xlat/rtnl_ifla_brport_attrs.in: Add IFLA_BRPORT_GROUP_FWD_MASK
constant introduced by Linux kernel commit v4.15-rc1~84^2~607.
Add IFLA_BRPORT_NEIGH_SUPPRESS constant introduced by Linux kernel
commit v4.15-rc1~84^2~523^2~2.
Add IFLA_BRPORT_ISOLATED constant introduced by Linux kernel commit
v4.18-rc1~114^2~142.
2018-08-04 11:45:20 +00:00
90eee029a9 xlat: update IFA_* constants
* xlat/rtnl_addr_attrs.in: Add IFA_RT_PRIORITY constant introduced
by Linux kernel commit v4.18-rc1~114^2~108^2~3
2018-08-04 11:45:20 +00:00
3ecff1d391 xlat: update RTPROT_* constants
* xlat/routing_protocols.in: Add RTPROT_BGP, RTPROT_ISIS, RTPROT_OSPF,
RTPROT_RIP, and RTPROT_EIGRP constants introduced by Linux kernel commit
v4.18-rc1~114^2~90.
2018-08-04 11:45:20 +00:00
150197054f xlat: save the script used to generate xlat/sock_options.in
* xlat/sock_options.sh: New file from commit message of commit v4.23~199.
2018-08-01 14:57:16 +00:00
Eugene Syromyatnikov
7374607613 xlat: update bpf(2)-related constants
* xlat/bpf_attach_type.in (BPF_CGROUP_UDP4_SENDMSG,
BPF_CGROUP_UDP6_SENDMSG): New constant, introduced by Linux commit
v4.18-rc1~114^2~9^2~20^2~4.
(BPF_LIRC_MODE2): New constant, introduced by Linux commit
v4.18-rc1~114^2~9^2~15^2~1.
* xlat/bpf_commands.in (BPF_BTF_LOAD): New constant, introduced by Linux
commit v4.18-rc1~114^2~417^2~1^2~5.
(BPF_BTF_GET_FD_BY_ID): New constant, introduced by Linux commit
v4.18-rc1~114^2~223^2~21^2~4.
(BPF_TASK_FD_QUERY): New constant, introduced by Linux commit
v4.18-rc1~114^2~148^2~1^2~5.
* xlat/bpf_map_types.in (BPF_MAP_TYPE_XSKMAP): New constant, introduced
by Linux commit v4.18-rc1~114^2~304^2~4^2~8.
(BPF_MAP_TYPE_SOCKHASH): New constant, introduced by Linux commit
v4.18-rc1~114^2~223^2~5^2~2.
* xlat/bpf_prog_types.in (BPF_PROG_TYPE_LWT_SEG6LOCAL): New constant,
introduced by Linux commit v4.18-rc1~114^2~148^2~2^2~1.
(BPF_PROG_TYPE_LIRC_MODE2): New constant, introduced by Linux commit
v4.18-rc1~114^2~9^2~15^2~1.
* tests/bpf.c: Update expected output.
2018-07-11 00:00:57 +00:00
Masatake YAMATO
b7416438b8 kvm: attach the exit reason of vcpu as auxstr to KVM_RUN output
In KVM, a virtual machine implementation like Qemu can access a vcpu
via ioctl.  KVM_RUN is an ioctl command to enter vcpu.  The command
returns control for various reasons: needs of device emulation or
consuming time slices are the typical ones.  The vmi takes a different
action for the reason.

We, strace users, want to know the reason to understand kvm.  This
change prints the reason as auxstr if "-e kvm=vcpu" option is given,
and if strace runs on Linux 4.16.0 or higher, which includes commit
e46b469278a59781f9b25ff608af84892963821b, "kvm: embed vcpu id to dentry
of vcpu anon inode."

The way to get the reason is a bit complicated because the ioctl does
not return it to the userspace directly.  Instead, the vmi and kvm
communicate via an area of the process virtual memory where the fd of
vcpu is mmap'ed.  strace must peek the area to know the reason.

The change does three things: (1) recording the area for the given vcpu
when the target calls VCPU_CREATE to vcpu_info_list per tcb data field,
(2) verifying the data recorded in vcpu_info_list before doing (3), and
(3) decoding the exit reason field of the area.

The change is complicated because there is a case that strace
does not have a chance to do (1) if -p option is used.
In this case, vcpu_info data created in the step (2).

The area has more fields than "exit reason",
dumping them may be implemented in the future.

* defs.h (struct tcb) [HAVE_LINUX_KVM_H]: Add vcpu_info_list field.
[HAVE_LINUX_KVM_H]: (kvm_run_structure_decoder_init,
kvm_vcpu_info_free): New declarations.
* strace.c (usage): Add "kvm" as a new expression for -e option.
(droptcb): Call kvm_vcpu_info_free.
* filter_qualify.c (qualify_kvm): New function calling
kvm_run_structure_decoder_init to enable for attaching the exit
reason to auxstr.
(qual_options): Add "kvm" as an entry.
* xlat/kvm_exit_reason.in: New file.
* kvm.c: Include xmalloc.h and mmap_cache.h.
(dump_kvm_run_structure): New static variable.
(kvm_run_structure_decoder_init): New function.
(vcpu_info): New struct definition representing the 3-tuple: vcpu file
descriptor, id of the vcpu, and mmap'ed entry.
(vcpu_find, vcpu_alloc, vcpu_register, vcpu_getinfo,
kvm_vcpu_info_free): New functions to access tcb's vcpu_info_list
field and vcpu_info data type.
(is_map_for_file, map_len): New helper functions.
(kvm_ioclt_run_attach_auxstr, kvm_ioctl_decode_run): New functions
decoding vcpu exit reason and attaching the decoded data to auxstr
field of tcb.
(kvm_ioctl_create_vcpu): Call vcpu_register to make an entry mapping
a file descriptor and the vcpu id associated with the fd.
(kvm_ioctl): Call kvm_ioctl_decode_run.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-07-07 10:29:02 +00:00
Pierre Marsais
546181b267 kvm: decode the argument of KVM_SET_CPUID2 and KVM_GET_*_CPUID ioctl commands
* configure.ac (AC_CHECK_TYPES): Add struct kvm_cpuid2.
* xlat/kvm_cpuid_flags.in: New file.
* kvm.c [HAVE_STRUCT_KVM_CPUID2]: Include "xlat/kvm_cpuid_flags.h".
[HAVE_STRUCT_KVM_CPUID2] (print_kvm_cpuid_entry, kvm_ioctl_decode_cpuid2):
New functions.
(kvm_ioctl) [HAVE_STRUCT_KVM_CPUID2]: Use kvm_ioctl_decode_cpuid2.
* NEWS: Mention this improvement.

Signed-off-by: Pierre Marsais <pierre.marsais@lse.epita.fr>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-07-07 10:29:02 +00:00
Eugene Syromyatnikov
a219217119 xlat: add AUDIT_INTEGRITY_EVM_XATTR to nl_audit_types
* xlat/nl_audit_types.in (AUDIT_INTEGRITY_EVM_XATTR): New constant,
introduced by Linux commit v4.18-rc1~100^2~9.
2018-06-18 18:58:01 +02:00
Eugene Syromyatnikov
14e385877d xlat: add UDP_SEGMENT to sock_udp_options
* xlat/sock_udp_options.in (UDP_SEGMENT): New constant, introduced by
Linux commit v4.18-rc1~114^2~377^2~8.
2018-06-18 18:58:01 +02:00
Eugene Syromyatnikov
b54134352a aio: print IOCB_CMD_* using xlat
* xlat/aio_cmds.in: New file.
* aio.c (tprint_lio_opcode): Change array of structs "cmds" to array of
enums "subs", use printxval_indexn_ex for printing cmd, return sub type
using subs array.
2018-06-18 01:02:13 +02:00