s390x update
[Third time's the charm, I hope. Split out the change in the update headers script and copy to the right directory. Sending only these two patches; the rest are unchanged save for the commit ids.]
The following changes since commit d8276573da58e8ce78dab8c46dd660efd664bcb7:
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190510' into staging (2019-05-16 13:15:08 +0100)
are available in the Git repository at:
https://github.com/cohuck/qemu tags/s390x-20190521-3
for you to fetch changes up to c657e84faee48d6ab36665da5a008b8f0649593d:
s390x/cpumodel: wire up 8561 and 8562 as gen15 machines (2019-05-21 16:59:16 +0200)
----------------------------------------------------------------
s390x update:
- have the bios tolerate bootmap signature entries
- next chunk of vector instruction support in tcg
- a headers update against Linux 5.2-rc1
- add more facilities and gen15 machines to the cpu model
----------------------------------------------------------------
Christian Borntraeger (8):
s390x/cpumodel: ignore csske for expansion s390x/cpumodel: Miscellaneous-Instruction-Extensions Facility 3 s390x/cpumodel: msa9 facility
s390x/cpumodel: vector enhancements
s390x/cpumodel: enhanced sort facility s390x/cpumodel: add Deflate-conversion facility s390x/cpumodel: add gen15 defintions
s390x/cpumodel: wire up 8561 and 8562 as gen15 machines
Cornelia Huck (4):
s390/ipl: cast to SCSIDevice directly
s390/css: handle CCW_FLAG_SKIP
update-linux-headers: handle new header file
linux headers: update against Linux 5.2-rc1
David Hildenbrand (40):
s390x/tcg: Implement VECTOR ADD
s390x/tcg: Implement VECTOR ADD COMPUTE CARRY
s390x/tcg: Implement VECTOR ADD WITH CARRY
s390x/tcg: Implement VECTOR ADD WITH CARRY COMPUTE CARRY s390x/tcg: Implement VECTOR AND (WITH COMPLEMENT) s390x/tcg: Implement VECTOR AVERAGE
s390x/tcg: Implement VECTOR AVERAGE LOGICAL
s390x/tcg: Implement VECTOR CHECKSUM
s390x/tcg: Implement VECTOR ELEMENT COMPARE *
s390x/tcg: Implement VECTOR COMPARE *
s390x/tcg: Implement VECTOR COUNT LEADING ZEROS
s390x/tcg: Implement VECTOR COUNT TRAILING ZEROS s390x/tcg: Implement VECTOR EXCLUSIVE OR
s390x/tcg: Implement VECTOR GALOIS FIELD MULTIPLY SUM (AND ACCUMULATE) s390x/tcg: Implement VECTOR LOAD COMPLEMENT
s390x/tcg: Implement VECTOR LOAD POSITIVE
s390x/tcg: Implement VECTOR (MAXIMUM|MINIMUM) (LOGICAL) s390x/tcg: Implement VECTOR MULTIPLY AND ADD *
s390x/tcg: Implement VECTOR MULTIPLY *
s390x/tcg: Implement VECTOR NAND
s390x/tcg: Implement VECTOR NOR
s390x/tcg: Implement VECTOR NOT EXCLUSIVE OR
s390x/tcg: Implement VECTOR OR
s390x/tcg: Implement VECTOR OR WITH COMPLEMENT
s390x/tcg: Implement VECTOR POPULATION COUNT
s390x/tcg: Implement VECTOR ELEMENT ROTATE LEFT LOGICAL s390x/tcg: Implement VECTOR ELEMENT ROTATE AND INSERT UNDER MASK s390x/tcg: Implement VECTOR ELEMENT SHIFT
s390x/tcg: Implement VECTOR SHIFT LEFT (BY BYTE) s390x/tcg: Implement VECTOR SHIFT LEFT DOUBLE BY BYTE s390x/tcg: Implement VECTOR SHIFT RIGHT ARITHMETIC s390x/tcg: Implement VECTOR SHIFT RIGHT LOGICAL * s390x/tcg: Implement VECTOR SUBTRACT
s390x/tcg: Implement VECTOR SUBTRACT COMPUTE BORROW INDICATION s390x/tcg: Implement VECTOR SUBTRACT WITH BORROW INDICATION s390x/tcg: Implement VECTOR SUBTRACT WITH BORROW COMPUTE BORROW
INDICATION
s390x/tcg: Implement VECTOR SUM ACROSS DOUBLEWORD s390x/tcg: Implement VECTOR SUM ACROSS QUADWORD
s390x/tcg: Implement VECTOR SUM ACROSS WORD
s390x/tcg: Implement VECTOR TEST UNDER MASK
Jason J. Herne (1):
s390-bios: Skip bootmap signature entries
Markus Armbruster (1):
pc-bios/s390-ccw: Clean up harmless misuse of isdigit()
Thomas Huth (1):
pc-bios/s390: Update firmware image with "Skip bootmap signature
entries" fix
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v3 46/55] update-linux-headers: handle new header file
We need to copy sve_context.h for aarch64.
--- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+)
scripts/update-linux-headers.sh +3 -0
@@ -122,6 +122,9 @@ for arch in $ARCHLIST; do cp "$tmpdir/include/asm/unistd-oabi.h" "$output/linux-headers/asm-arm/" cp "$tmpdir/include/asm/unistd-common.h" "$output/linux-headers/asm-arm/" fi + if [ $arch = arm64 ]; then + cp "$tmpdir/include/asm/sve_context.h" "$output/linux-headers/asm-arm64/" + fi if [ $arch = x86 ]; then cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-x86/" cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x86/"
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Cornelia Huckcommit a188339ca5a396acc588e5851ed7e19f66b0ebd9
--- .../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 15 +- include/standard-headers/drm/drm_fourcc.h | 114 +++++++++++- include/standard-headers/linux/ethtool.h | 48 +++-- .../linux/input-event-codes.h | 9 +- include/standard-headers/linux/input.h | 6 +- include/standard-headers/linux/pci_regs.h | 140 ++++++++------- .../standard-headers/linux/virtio_config.h | 6 + include/standard-headers/linux/virtio_gpu.h | 12 +- include/standard-headers/linux/virtio_ring.h | 10 -- .../standard-headers/rdma/vmw_pvrdma-abi.h | 1 + linux-headers/asm-arm/unistd-common.h | 32 ++++ linux-headers/asm-arm64/kvm.h | 43 +++++ linux-headers/asm-arm64/sve_context.h | 53 ++++++ linux-headers/asm-arm64/unistd.h | 2 + linux-headers/asm-generic/mman-common.h | 4 +- linux-headers/asm-generic/unistd.h | 170 ++++++++++++++---- linux-headers/asm-mips/mman.h | 4 +- linux-headers/asm-mips/unistd_n32.h | 30 ++++ linux-headers/asm-mips/unistd_n64.h | 10 ++ linux-headers/asm-mips/unistd_o32.h | 40 +++++ linux-headers/asm-powerpc/kvm.h | 48 +++++ linux-headers/asm-powerpc/unistd_32.h | 40 +++++ linux-headers/asm-powerpc/unistd_64.h | 21 +++ linux-headers/asm-s390/kvm.h | 5 +- linux-headers/asm-s390/unistd_32.h | 43 +++++ linux-headers/asm-s390/unistd_64.h | 24 +++ linux-headers/asm-x86/kvm.h | 1 + linux-headers/asm-x86/unistd_32.h | 40 +++++ linux-headers/asm-x86/unistd_64.h | 10 ++ linux-headers/asm-x86/unistd_x32.h | 10 ++ linux-headers/linux/kvm.h | 15 +- linux-headers/linux/mman.h | 4 + linux-headers/linux/psci.h | 7 + linux-headers/linux/psp-sev.h | 18 +- linux-headers/linux/vfio.h | 4 + linux-headers/linux/vfio_ccw.h | 12 ++ 36 files changed, 907 insertions(+), 144 deletions(-) create mode 100644 linux-headers/asm-arm64/sve_context.h
include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h +10 -5
@@ -57,7 +57,8 @@#define PVRDMA_ROCEV1_VERSION 17#define PVRDMA_ROCEV2_VERSION 18 -#define PVRDMA_VERSION PVRDMA_ROCEV2_VERSION +#define PVRDMA_PPN64_VERSION 19 +#define PVRDMA_VERSION PVRDMA_PPN64_VERSION#define PVRDMA_BOARD_ID 1#define PVRDMA_REV_ID 1
@@ -279,8 +280,10 @@ struct pvrdma_device_shared_region {/* W: Async ring page info. */ struct pvrdma_ring_page_info cq_ring_pages;/* W: CQ ring page info. */ -uint32_t uar_pfn;/* W: UAR pageframe. */ -uint32_t pad2;/* Pad to 8-byte align. */ +union { +uint32_t uar_pfn;/* W: UAR pageframe. */ +uint64_t uar_pfn64;/* W: 64-bit UAR page frame. */ + };struct pvrdma_device_caps caps;/* R: Device capabilities. */ };
@@ -411,8 +414,10 @@ struct pvrdma_cmd_query_pkey_resp {struct pvrdma_cmd_create_uc {struct pvrdma_cmd_hdr hdr; -uint32_t pfn;/* UAR page frame number */ -uint8_t reserved[4 ]; +union { +uint32_t pfn;/* UAR page frame number */ +uint64_t pfn64;/* 64-bit UAR page frame number */ + }; };struct pvrdma_cmd_create_uc_resp {
include/standard-headers/drm/drm_fourcc.h +113 -1
166 lines not on this page · raw message
include/standard-headers/linux/ethtool.h +38 -10
86 lines not on this page · raw message
include/standard-headers/linux/input-event-codes.h +7 -2
@@ -439,10 +439,12 @@#define KEY_TITLE 0x171#define KEY_SUBTITLE 0x172#define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174/* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN#define KEY_MODE 0x175#define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177/* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO#define KEY_PC 0x178/* Media Select Computer */ #define KEY_TV 0x179/* Media Select TV */ #define KEY_TV2 0x17a/* Media Select Cable */
@@ -604,6 +606,7 @@#define KEY_SCREENSAVER 0x245/* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246/* Listening Voice Command */ #define KEY_ASSISTANT 0x247/* AL Context-aware desktop assistant */ +#define KEY_KBD_LAYOUT_NEXT 0x248/* AC Next Keyboard Layout Select */ #define KEY_BRIGHTNESS_MIN 0x250/* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251/* Set Brightness to Maximum */
@@ -716,6 +719,8 @@* the situation described above. */ #define REL_RESERVED 0x0a +#define REL_WHEEL_HI_RES 0x0b +#define REL_HWHEEL_HI_RES 0x0c#define REL_MAX 0x0f#define REL_CNT (REL_MAX+1)
include/standard-headers/linux/input.h +5 -1
@@ -23,13 +23,17 @@*/ struct input_event { -#if (HOST_LONG_BITS !=32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) +#if (HOST_LONG_BITS !=32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)struct timeval time;#define input_event_sec time.tv_sec#define input_event_usec time.tv_usec#else unsigned long __sec; +#if defined(__sparc__) && defined(__arch64__) +unsigned int __usec; +#else unsigned long __usec; +#endif #define input_event_sec __sec#define input_event_usec __usec#endif
include/standard-headers/linux/pci_regs.h +73 -67
245 lines not on this page · raw message
include/standard-headers/linux/virtio_config.h +6 -0
@@ -78,6 +78,12 @@/* This feature indicates support for the packed virtqueue layout. */ #define VIRTIO_F_RING_PACKED 34 +/* +* This feature indicates that memory accesses by the driver and the +* device are ordered in a way described by the platform. +*/ +#define VIRTIO_F_ORDER_PLATFORM 36 +/* * Does the device support Single Root I/O Virtualization? */
include/standard-headers/linux/virtio_gpu.h +10 -2
@@ -40,8 +40,16 @@#include "standard-headers/linux/types.h" -#define VIRTIO_GPU_F_VIRGL 0 -#define VIRTIO_GPU_F_EDID 1 +/* +* VIRTIO_GPU_CMD_CTX_* +* VIRTIO_GPU_CMD_*_3D +*/ +#define VIRTIO_GPU_F_VIRGL 0 + +/* +* VIRTIO_GPU_CMD_GET_EDID +*/ +#define VIRTIO_GPU_F_EDID 1enum virtio_gpu_ctrl_type {VIRTIO_GPU_UNDEFINED =0 ,
include/standard-headers/linux/virtio_ring.h +0 -10
@@ -211,14 +211,4 @@ struct vring_packed_desc { uint16_t flags; }; -struct vring_packed { -unsigned int num; - -struct vring_packed_desc *desc; - -struct vring_packed_desc_event *driver; - -struct vring_packed_desc_event *device; -}; -#endif /* _LINUX_VIRTIO_RING_H */
include/standard-headers/rdma/vmw_pvrdma-abi.h +1 -0
@@ -78,6 +78,7 @@ enum pvrdma_wr_opcode {PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD ,PVRDMA_WR_BIND_MW ,PVRDMA_WR_REG_SIG_MR , + PVRDMA_WR_ERROR, }; enum pvrdma_wc_status {
linux-headers/asm-arm/unistd-common.h +32 -0
@@ -356,5 +356,37 @@#define __NR_statx (__NR_SYSCALL_BASE + 397)#define __NR_rseq (__NR_SYSCALL_BASE + 398)#define __NR_io_pgetevents (__NR_SYSCALL_BASE + 399) +#define __NR_migrate_pages (__NR_SYSCALL_BASE + 400) +#define __NR_kexec_file_load (__NR_SYSCALL_BASE + 401) +#define __NR_clock_gettime64 (__NR_SYSCALL_BASE + 403) +#define __NR_clock_settime64 (__NR_SYSCALL_BASE + 404) +#define __NR_clock_adjtime64 (__NR_SYSCALL_BASE + 405) +#define __NR_clock_getres_time64 (__NR_SYSCALL_BASE + 406) +#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE + 407) +#define __NR_timer_gettime64 (__NR_SYSCALL_BASE + 408) +#define __NR_timer_settime64 (__NR_SYSCALL_BASE + 409) +#define __NR_timerfd_gettime64 (__NR_SYSCALL_BASE + 410) +#define __NR_timerfd_settime64 (__NR_SYSCALL_BASE + 411) +#define __NR_utimensat_time64 (__NR_SYSCALL_BASE + 412) +#define __NR_pselect6_time64 (__NR_SYSCALL_BASE + 413) +#define __NR_ppoll_time64 (__NR_SYSCALL_BASE + 414) +#define __NR_io_pgetevents_time64 (__NR_SYSCALL_BASE + 416) +#define __NR_recvmmsg_time64 (__NR_SYSCALL_BASE + 417) +#define __NR_mq_timedsend_time64 (__NR_SYSCALL_BASE + 418) +#define __NR_mq_timedreceive_time64 (__NR_SYSCALL_BASE + 419) +#define __NR_semtimedop_time64 (__NR_SYSCALL_BASE + 420) +#define __NR_rt_sigtimedwait_time64 (__NR_SYSCALL_BASE + 421) +#define __NR_futex_time64 (__NR_SYSCALL_BASE + 422) +#define __NR_sched_rr_get_interval_time64 (__NR_SYSCALL_BASE + 423) +#define __NR_pidfd_send_signal (__NR_SYSCALL_BASE + 424) +#define __NR_io_uring_setup (__NR_SYSCALL_BASE + 425) +#define __NR_io_uring_enter (__NR_SYSCALL_BASE + 426) +#define __NR_io_uring_register (__NR_SYSCALL_BASE + 427) +#define __NR_open_tree (__NR_SYSCALL_BASE + 428) +#define __NR_move_mount (__NR_SYSCALL_BASE + 429) +#define __NR_fsopen (__NR_SYSCALL_BASE + 430) +#define __NR_fsconfig (__NR_SYSCALL_BASE + 431) +#define __NR_fsmount (__NR_SYSCALL_BASE + 432) +#define __NR_fspick (__NR_SYSCALL_BASE + 433)#endif /* _ASM_ARM_UNISTD_COMMON_H */
linux-headers/asm-arm64/kvm.h +43 -0
61 lines not on this page · raw message
linux-headers/asm-arm64/sve_context.h new file +53 -0
53 lines not on this page · raw message
linux-headers/asm-arm64/unistd.h +2 -0
@@ -17,5 +17,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_NEW_STAT +#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h>
linux-headers/asm-generic/mman-common.h +1 -3
@@ -15,9 +15,7 @@#define PROT_GROWSDOWN 0x01000000/* mprotect flag: extend change to start of growsdown vma */ #define PROT_GROWSUP 0x02000000/* mprotect flag: extend change to end of growsup vma */ -#define MAP_SHARED 0x01/* Share changes */ -#define MAP_PRIVATE 0x02/* Changes are private */ -#define MAP_SHARED_VALIDATE 0x03/* share + validate extension flags */ +/* 0x01 - 0x03 are defined in linux/mman.h */ #define MAP_TYPE 0x0f/* Mask for type of mapping */ #define MAP_FIXED 0x10/* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20/* don't use a file */
linux-headers/asm-generic/unistd.h +137 -33
317 lines not on this page · raw message
linux-headers/asm-mips/mman.h +1 -3
@@ -27,9 +27,7 @@/* * Flags for mmap */ -#define MAP_SHARED 0x001/* Share changes */ -#define MAP_PRIVATE 0x002/* Changes are private */ -#define MAP_SHARED_VALIDATE 0x003/* share + validate extension flags */ +/* 0x01 - 0x03 are defined in linux/mman.h */ #define MAP_TYPE 0x00f/* Mask for type of mapping */ #define MAP_FIXED 0x010/* Interpret addr exactly */
linux-headers/asm-mips/unistd_n32.h +30 -0
@@ -333,6 +333,36 @@#define __NR_statx (__NR_Linux + 330)#define __NR_rseq (__NR_Linux + 331)#define __NR_io_pgetevents (__NR_Linux + 332) +#define __NR_clock_gettime64 (__NR_Linux + 403) +#define __NR_clock_settime64 (__NR_Linux + 404) +#define __NR_clock_adjtime64 (__NR_Linux + 405) +#define __NR_clock_getres_time64 (__NR_Linux + 406) +#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) +#define __NR_timer_gettime64 (__NR_Linux + 408) +#define __NR_timer_settime64 (__NR_Linux + 409) +#define __NR_timerfd_gettime64 (__NR_Linux + 410) +#define __NR_timerfd_settime64 (__NR_Linux + 411) +#define __NR_utimensat_time64 (__NR_Linux + 412) +#define __NR_pselect6_time64 (__NR_Linux + 413) +#define __NR_ppoll_time64 (__NR_Linux + 414) +#define __NR_io_pgetevents_time64 (__NR_Linux + 416) +#define __NR_recvmmsg_time64 (__NR_Linux + 417) +#define __NR_mq_timedsend_time64 (__NR_Linux + 418) +#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) +#define __NR_semtimedop_time64 (__NR_Linux + 420) +#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) +#define __NR_futex_time64 (__NR_Linux + 422) +#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) +#define __NR_pidfd_send_signal (__NR_Linux + 424) +#define __NR_io_uring_setup (__NR_Linux + 425) +#define __NR_io_uring_enter (__NR_Linux + 426) +#define __NR_io_uring_register (__NR_Linux + 427) +#define __NR_open_tree (__NR_Linux + 428) +#define __NR_move_mount (__NR_Linux + 429) +#define __NR_fsopen (__NR_Linux + 430) +#define __NR_fsconfig (__NR_Linux + 431) +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433)#endif /* _ASM_MIPS_UNISTD_N32_H */
linux-headers/asm-mips/unistd_n64.h +10 -0
@@ -329,6 +329,16 @@#define __NR_statx (__NR_Linux + 326)#define __NR_rseq (__NR_Linux + 327)#define __NR_io_pgetevents (__NR_Linux + 328) +#define __NR_pidfd_send_signal (__NR_Linux + 424) +#define __NR_io_uring_setup (__NR_Linux + 425) +#define __NR_io_uring_enter (__NR_Linux + 426) +#define __NR_io_uring_register (__NR_Linux + 427) +#define __NR_open_tree (__NR_Linux + 428) +#define __NR_move_mount (__NR_Linux + 429) +#define __NR_fsopen (__NR_Linux + 430) +#define __NR_fsconfig (__NR_Linux + 431) +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433)#endif /* _ASM_MIPS_UNISTD_N64_H */
linux-headers/asm-mips/unistd_o32.h +40 -0
@@ -369,6 +369,46 @@#define __NR_statx (__NR_Linux + 366)#define __NR_rseq (__NR_Linux + 367)#define __NR_io_pgetevents (__NR_Linux + 368) +#define __NR_semget (__NR_Linux + 393) +#define __NR_semctl (__NR_Linux + 394) +#define __NR_shmget (__NR_Linux + 395) +#define __NR_shmctl (__NR_Linux + 396) +#define __NR_shmat (__NR_Linux + 397) +#define __NR_shmdt (__NR_Linux + 398) +#define __NR_msgget (__NR_Linux + 399) +#define __NR_msgsnd (__NR_Linux + 400) +#define __NR_msgrcv (__NR_Linux + 401) +#define __NR_msgctl (__NR_Linux + 402) +#define __NR_clock_gettime64 (__NR_Linux + 403) +#define __NR_clock_settime64 (__NR_Linux + 404) +#define __NR_clock_adjtime64 (__NR_Linux + 405) +#define __NR_clock_getres_time64 (__NR_Linux + 406) +#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) +#define __NR_timer_gettime64 (__NR_Linux + 408) +#define __NR_timer_settime64 (__NR_Linux + 409) +#define __NR_timerfd_gettime64 (__NR_Linux + 410) +#define __NR_timerfd_settime64 (__NR_Linux + 411) +#define __NR_utimensat_time64 (__NR_Linux + 412) +#define __NR_pselect6_time64 (__NR_Linux + 413) +#define __NR_ppoll_time64 (__NR_Linux + 414) +#define __NR_io_pgetevents_time64 (__NR_Linux + 416) +#define __NR_recvmmsg_time64 (__NR_Linux + 417) +#define __NR_mq_timedsend_time64 (__NR_Linux + 418) +#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) +#define __NR_semtimedop_time64 (__NR_Linux + 420) +#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) +#define __NR_futex_time64 (__NR_Linux + 422) +#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) +#define __NR_pidfd_send_signal (__NR_Linux + 424) +#define __NR_io_uring_setup (__NR_Linux + 425) +#define __NR_io_uring_enter (__NR_Linux + 426) +#define __NR_io_uring_register (__NR_Linux + 427) +#define __NR_open_tree (__NR_Linux + 428) +#define __NR_move_mount (__NR_Linux + 429) +#define __NR_fsopen (__NR_Linux + 430) +#define __NR_fsconfig (__NR_Linux + 431) +#define __NR_fsmount (__NR_Linux + 432) +#define __NR_fspick (__NR_Linux + 433)#endif /* _ASM_MIPS_UNISTD_O32_H */
linux-headers/asm-powerpc/kvm.h +48 -0
68 lines not on this page · raw message
linux-headers/asm-powerpc/unistd_32.h +40 -0
@@ -376,6 +376,46 @@#define __NR_pkey_mprotect 386#define __NR_rseq 387#define __NR_io_pgetevents 388 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_clock_gettime64 403 +#define __NR_clock_settime64 404 +#define __NR_clock_adjtime64 405 +#define __NR_clock_getres_time64 406 +#define __NR_clock_nanosleep_time64 407 +#define __NR_timer_gettime64 408 +#define __NR_timer_settime64 409 +#define __NR_timerfd_gettime64 410 +#define __NR_timerfd_settime64 411 +#define __NR_utimensat_time64 412 +#define __NR_pselect6_time64 413 +#define __NR_ppoll_time64 414 +#define __NR_io_pgetevents_time64 416 +#define __NR_recvmmsg_time64 417 +#define __NR_mq_timedsend_time64 418 +#define __NR_mq_timedreceive_time64 419 +#define __NR_semtimedop_time64 420 +#define __NR_rt_sigtimedwait_time64 421 +#define __NR_futex_time64 422 +#define __NR_sched_rr_get_interval_time64 423 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433#endif /* _ASM_POWERPC_UNISTD_32_H */
linux-headers/asm-powerpc/unistd_64.h +21 -0
@@ -367,6 +367,27 @@#define __NR_pkey_mprotect 386#define __NR_rseq 387#define __NR_io_pgetevents 388 +#define __NR_semtimedop 392 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433#endif /* _ASM_POWERPC_UNISTD_64_H */
linux-headers/asm-s390/kvm.h +4 -1
@@ -152,7 +152,10 @@ struct kvm_s390_vm_cpu_subfunc {__u8 pcc[16 ];/* with MSA4 */ __u8 ppno[16 ];/* with MSA5 */ __u8 kma[16 ];/* with MSA8 */ -__u8 reserved[1808 ]; +__u8 kdsa[16 ];/* with MSA9 */ +__u8 sortl[32 ];/* with STFLE.150 */ +__u8 dfltcc[32 ];/* with STFLE.151 */ +__u8 reserved[1728 ]; };/* kvm attributes for crypto */
linux-headers/asm-s390/unistd_32.h +43 -0
48 lines not on this page · raw message
linux-headers/asm-s390/unistd_64.h +24 -0
@@ -330,5 +330,29 @@#define __NR_kexec_file_load 381#define __NR_io_pgetevents 382#define __NR_rseq 383 +#define __NR_pkey_mprotect 384 +#define __NR_pkey_alloc 385 +#define __NR_pkey_free 386 +#define __NR_semtimedop 392 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433#endif /* _ASM_S390_UNISTD_64_H */
linux-headers/asm-x86/kvm.h +1 -0
@@ -381,6 +381,7 @@ struct kvm_sync_regs {#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) +#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3)#define KVM_STATE_NESTED_GUEST_MODE 0x00000001#define KVM_STATE_NESTED_RUN_PENDING 0x00000002
linux-headers/asm-x86/unistd_32.h +40 -0
@@ -384,5 +384,45 @@#define __NR_arch_prctl 384#define __NR_io_pgetevents 385#define __NR_rseq 386 +#define __NR_semget 393 +#define __NR_semctl 394 +#define __NR_shmget 395 +#define __NR_shmctl 396 +#define __NR_shmat 397 +#define __NR_shmdt 398 +#define __NR_msgget 399 +#define __NR_msgsnd 400 +#define __NR_msgrcv 401 +#define __NR_msgctl 402 +#define __NR_clock_gettime64 403 +#define __NR_clock_settime64 404 +#define __NR_clock_adjtime64 405 +#define __NR_clock_getres_time64 406 +#define __NR_clock_nanosleep_time64 407 +#define __NR_timer_gettime64 408 +#define __NR_timer_settime64 409 +#define __NR_timerfd_gettime64 410 +#define __NR_timerfd_settime64 411 +#define __NR_utimensat_time64 412 +#define __NR_pselect6_time64 413 +#define __NR_ppoll_time64 414 +#define __NR_io_pgetevents_time64 416 +#define __NR_recvmmsg_time64 417 +#define __NR_mq_timedsend_time64 418 +#define __NR_mq_timedreceive_time64 419 +#define __NR_semtimedop_time64 420 +#define __NR_rt_sigtimedwait_time64 421 +#define __NR_futex_time64 422 +#define __NR_sched_rr_get_interval_time64 423 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433#endif /* _ASM_X86_UNISTD_32_H */
linux-headers/asm-x86/unistd_64.h +10 -0
@@ -336,5 +336,15 @@#define __NR_statx 332#define __NR_io_pgetevents 333#define __NR_rseq 334 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433#endif /* _ASM_X86_UNISTD_64_H */
linux-headers/asm-x86/unistd_x32.h +10 -0
@@ -289,6 +289,16 @@#define __NR_statx (__X32_SYSCALL_BIT + 332)#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)#define __NR_rseq (__X32_SYSCALL_BIT + 334) +#define __NR_pidfd_send_signal (__X32_SYSCALL_BIT + 424) +#define __NR_io_uring_setup (__X32_SYSCALL_BIT + 425) +#define __NR_io_uring_enter (__X32_SYSCALL_BIT + 426) +#define __NR_io_uring_register (__X32_SYSCALL_BIT + 427) +#define __NR_open_tree (__X32_SYSCALL_BIT + 428) +#define __NR_move_mount (__X32_SYSCALL_BIT + 429) +#define __NR_fsopen (__X32_SYSCALL_BIT + 430) +#define __NR_fsconfig (__X32_SYSCALL_BIT + 431) +#define __NR_fsmount (__X32_SYSCALL_BIT + 432) +#define __NR_fspick (__X32_SYSCALL_BIT + 433)#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
linux-headers/linux/kvm.h +13 -2
@@ -986,8 +986,13 @@ struct kvm_ppc_resize_hpt {#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163#define KVM_CAP_EXCEPTION_PAYLOAD 164#define KVM_CAP_ARM_VM_IPA_SIZE 165 -#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 +#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166/* Obsolete */ #define KVM_CAP_HYPERV_CPUID 167 +#define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 168 +#define KVM_CAP_PPC_IRQ_XIVE 169 +#define KVM_CAP_ARM_SVE 170 +#define KVM_CAP_ARM_PTRAUTH_ADDRESS 171 +#define KVM_CAP_ARM_PTRAUTH_GENERIC 172#ifdef KVM_CAP_IRQ_ROUTING
@@ -1145,6 +1150,7 @@ struct kvm_dirty_tlb {#define KVM_REG_SIZE_U256 0x0050000000000000ULL#define KVM_REG_SIZE_U512 0x0060000000000000ULL#define KVM_REG_SIZE_U1024 0x0070000000000000ULL +#define KVM_REG_SIZE_U2048 0x0080000000000000ULLstruct kvm_reg_list {__u64 n;/* number of regs */
@@ -1211,6 +1217,8 @@ enum kvm_device_type {#define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_ITS,#define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS + KVM_DEV_TYPE_XIVE, +#define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_MAX, };
@@ -1434,12 +1442,15 @@ struct kvm_enc_region {#define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state)#define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) -/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT */ +/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */ #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)/* Available with KVM_CAP_HYPERV_CPUID */ #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2) +/* Available with KVM_CAP_ARM_SVE */ +#define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int) +/* Secure Encrypted Virtualization command */ enum sev_cmd_id {/* Guest initialization commands */
linux-headers/linux/mman.h +4 -0
@@ -12,6 +12,10 @@#define OVERCOMMIT_ALWAYS 1#define OVERCOMMIT_NEVER 2 +#define MAP_SHARED 0x01/* Share changes */ +#define MAP_PRIVATE 0x02/* Changes are private */ +#define MAP_SHARED_VALIDATE 0x03/* share + validate extension flags */ +/* * Huge page size encoding when MAP_HUGETLB is specified, and a huge page * size other than the default is desired. See hugetlb_encode.h.
linux-headers/linux/psci.h +7 -0
@@ -49,8 +49,11 @@#define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10)#define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) +#define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15) +#define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18)#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) +#define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18)/* PSCI v0.2 power state encoding for CPU_SUSPEND function */ #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff
@@ -97,6 +100,10 @@#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) +#define PSCI_1_0_OS_INITIATED BIT(0) +#define PSCI_1_0_SUSPEND_MODE_PC 0 +#define PSCI_1_0_SUSPEND_MODE_OSI 1 +/* PSCI return values (inclusive of all PSCI versions) */ #define PSCI_RET_SUCCESS 0#define PSCI_RET_NOT_SUPPORTED -1
linux-headers/linux/psp-sev.h +14 -4
@@ -6,8 +6,7 @@* * Author: Brijesh Singh <[email protected]> * -* SEV spec 0.14 is available at: -* http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf +* SEV API specification is available at: https://developer.amd.com/sev/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -30,7 +29,8 @@ enum {SEV_PDH_GEN ,SEV_PDH_CERT_EXPORT ,SEV_PEK_CERT_IMPORT , -SEV_GET_ID , +SEV_GET_ID ,/* This command is deprecated, use SEV_GET_ID2 */ +SEV_GET_ID2 , SEV_MAX, };
@@ -125,7 +125,7 @@ struct sev_user_data_pdh_cert_export { } __attribute__((packed));/** -* struct sev_user_data_get_id - GET_ID command parameters +* struct sev_user_data_get_id - GET_ID command parameters (deprecated) * * @socket1: Buffer to pass unique ID of first socket * @socket2: Buffer to pass unique ID of second socket
@@ -135,6 +135,16 @@ struct sev_user_data_get_id {__u8 socket2[64 ];/* Out */ } __attribute__((packed)); +/** +* struct sev_user_data_get_id2 - GET_ID command parameters +* @address: Buffer to store unique ID +* @length: length of the unique ID +*/ +struct sev_user_data_get_id2 { +__u64 address;/* In */ +__u32 length;/* In/Out */ +} __attribute__((packed)); +/** * struct sev_issue_cmd - SEV ioctl parameters *
linux-headers/linux/vfio.h +4 -0
@@ -353,6 +353,10 @@ struct vfio_region_gfx_edid {#define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2 }; +#define VFIO_REGION_TYPE_CCW (2) +/* ccw sub-types */ +#define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1) +/* * 10de vendor sub-type *
linux-headers/linux/vfio_ccw.h +12 -0
@@ -12,6 +12,7 @@#include <linux/types.h> +/* used for START SUBCHANNEL, always present */ struct ccw_io_region {#define ORB_AREA_SIZE 12__u8 orb_area[ORB_AREA_SIZE ];
@@ -22,4 +23,15 @@ struct ccw_io_region {__u32 ret_code; } __attribute__((packed)); +/* +* used for processing commands that trigger asynchronous actions +* Note: this is controlled by a capability +*/ +#define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0) +#define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1) +struct ccw_cmd_region { +__u32 command; +__u32 ret_code; +} __attribute__((packed)); +#endif
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 4 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Signed-off-by Cornelia Huck <[email protected]>---
[...]
Quoted 4 lines
#define
__NR_mq_notify184
__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)#define__NR_mq_getsetattr185
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 10 lines
linux-headers/asm-generic/unistd.h +3
-1@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)
[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
It seems this commit introduce a regression on mips32:
CC mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)
return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \
^./linux-user/syscall.c:769:1: note: in expansion of macro 'safe_syscall4'
safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, ^~~~~~~~~~~~~./linux-user/syscall.c:697:25: note: each undeclared identifier is reported only once for each function it appears in
return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \
^./linux-user/syscall.c:769:1: note: in expansion of macro 'safe_syscall4'
safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, ^~~~~~~~~~~~~./linux-user/syscall.c:770:45: error: control reaches end of non-void function [-Werror=return-type]
unsigned, nsops, const struct timespec *, timeout)
^./linux-user/syscall.c:695:61: note: in definition of macro 'safe_syscall4'
static type safe_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
^~~~~cc1: all warnings being treated as errors ./rules.mak:69: recipe for target 'linux-user/syscall.o' failed make[1]: *** [linux-user/syscall.o] Error 1 Makefile:458: recipe for target 'subdir-mipsel-linux-user' failed
make: *** [subdir-mipsel-linux-user] Error 2
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 6 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 4 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Signed-off-by Cornelia Huck <[email protected]>---
[...]
Quoted 8 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 8 lines
#define
__NR_mq_notify184
__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)#define__NR_mq_getsetattr185linux-headers/asm-generic/unistd.h +1
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32
Eww. It seems only aarch64 sets __ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.
Quoted 10 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 7 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \
So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Does this need to be escaped somehow?
Quoted 23 lines
^
./linux-user/syscall.c:769:1: note: in expansion of macro 'safe_syscall4'
safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, ^~~~~~~~~~~~~./linux-user/syscall.c:697:25: note: each undeclared identifier is reported only once for each function it appears inreturn safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \ ^
./linux-user/syscall.c:769:1: note: in expansion of macro 'safe_syscall4'
safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, ^~~~~~~~~~~~~./linux-user/syscall.c:770:45: error: control reaches end of non-void function [-Werror=return-type]
unsigned, nsops, const struct timespec *, timeout)
^./linux-user/syscall.c:695:61: note: in definition of macro 'safe_syscall4'static type safe_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ^~~~~cc1: all warnings being treated as errors ./rules.mak:69: recipe for target '
linux-user/syscall.o' failed make[1]: *** [linux-user/syscall.o] Error 1 Makefile:458: recipe for target 'subdir-mipsel-linux-user' failed
make: *** [subdir-mipsel-linux-user] Error 2
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 33 lines · Cornelia Huck
Quoted 6 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 4 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Signed-off-by Cornelia Huck <[email protected]>---
[...]
Quoted 8 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 8 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185linux-headers/asm-generic/unistd.h +1
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 12 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
It seems this commit introduce a regression on mips32:
Quoted 9 lines
Quoted 5 lines
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
linux-user assumes it is present if __NR_msgsnd is present.
Thanks,
Laurent
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 40 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 39 lines · Cornelia Huck
Quoted 6 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 4 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Signed-off-by Cornelia Huck <[email protected]>---
[...]
Quoted 8 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 8 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185linux-headers/asm-generic/unistd.h +1
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 17 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \
Quoted 5 lines
Quoted 3 lines
So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
linux-user assumes it is present if
__NR_msgsndis present.
Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 11 lines · Cornelia Huck
Quoted 7 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 2 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Signed-off-by Cornelia Huck <[email protected]>---
[...]
Review __SC_COMP(__NR_msgsnd, sys_msgsnd,
Quoted 4 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185(quoted diff) +0
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd,
compat_sys_msgsnd)
Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Quoted 4 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 4 lines
linux-headers/asm-generic/unistd.h +1
-0__SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 10 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 7 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Quoted 7 lines
Quoted 1 line
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Hi, Cornelia.
Thanks for your involving into this issue!
It could be that (not-originating-from-MIPS) kernel commit:
https://github.com/torvalds/linux/commit/1a787fc5ba18ac767e635c58d06a0b46876184e3
made a mess with system call availability for MIPS (I will forward this to MIPS kernel maintainer Paul Burton). My impression is that this was not intentional, and is a temporary instability of kernel interface.
However, I think that QEMU nevertheless should not make the assumption that if __NR_MSGSND, than semtimedop() is present. It could be true, but it is still just self-imposed belief in QEMU, kernel never guarantied such things.
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
As a side note, perhaps we shoul update kernel headers only off of stable kernel releases.
Regards,
Aleksandar
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Hello, Paul.
Quoted 14 lines · Aleksandar Markovic
Quoted 11 lines · Cornelia Huck
Quoted 7 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 2 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Signed-off-by Cornelia Huck <[email protected]>---
[...]
Review __SC_COMP(__NR_msgsnd, sys_msgsnd,
Quoted 4 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185(quoted diff) +0
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd,
compat_sys_msgsnd)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
Quoted 4 lines
linux-headers/asm-generic/unistd.h +1
-0__SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=
32
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 21 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Quoted 7 lines
Quoted 1 line
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Quoted 7 lines
Hi, Cornelia.
Thanks for your involving into this issue!
It could be that (not-originating-from-MIPS) kernel commit:
https://github.com/torvalds/linux/commit/1a787fc5ba18ac767e635c58d06a0b46876184e3
Quoted 2 lines
made a mess with system call availability for MIPS (I will forward this
to MIPS kernel maintainer Paul Burton). My impression is that this was not intentional, and is a temporary instability of kernel interface.
Quoted 2 lines
However, I think that QEMU nevertheless should not make the assumption
that if __NR_MSGSND, than semtimedop() is present. It could be true, but it is still just self-imposed belief in QEMU, kernel never guarantied such things.
Quoted 2 lines
The alternative way of invoking via IPCV6 (else part of “ifdef
__NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Quoted 2 lines
As a side note, perhaps we shoul update kernel headers only off of stable
kernel releases.
Quoted 4 lines
Regards,
Aleksandar
It looks that for some reason availability of some system calls (for example, semtimedop()) vanished for MIPS32, the reason being some third-party commits modified the content of key kernel headers.
Could you perhaps take a look, and offer your judgement?
Thanks in advance,
Aleksandar
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Aleksandar MarkovicQuoted 62 lines · Aleksandar Markovic
Quoted 11 lines · Cornelia Huck
Quoted 7 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 2 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Signed-off-by Cornelia Huck <[email protected]>---
[...]
Review __SC_COMP(__NR_msgsnd, sys_msgsnd,
Quoted 4 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185(quoted diff) +0
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd,
compat_sys_msgsnd)Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Quoted 4 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 4 lines
linux-headers/asm-generic/unistd.h +1
-0__SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 10 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 7 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Quoted 7 lines
Quoted 1 line
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Hi, Cornelia.
Thanks for your involving into this issue!
Quoted 7 lines
It could be that (not-originating-from-MIPS) kernel commit:
https://github.com/torvalds/linux/commit/1a787fc5ba18ac767e635c58d06a0b46876184e3
made a mess with system call availability for MIPS (I will forward this to MIPS kernel maintainer Paul Burton). My impression is that this was not intentional, and is a temporary instability of kernel interface.
I think this stems from 2038 time bomb work. Eventually they want it to be possible to build non-legacy kernels that don't expose time32 to the outside world. As part of that new system calls are being introduced where needed. The IPC syscall which orignally multiplexed a bunch of these operations on some systems would eventually be potentially phased out.
Quoted 7 lines
However, I think that QEMU nevertheless should not make the assumption that if
__NR_MSGSND, thansemtimedop()is present. It could be true, but it is still just self-imposed belief in QEMU, kernel never guarantied such things.The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Yeah I think #ifndef __NR_ipc would work for now. It shouldn't affect architectures that never had the IPC call.
Quoted 2 lines
As a side note, perhaps we shoul update kernel headers only off of stable kernel releases.
I guess that's a part of the tension for supporting new kernel APIs quickly. At least 5.2-rc1 wasn't a random tree - you would expect the external facing ABI to be stable after the merge window closed. It would be nice to know what new features were being exposed though.
Quoted 3 lines
Regards,
Aleksandar
--
Alex Bennée
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Aleksandar MarkovicQuoted 62 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
Quoted 11 lines · Cornelia Huck
Quoted 7 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 2 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Signed-off-by Cornelia Huck <[email protected]>---
[...]
Review __SC_COMP(__NR_msgsnd, sys_msgsnd,
Quoted 4 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185(quoted diff) +0
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd,
compat_sys_msgsnd)Quoted 30 lines
Quoted 30 lines
Quoted 29 lines
Quoted 4 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 4 lines
linux-headers/asm-generic/unistd.h +1
-0__SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 10 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 7 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Quoted 7 lines
Quoted 1 line
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Hi, Cornelia.
Thanks for your involving into this issue!
Quoted 7 lines
It could be that (not-originating-from-MIPS) kernel commit:
https://github.com/torvalds/linux/commit/1a787fc5ba18ac767e635c58d06a0b46876184e3
made a mess with system call availability for MIPS (I will forward this to MIPS kernel maintainer Paul Burton). My impression is that this was not intentional, and is a temporary instability of kernel interface.
I don't think that's the problematic commit; that one seems to be a follow-up on c8ce48f06503 ("asm-generic: Make time32 syscall numbers optional") for tools usage (we sync from the 'normal' headers).
The stated intention of the asm-generic commit is to keep 32 bit architectures working as before via defining __ARCH_WANT_TIME32_SYSCALLS, but it seems that was not done for mips (but it should, right?)
Quoted 3 lines
However, I think that QEMU nevertheless should not make the assumption that if
__NR_MSGSND, thansemtimedop()is present. It could be true, but it is still just self-imposed belief in QEMU, kernel never guarantied such things.
I'm not too familiar with that family of syscalls; is there a better way to check for syscall availability here?
Quoted 3 lines
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
If my assumption above (mips skipped by accident) is correct, we need to fix the kernel headers instead :/ -- unless we want to add a temporary build fix.
Quoted 2 lines
As a side note, perhaps we shoul update kernel headers only off of stable kernel releases.
In the past, we have even updated the kernel headers against non-mainline (kvm) versions :)
Breakage here seems to be rare (and if this is a real kernel interface bug, it'd be a good thing that we caught it); I believe getting support for new features into QEMU quicker makes that a good trade-off.
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 24 lines · Cornelia Huck
Quoted 20 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
Quoted 11 lines · Cornelia Huck
Quoted 7 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 6 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 2 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Signed-off-by Cornelia Huck <[email protected]>---
[...]
Review __SC_COMP(__NR_msgsnd, sys_msgsnd,
Quoted 4 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185(quoted diff) +0
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd,
compat_sys_msgsnd)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review __SC_COMP(__NR_msgsnd, sys_msgsnd, · line 570
Quoted 4 lines
(quoted diff) +1
-0__SYSCALL(__NR_semget, sys_semget) #define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=
32
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and
the
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
second condition probably catches others but not mipsel.
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop,
compat_sys_semtimedop)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review __SC_COMP(__NR_msgsnd, sys_msgsnd, · line 572
Quoted 1 line
(quoted diff) +1
-0+__SC_COMP(__NR_semtimedop, sys_semtimedop,
sys_semtimedop_time32)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
(quoted diff) +1
-0+#endif #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop'
undeclared
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(first use in this function)
return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4);
\
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
So, we unconditionally deal with this syscall, i.e. we assume it
is
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
always present? (I'm not sure of the logic in linux-user code.)
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on
the
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
kernel side?
Hi, Cornelia.
Thanks for your involving into this issue!
It could be that (not-originating-from-MIPS) kernel commit:
https://github.com/torvalds/linux/commit/1a787fc5ba18ac767e635c58d06a0b46876184e3
Quoted 2 lines
Quoted 2 lines
made a mess with system call availability for MIPS (I will forward this
to
Quoted 13 lines
Quoted 2 lines
MIPS kernel maintainer Paul Burton). My impression is that this was not intentional, and is a temporary instability of kernel interface.
I don't think that's the problematic commit; that one seems to be a follow-up on
c8ce48f06503("asm-generic: Make time32 syscall numbers optional") for tools usage (we sync from the 'normal' headers).The stated intention of the asm-generic commit is to keep 32 bit architectures working as before via defining
__ARCH_WANT_TIME32_SYSCALLS, but it seems that was not done for mips (but it should, right?)Quoted 1 line
However, I think that QEMU nevertheless should not make the assumption
that
Quoted 1 line
Quoted 1 line
if
__NR_MSGSND, thansemtimedop()is present. It could be true, but it
is
Quoted 1 line
Quoted 1 line
still just self-imposed belief in QEMU, kernel never guarantied such
things.
Quoted 4 lines
I'm not too familiar with that family of syscalls; is there a better way to check for syscall availability here?
Quoted 9 lines
Quoted 3 lines
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
If my assumption above (mips skipped by accident) is correct, we need to fix the kernel headers instead :/ -- unless we want to add a temporary build fix.
Quoted 1 line
As a side note, perhaps we shoul update kernel headers only off of
stable
Quoted 7 lines
Quoted 1 line
kernel releases.
In the past, we have even updated the kernel headers against non-mainline (kvm) versions :)
Breakage here seems to be rare (and if this is a real kernel interface bug, it'd be a good thing that we caught it);
Definitely a good thing. I think it is fair to say that you found three or even more bugs, in two separate software projects, and all of this using a single patch only. :-o Perhaps you should do it more often. ;)
Quoted 2 lines
I believe getting support
for new features into QEMU quicker makes that a good trade-off.
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Aleksandar MarkovicQuoted 3 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
I tried to do that so that we have at least a workaround for now; but this fails building on my x86 laptop (the safe_syscall6 for ipc complains about missing __NR_ipc). Maybe I'm holding it wrong (should that be conditional on the host?), but I think that really needs to be done by the mips maintainers...
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Quoted 6 lines
I tried to do that so that we have at least a workaround for now; but this fails building on my x86 laptop (the
safe_syscall6for ipc complains about missing__NR_ipc). Maybe I'm holding it wrong (should that be conditional on the host?), but I think that really needs to be done by the mips maintainers...
Perhaps a simple workaround could be:
linux-user/syscall.c +18 -8
@@ -761,14 +761,8 @@ safe_syscall2(int, nanosleep, const struct timespec *, req, safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags, const struct timespec *, req, struct timespec *, rem)#endif -#ifdef __NR_msgsnd -safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, - int, flags) -safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, - long, msgtype, int, flags) -safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, - unsigned, nsops, const struct timespec *, timeout) -#else + +#ifdef __NR_ipc/* This host kernel architecture uses a single ipc syscall; fake up * wrappers for the sub-operations to hide this implementation detail. * Annoyingly we can't include linux/ipc.h to get the constant definitions
@@ -783,14 +777,30 @@ safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,safe_syscall6 (int, ipc, int, call, long, first, long, second, long, third, void *, ptr, long, fifth) +#endif + +#ifdef __NR_msgsnd +safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, + int, flags) +#else static int safe_msgsnd (int msgid,const void *msgp,size_t sz,int flags) {return safe_ipc (Q_IPCCALL (0 ,Q_MSGSND ), msgid, sz, flags, (void *)msgp,0 ); } +#endif +#ifdef __NR_msgrcv +safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, + long, msgtype, int, flags) +#else static int safe_msgrcv (int msgid,void *msgp,size_t sz,long type,int flags) {return safe_ipc (Q_IPCCALL (1 ,Q_MSGRCV ), msgid, sz, flags, msgp, type); } +#endif +#ifdef __NR_semtimedop +safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, + unsigned, nsops, const struct timespec *, timeout) +#else static int safe_semtimedop (int semid,struct sembuf *tsops,unsigned nsops,const struct timespec *timeout) {
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 60 lines · Laurent Vivier
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Quoted 6 lines
I tried to do that so that we have at least a workaround for now; but this fails building on my x86 laptop (the
safe_syscall6for ipc complains about missing__NR_ipc). Maybe I'm holding it wrong (should that be conditional on the host?), but I think that really needs to be done by the mips maintainers...Perhaps a simple workaround could be:
linux-user/syscall.c +13
-8@@ -761,14 +761,8 @@ safe_syscall2(int, nanosleep, const struct timespec *, req, safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags, const struct timespec *, req, struct timespec *, rem)#endif -#ifdef __NR_msgsnd -safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, - int, flags) -safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, - long, msgtype, int, flags) -safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, - unsigned, nsops, const struct timespec *, timeout) -#else + +#ifdef __NR_ipc/* This host kernel architecture uses a single ipc syscall; fake up * wrappers for the sub-operations to hide this implementation detail. * Annoyingly we can't include linux/ipc.h to get the constant definitions @@ -783,14 +777,30 @@ safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,safe_syscall6 (int, ipc, int, call, long, first, long, second, long, third, void *, ptr, long, fifth) +#endif + +#ifdef __NR_msgsnd +safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, + int, flags) +#else static int safe_msgsnd (int msgid,const void *msgp,size_t sz,int flags) {return safe_ipc (Q_IPCCALL (0 ,Q_MSGSND ), msgid, sz, flags, (void *)msgp,0 ); } +#endif +#ifdef __NR_msgrcv +safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, + long, msgtype, int, flags) +#else static int safe_msgrcv (int msgid,void *msgp,size_t sz,long type,int flags) {
linux-user/syscall.c safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, · line 806
Quoted 10 lines
linux-user/syscall.c +5
-0return safe_ipc (Q_IPCCALL (1 ,Q_MSGRCV ), msgid, sz, flags, msgp, type); } +#endif +#ifdef __NR_semtimedop +safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, + unsigned, nsops, const struct timespec *, timeout) +#else static int safe_semtimedop (int semid,struct sembuf *tsops,unsigned nsops,const struct timespec *timeout) {
Works for me!
I have no idea if this is the proper fix, but this fix my test setup. Can you send a proper patch?
Thanks :)
Phil.
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Laurent VivierQuoted 39 lines · Laurent Vivier
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Quoted 6 lines
I tried to do that so that we have at least a workaround for now; but this fails building on my x86 laptop (the
safe_syscall6for ipc complains about missing__NR_ipc). Maybe I'm holding it wrong (should that be conditional on the host?), but I think that really needs to be done by the mips maintainers...Perhaps a simple workaround could be:
linux-user/syscall.c +2
-8@@ -761,14 +761,8 @@ safe_syscall2(int, nanosleep, const struct timespec *, req, safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags, const struct timespec *, req, struct timespec *, rem)#endif -#ifdef __NR_msgsnd -safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, - int, flags) -safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, - long, msgtype, int, flags) -safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, - unsigned, nsops, const struct timespec *, timeout) -#else + +#ifdef __NR_ipc/* This host kernel architecture uses a single ipc syscall; fake up * wrappers for the sub-operations to hide this implementation detail. * Annoyingly we can't include linux/ipc.h to get the constant definitions
linux-user/syscall.c safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, · line 780
Quoted 4 lines
linux-user/syscall.c +1
-0@@ -783,14 +777,30 @@ safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,safe_syscall6 (int, ipc, int, call, long, first, long, second, long, third, void *, ptr, long, fifth) +#endif
*sigh* almost but for arches we get complaints when the ipc syscall is
defined but not used....
https://app.shippable.com/github/stsquad/qemu/runs/835/summary/console
Quoted 16 lines
linux-user/syscall.c +10
-0+ +#ifdef __NR_msgsnd +safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, + int, flags) +#else static int safe_msgsnd (int msgid,const void *msgp,size_t sz,int flags) {return safe_ipc (Q_IPCCALL (0 ,Q_MSGSND ), msgid, sz, flags, (void *)msgp,0 ); } +#endif +#ifdef __NR_msgrcv +safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, + long, msgtype, int, flags) +#else static int safe_msgrcv (int msgid,void *msgp,size_t sz,long type,int flags) {
linux-user/syscall.c safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, · line 806
Quoted 10 lines
linux-user/syscall.c +5
-0return safe_ipc (Q_IPCCALL (1 ,Q_MSGRCV ), msgid, sz, flags, msgp, type); } +#endif +#ifdef __NR_semtimedop +safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, + unsigned, nsops, const struct timespec *, timeout) +#else static int safe_semtimedop (int semid,struct sembuf *tsops,unsigned nsops,const struct timespec *timeout) {
--
Alex Bennée
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
Quoted 43 lines · Alex Bennée
Quoted 40 lines · Laurent Vivier
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Wed, 22 May 2019 15:22:23 +0200 Aleksandar Markovic…
The alternative way of invoking via IPCV6 (else part of “ifdef __NR_MSGSND”) should work for MIPS in the present stage of headers and kernel.
Quoted 6 lines
I tried to do that so that we have at least a workaround for now; but this fails building on my x86 laptop (the
safe_syscall6for ipc complains about missing__NR_ipc). Maybe I'm holding it wrong (should that be conditional on the host?), but I think that really needs to be done by the mips maintainers...Perhaps a simple workaround could be:
linux-user/syscall.c +2
-8@@ -761,14 +761,8 @@ safe_syscall2(int, nanosleep, const struct timespec *, req, safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags, const struct timespec *, req, struct timespec *, rem)#endif -#ifdef __NR_msgsnd -safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz, - int, flags) -safe_syscall5(int, msgrcv, int, msgid, void *, msgp, size_t, sz, - long, msgtype, int, flags) -safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, - unsigned, nsops, const struct timespec *, timeout) -#else + +#ifdef __NR_ipc/* This host kernel architecture uses a single ipc syscall; fake up * wrappers for the sub-operations to hide this implementation detail. * Annoyingly we can't include linux/ipc.h to get the constant definitions @@ -783,14 +777,30 @@ safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops,
Quoted 8 lines
linux-user/syscall.c safe_syscall4(int, semtimedop, int, semid, struct sembuf *, tsops, · line 780
Quoted 3 lines
linux-user/syscall.c +1
-0safe_syscall6 (int, ipc, int, call, long, first, long, second, long, third, void *, ptr, long, fifth) +#endif *sigh* almost but for arches we get complaints when the ipc syscall is
defined but not used....https://app.shippable.com/github/stsquad/qemu/runs/835/summary/console
Yes, I've know.
I have sent a patch with an updated #if:
#if !defined(__NR_msgsnd) || !defined(__NR_msgrcv) || !defined(__NR_semtimedop)
And it should work on any arch.
Thanks,
Laurent
Re: [Qemu-devel] [PULL v3 47/55] linux headers: update against Linux 5.2-rc1
In reply to Cornelia HuckQuoted 47 lines · Cornelia Huck
Quoted 44 lines · On Wed, 22 May 2019 14:10:39 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 42 lines · Cornelia Huck
Quoted 6 lines · On Wed, 22 May 2019 13:47:25 +0200 Philippe Mathieu-Daudé <[email protected]>…
Quoted 4 lines · Cornelia Huck
commit
a188339ca5a396acc588e5851ed7e19f66b0ebd9Signed-off-by Cornelia Huck <[email protected]>---
[...]
Quoted 8 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 570
Quoted 8 lines
#define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185linux-headers/asm-generic/unistd.h +1
-0@@ -536,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 Eww. It seems only aarch64 sets
__ARCH_WANT_TIME32_SYSCALLS, and the second condition probably catches others but not mipsel.Quoted 10 lines
linux-headers/asm-generic/unistd.h __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) · line 575
Quoted 6 lines
linux-headers/asm-generic/unistd.h +2
-1#define __NR_semtimedop 192 -__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) +__SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)[...]
https://app.shippable.com/github/qemu/qemu/runs/1703/summary/console
Quoted 7 lines
It seems this commit introduce a regression on mips32:
CC
mipsel-linux-user/linux-user/syscall.o./linux-user/syscall.c: In function 'safe_semtimedop':./linux-user/syscall.c:697:25: error: '__NR_semtimedop' undeclared (first use in this function)return safe_syscall(__NR_##name, arg1, arg2, arg3, arg4); \So, we unconditionally deal with this syscall, i.e. we assume it is always present? (I'm not sure of the logic in linux-user code.)
Quoted 6 lines
Quoted 1 line
linux-user assumes it is present if
__NR_msgsndis present.Hm. The kernel change seems to break that assumption. Does anyone with mips knowledge have an idea whether that was intentional (and the linux-user code needs to be changed), or whether that's an issue on the kernel side?
Well as far as I understand it the kernel has been introducing new individual syscalls across the board for all architectures (and may eventually allow kernels to be built without the legacy stuff). Meanwhile on the backend some architectures have never had a IPC syscall to multiplex these things.
We could do:
modified linux-user/syscall.c
@@ -761,7 +761,7 @@ safe_syscall2(int, nanosleep, const struct timespec *, req,
safe_syscall4(int, clock_nanosleep, const clockid_t, clock, int, flags,
const struct timespec *, req, struct timespec *, rem)
#endif
-#ifdef __NR_msgsnd
+#ifndef __NR_ipc
safe_syscall4(int, msgsnd, int, msgid, const void *, msgp, size_t, sz,
int, flags)
which would revert to the old behaviour for systems that had the ipc multiplexer while still using individual system calls for the systems that never had it. Chatting to the kernel devs on IRC also makes me wonder if our mapping between the single syscalls and the multiplexer might be a bit naive. The IPC_64 flags was mentioned as behaving differently on the new individual syscalls but I haven't been able to track down exactly what that difference is yet.
--
Alex Bennée
Peter Maydell
AppliedQuoted 15 lines · Cornelia Huck
[Third time's the charm, I hope. Split out the change in the update headers script and copy to the right directory. Sending only these two patches; the rest are unchanged save for the commit ids.]
The following changes since commit
d8276573da58e8ce78dab8c46dd660efd664bcb7:Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190510' into staging (2019-05-16 13:15:08 +0100)
are available in the Git repository at:
https://github.com/cohuck/qemu tags/s390x-20190521-3
for you to fetch changes up to
c657e84faee48d6ab36665da5a008b8f0649593d:
Quoted 9 lines
s390x/cpumodel: wire up 8561 and 8562 as gen15 machines (2019-05-21 16:59:16 +0200)
----------------------------------------------------------------
s390x update:
- have the bios tolerate bootmap signature entries
- next chunk of vector instruction support in tcg
- a headers update against Linux 5.2-rc1
- add more facilities and gen15 machines to the cpu model
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.
-- PMM