include: update Linux headers to 4.21/5.0
PATCH 1/1 include: update Linux headers to 4.21/5.0
--- include/standard-headers/drm/drm_fourcc.h | 63 + include/standard-headers/linux/ethtool.h | 19 +- .../linux/input-event-codes.h | 17 + include/standard-headers/linux/pci_regs.h | 1 + include/standard-headers/linux/vhost_types.h | 128 ++ .../standard-headers/linux/virtio_balloon.h | 8 + include/standard-headers/linux/virtio_blk.h | 54 + .../standard-headers/linux/virtio_config.h | 3 + include/standard-headers/linux/virtio_gpu.h | 18 + include/standard-headers/linux/virtio_ring.h | 52 + linux-headers/asm-arm/unistd-common.h | 1 + linux-headers/asm-arm64/unistd.h | 1 + linux-headers/asm-generic/unistd.h | 10 +- linux-headers/asm-mips/sgidefs.h | 8 - linux-headers/asm-mips/unistd.h | 1074 +---------------- linux-headers/asm-mips/unistd_n32.h | 338 ++++++ linux-headers/asm-mips/unistd_n64.h | 334 +++++ linux-headers/asm-mips/unistd_o32.h | 374 ++++++ linux-headers/asm-powerpc/unistd.h | 389 +----- linux-headers/asm-powerpc/unistd_32.h | 381 ++++++ linux-headers/asm-powerpc/unistd_64.h | 372 ++++++ linux-headers/linux/kvm.h | 29 + linux-headers/linux/vfio.h | 92 ++ linux-headers/linux/vhost.h | 113 +- linux-headers/linux/vhost_types.h | 1 + scripts/update-linux-headers.sh | 11 + 26 files changed, 2302 insertions(+), 1589 deletions(-) create mode 100644 include/standard-headers/linux/vhost_types.h create mode 100644 linux-headers/asm-mips/unistd_n32.h create mode 100644 linux-headers/asm-mips/unistd_n64.h create mode 100644 linux-headers/asm-mips/unistd_o32.h create mode 100644 linux-headers/asm-powerpc/unistd_32.h create mode 100644 linux-headers/asm-powerpc/unistd_64.h create mode 100644 linux-headers/linux/vhost_types.h
include/standard-headers/drm/drm_fourcc.h +63 -0
@@ -29,11 +29,50 @@extern "C" {#endif +/** +* DOC: overview +* +* In the DRM subsystem, framebuffer pixel formats are described using the +* fourcc codes defined in `include/uapi/drm/drm_fourcc.h`. In addition to the +* fourcc code, a Format Modifier may optionally be provided, in order to +* further describe the buffer's format - for example tiling or compression. +* +* Format Modifiers +* ---------------- +* +* Format modifiers are used in conjunction with a fourcc code, forming a +* unique fourcc:modifier pair. This format:modifier pair must fully define the +* format and data layout of the buffer, and should be the only way to describe +* that particular buffer. +* +* Having multiple fourcc:modifier pairs which describe the same layout should +* be avoided, as such aliases run the risk of different drivers exposing +* different names for the same data format, forcing userspace to understand +* that they are aliases. +* +* Format modifiers may change any property of the buffer, including the number +* of planes and/or the required allocation size. Format modifiers are +* vendor-namespaced, and as such the relationship between a fourcc code and a +* modifier is specific to the modifer being used. For example, some modifiers +* may preserve meaning - such as number of planes - from the fourcc code, +* whereas others may not. +* +* Vendors should document their modifier usage in as much detail as +* possible, to ensure maximum compatibility across devices, drivers and +* applications. +* +* The authoritative list of format modifier codes is found in +* `include/uapi/drm/drm_fourcc.h` +*/ +#define fourcc_code (a, b, c, d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))#define DRM_FORMAT_BIG_ENDIAN (1<<31)/* format is big endian instead of little endian */ +/* Reserve 0 for the invalid format specifier */ +#define DRM_FORMAT_INVALID 0 +/* color index */ #define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ')/* [7:0] C */
@@ -111,6 +150,21 @@ extern "C" {#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y')/* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V')/* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V')/* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ + +/* +* packed YCbCr420 2x2 tiled formats +* first 64 bits will contain Y,Cb,Cr components for a 2x2 tile +*/ +/* [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ +#define DRM_FORMAT_Y0L0 fourcc_code('Y', '0', 'L', '0') +/* [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */ +#define DRM_FORMAT_X0L0 fourcc_code('X', '0', 'L', '0') + +/* [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ +#define DRM_FORMAT_Y0L2 fourcc_code('Y', '0', 'L', '2') +/* [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian */ +#define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2')/* * 2 plane RGB + A
@@ -298,6 +352,15 @@ extern "C" {*/ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) +/* +* Tiled, 16 (pixels) x 16 (lines) - sized macroblocks +* +* This is a simple tiled layout using tiles of 16x16 pixels in a row-major +* layout. For YCbCr formats Cb/Cr components are taken in such a way that +* they correspond to their 16x16 luma block. +*/ +#define DRM_FORMAT_MOD_SAMSUNG_16_16_TILE fourcc_mod_code(SAMSUNG, 2) +/* * Qualcomm Compressed Format *
include/standard-headers/linux/ethtool.h +5 -14
@@ -91,10 +91,6 @@* %ETHTOOL_GSET to get the current values before making specific * changes and then applying them with %ETHTOOL_SSET. * -* Drivers that implement set_settings() should validate all fields -* other than @cmd that are not described as read-only or deprecated, -* and must ignore all fields described as read-only. -* * Deprecated fields should be ignored by both users and drivers. */ struct ethtool_cmd {
@@ -886,7 +882,7 @@ struct ethtool_rx_flow_spec {uint32_t location; }; -/* How rings are layed out when accessing virtual functions or +/* How rings are laid out when accessing virtual functions or * offloaded queues is device specific. To allow users to do flow * steering and specify these queues the ring cookie is partitioned * into a 32bit queue index with an 8 bit virtual function id.
@@ -895,7 +891,7 @@ struct ethtool_rx_flow_spec {* devices start supporting PCIe w/ARI. However at the moment I * do not know of any devices that support this so I do not reserve * space for this at this time. If a future patch consumes the next -* byte it should be aware of this possiblity. +* byte it should be aware of this possibility. */ #define ETHTOOL_RX_FLOW_SPEC_RING 0x00000000FFFFFFFFLL#define ETHTOOL_RX_FLOW_SPEC_RING_VF 0x000000FF00000000LL
@@ -1800,14 +1796,9 @@ enum ethtool_reset_flags {* rejected. * * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt -* are not available in %ethtool_link_settings. Until all drivers are -* converted to ignore them or to the new %ethtool_link_settings API, -* for both queries and changes, users should always try -* %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick -* only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it -* succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and -* %ETHTOOL_SLINKSETTINGS (which would support drivers implementing -* either %ethtool_cmd or %ethtool_link_settings). +* are not available in %ethtool_link_settings. These fields will be +* always set to zero in %ETHTOOL_GSET reply and %ETHTOOL_SSET will +* fail if any of them is set to non-zero value. * * Users should assume that all fields not marked read-only are * writable and subject to validation by the driver. They should use
include/standard-headers/linux/input-event-codes.h +17 -0
@@ -708,6 +708,14 @@#define REL_DIAL 0x07#define REL_WHEEL 0x08#define REL_MISC 0x09 +/* +* 0x0a is reserved and should not be used in input drivers. +* It was used by HID as REL_MISC+1 and userspace needs to detect if +* the next REL_* event is correct or is just REL_MISC + n. +* We define here REL_RESERVED so userspace can rely on it and detect +* the situation described above. +*/ +#define REL_RESERVED 0x0a#define REL_MAX 0x0f#define REL_CNT (REL_MAX+1)
@@ -744,6 +752,15 @@#define ABS_MISC 0x28 +/* +* 0x2e is reserved and should not be used in input drivers. +* It was used by HID as ABS_MISC+6 and userspace needs to detect if +* the next ABS_* event is correct or is just ABS_MISC + n. +* We define here ABS_RESERVED so userspace can rely on it and detect +* the situation described above. +*/ +#define ABS_RESERVED 0x2e +#define ABS_MT_SLOT 0x2f/* MT slot being modified */ #define ABS_MT_TOUCH_MAJOR 0x30/* Major axis of touching ellipse */ #define ABS_MT_TOUCH_MINOR 0x31/* Minor axis (omit if circular) */
include/standard-headers/linux/pci_regs.h +1 -0
@@ -52,6 +52,7 @@#define PCI_COMMAND_INTX_DISABLE 0x400/* INTx Emulation Disable */ #define PCI_STATUS 0x06/* 16 bits */ +#define PCI_STATUS_IMM_READY 0x01/* Immediate Readiness */ #define PCI_STATUS_INTERRUPT 0x08/* Interrupt status */ #define PCI_STATUS_CAP_LIST 0x10/* Support Capability List */ #define PCI_STATUS_66MHZ 0x20/* Support 66 MHz PCI 2.1 bus */
include/standard-headers/linux/vhost_types.h new file +128 -0
128 lines not on this page · raw message
include/standard-headers/linux/virtio_balloon.h +8 -0
@@ -34,15 +34,23 @@#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0/* Tell before reclaiming pages */ #define VIRTIO_BALLOON_F_STATS_VQ 1/* Memory Stats virtqueue */ #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2/* Deflate balloon on OOM */ +#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3/* VQ to report free pages */ +#define VIRTIO_BALLOON_F_PAGE_POISON 4/* Guest is using page poisoning */ /* Size of a PFN in the balloon interface. */ #define VIRTIO_BALLOON_PFN_SHIFT 12 +#define VIRTIO_BALLOON_CMD_ID_STOP 0 +#define VIRTIO_BALLOON_CMD_ID_DONE 1struct virtio_balloon_config {/* Number of pages host wants Guest to give up. */ uint32_t num_pages;/* Number of pages we've actually got in balloon. */ uint32_t actual; +/* Free page report command id, readonly by guest */ +uint32_t free_page_report_cmd_id; +/* Stores PAGE_POISON if page poisoning is in use */ +uint32_t poison_val; };#define VIRTIO_BALLOON_S_SWAP_IN 0/* Amount of memory swapped in */
include/standard-headers/linux/virtio_blk.h +54 -0
78 lines not on this page · raw message
include/standard-headers/linux/virtio_config.h +3 -0
@@ -75,6 +75,9 @@*/ #define VIRTIO_F_IOMMU_PLATFORM 33 +/* This feature indicates support for the packed virtqueue layout. */ +#define VIRTIO_F_RING_PACKED 34 +/* * Does the device support Single Root I/O Virtualization? */
include/standard-headers/linux/virtio_gpu.h +18 -0
@@ -41,6 +41,7 @@#include "standard-headers/linux/types.h" #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum virtio_gpu_ctrl_type {VIRTIO_GPU_UNDEFINED =0 ,
@@ -56,6 +57,7 @@ enum virtio_gpu_ctrl_type {VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING ,VIRTIO_GPU_CMD_GET_CAPSET_INFO ,VIRTIO_GPU_CMD_GET_CAPSET , +VIRTIO_GPU_CMD_GET_EDID ,/* 3d commands */ VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -76,6 +78,7 @@ enum virtio_gpu_ctrl_type {VIRTIO_GPU_RESP_OK_DISPLAY_INFO ,VIRTIO_GPU_RESP_OK_CAPSET_INFO ,VIRTIO_GPU_RESP_OK_CAPSET , +VIRTIO_GPU_RESP_OK_EDID ,/* error responses */ VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,
@@ -291,6 +294,21 @@ struct virtio_gpu_resp_capset {uint8_t capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_cmd_get_edid { +struct virtio_gpu_ctrl_hdr hdr; +uint32_t scanout; +uint32_t padding; +}; + +/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { +struct virtio_gpu_ctrl_hdr hdr; +uint32_t size; +uint32_t padding; +uint8_t edid[1024 ]; +}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {
include/standard-headers/linux/virtio_ring.h +52 -0
68 lines not on this page · raw message
linux-headers/asm-arm/unistd-common.h +1 -0
@@ -355,5 +355,6 @@#define __NR_pkey_free (__NR_SYSCALL_BASE + 396)#define __NR_statx (__NR_SYSCALL_BASE + 397)#define __NR_rseq (__NR_SYSCALL_BASE + 398) +#define __NR_io_pgetevents (__NR_SYSCALL_BASE + 399)#endif /* _ASM_ARM_UNISTD_COMMON_H */
linux-headers/asm-arm64/unistd.h +1 -0
@@ -16,5 +16,6 @@*/ #define __ARCH_WANT_RENAMEAT +#define __ARCH_WANT_NEW_STAT#include <asm-generic/unistd.h>
linux-headers/asm-generic/unistd.h +9 -1
@@ -242,10 +242,12 @@ __SYSCALL(__NR_tee, sys_tee)/* fs/stat.c */ #define __NR_readlinkat 78 __SYSCALL(__NR_readlinkat, sys_readlinkat) +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)#define __NR3264_fstatat 79 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)#define __NR3264_fstat 80 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) +#endif /* fs/sync.c */ #define __NR_sync 81
@@ -736,9 +738,11 @@ __SYSCALL(__NR_statx, sys_statx) __SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents)#define __NR_rseq 293 __SYSCALL(__NR_rseq, sys_rseq) +#define __NR_kexec_file_load 294 +__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)#undef __NR_syscalls -#define __NR_syscalls 294 +#define __NR_syscalls 295/* * 32 bit systems traditionally used different
@@ -758,8 +762,10 @@ __SYSCALL(__NR_rseq, sys_rseq)#define __NR_ftruncate __NR3264_ftruncate#define __NR_lseek __NR3264_lseek#define __NR_sendfile __NR3264_sendfile +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)#define __NR_newfstatat __NR3264_fstatat#define __NR_fstat __NR3264_fstat +#endif #define __NR_mmap __NR3264_mmap#define __NR_fadvise64 __NR3264_fadvise64#ifdef __NR3264_stat
@@ -774,8 +780,10 @@ __SYSCALL(__NR_rseq, sys_rseq)#define __NR_ftruncate64 __NR3264_ftruncate#define __NR_llseek __NR3264_lseek#define __NR_sendfile64 __NR3264_sendfile +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)#define __NR_fstatat64 __NR3264_fstatat#define __NR_fstat64 __NR3264_fstat +#endif #define __NR_mmap2 __NR3264_mmap#define __NR_fadvise64_64 __NR3264_fadvise64#ifdef __NR3264_stat
linux-headers/asm-mips/sgidefs.h +0 -8
@@ -11,14 +11,6 @@#ifndef __ASM_SGIDEFS_H#define __ASM_SGIDEFS_H -/* -* Using a Linux compiler for building Linux seems logic but not to -* everybody. -*/ -#ifndef __linux__ -#error Use a Linux compiler or give up. -#endif -/* * Definitions for the ISA levels *
linux-headers/asm-mips/unistd.h +6 -1068
1,091 lines not on this page · raw message
linux-headers/asm-mips/unistd_n32.h new file +338 -0
338 lines not on this page · raw message
linux-headers/asm-mips/unistd_n64.h new file +334 -0
334 lines not on this page · raw message
linux-headers/asm-mips/unistd_o32.h new file +374 -0
374 lines not on this page · raw message
linux-headers/asm-powerpc/unistd.h +2 -387
280 lines not on this page · raw message
linux-headers/asm-powerpc/unistd_32.h new file +381 -0
381 lines not on this page · raw message
linux-headers/asm-powerpc/unistd_64.h new file +372 -0
372 lines not on this page · raw message
linux-headers/linux/vfio.h +92 -0
92 lines not on this page · raw message
linux-headers/linux/vhost.h +2 -111
113 lines not on this page · raw message
linux-headers/linux/vhost_types.h new file +1 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.20.1
Part of the diff is not shown here. View the raw message.
Quoted 1 line · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>
Note that in the past we just updated what we needed. That approach has some advantages as linux doesn't stand in place, so whatever renames we handle now just might have to get undone down the road.
And, it allows cherry-picking headers from netdev-next etc.
So maybe include a bit of motivation in the commit log. E.g. do you plan to do this every linux release from now on?
Quoted 27 lines
--- include/standard-headers/drm/drm_fourcc.h | 63 + include/standard-headers/linux/ethtool.h | 19 +- .../linux/input-event-codes.h | 17 + include/standard-headers/linux/pci_regs.h | 1 + include/standard-headers/linux/vhost_types.h | 128 ++ .../standard-headers/linux/virtio_balloon.h | 8 + include/standard-headers/linux/virtio_blk.h | 54 + .../standard-headers/linux/virtio_config.h | 3 + include/standard-headers/linux/virtio_gpu.h | 18 + include/standard-headers/linux/virtio_ring.h | 52 + linux-headers/asm-arm/unistd-common.h | 1 + linux-headers/asm-arm64/unistd.h | 1 + linux-headers/asm-generic/unistd.h | 10 +- linux-headers/asm-mips/sgidefs.h | 8 - linux-headers/asm-mips/unistd.h | 1074 +---------------- linux-headers/asm-mips/unistd_n32.h | 338 ++++++ linux-headers/asm-mips/unistd_n64.h | 334 +++++ linux-headers/asm-mips/unistd_o32.h | 374 ++++++ linux-headers/asm-powerpc/unistd.h | 389 +----- linux-headers/asm-powerpc/unistd_32.h | 381 ++++++ linux-headers/asm-powerpc/unistd_64.h | 372 ++++++ linux-headers/linux/kvm.h | 29 + linux-headers/linux/vfio.h | 92 ++ linux-headers/linux/vhost.h | 113 +- linux-headers/linux/vhost_types.h | 1 + scripts/update-linux-headers.sh | 11 +
Quoted 8 lines
26 files changed, 2302 insertions(+), 1589 deletions(-) create mode 100644 include/standard-headers/linux/vhost_types.h create mode 100644 linux-headers/asm-mips/unistd_n32.h create mode 100644 linux-headers/asm-mips/unistd_n64.h create mode 100644 linux-headers/asm-mips/unistd_o32.h create mode 100644 linux-headers/asm-powerpc/unistd_32.h create mode 100644 linux-headers/asm-powerpc/unistd_64.h create mode 100644 linux-headers/linux/vhost_types.h
I'd prefer the shell script part and the new vhost_types header which are actually reviewable to be split out to a separate patch. And maybe split out unistd stuff that just happened to be there since it's mostly just a jumbo list of numbers.
linux-headers/linux/vhost_types.h line 1
Quoted 7 lines
linux-headers/linux/vhost_types.h new file +1
-0@@ -0,0 +1 @@ +#include "standard-headers/linux/vhost_types.h"
Maybe add a comment here explaining where this came from and why?
BTW it can't hurt to add a preamble to each header we import that says "this came from pdate-linux-headers.sh" - as it is once in a while we have people try to edit these headers directly. Doesn't need to be done right now naturally.
Quoted 8 lines
scripts/update-linux-headers.sh +0
-0@@ -101,6 +101,13 @@ for arch in $ARCHLIST; do if [ $arch = mips ]; then cp "$tmpdir/include/asm/sgidefs.h" "$output/linux-headers/asm-mips/"
scripts/update-linux-headers.sh for arch in $ARCHLIST; do · line 113
Quoted 10 lines
scripts/update-linux-headers.sh +7
-0+ cp "$tmpdir/include/asm/unistd_o32.h" "$output/linux-headers/asm-mips/" + cp "$tmpdir/include/asm/unistd_n32.h" "$output/linux-headers/asm-mips/" + cp "$tmpdir/include/asm/unistd_n64.h" "$output/linux-headers/asm-mips/" + fi + if [ $arch = powerpc ]; then + cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-powerpc/" + cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/" fi rm -rf "$output/include/standard-headers/asm-$arch"
A bit of an explanation about what happened here can't hurt.
scripts/update-linux-headers.sh EOF · line 174
Quoted 7 lines
scripts/update-linux-headers.sh +3
-0@@ -162,6 +169,9 @@ EOF cat <<EOF >$output/linux-headers/linux/virtio_ring.h #include "standard-headers/linux/virtio_ring.h" EOF +cat <<EOF >$output/linux-headers/linux/vhost_types.h +#include "standard-headers/linux/vhost_types.h" +EOF
I guess this is because we want vhost_types.h on non-linux systems, but vhost.h only on linux systems? The disadvantage to this approach is that one can use #include <linux/vhost_types.h> by mistake and it will only break on non-linux.
An alternative is to replace #include <linux/vhost_types.h> with #include "standard-headers/linux/vhost_types.h"
when we are importing vhost.h
Not a big deal, but I thought I'd mention this.
Quoted 13 lines
scripts/update-linux-headers.sh +1
-0rm -rf "$output/include/standard-headers/linux" mkdir -p "$output/include/standard-headers/linux"@@ -171,6 +181,7 @@ for i in "$tmpdir"/include/linux/*virtio*.h \ "$tmpdir/include/linux/input-event-codes.h" \ "$tmpdir/include/linux/pci_regs.h" \ "$tmpdir/include/linux/ethtool.h" "$tmpdir/include/linux/kernel.h" \ + "$tmpdir/include/linux/vhost_types.h" \ "$tmpdir/include/linux/sysinfo.h"; do cp_portable "$i" "$output/include/standard-headers/linux" doneSignature · 1 line
2.20.1
Quoted 5 lines · Michael S. Tsirkin
Quoted 1 line · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Note that in the past we just updated what we needed.
Not if I noticed it -- our copies of the Linux headers are supposed to always be synchronized entirely from a commit of Linux upstream master. Ad-hoc cherry-picked changes can easily be accidentally undone by a later sync by somebody else. This is why we have an automatic script to do header synchronization, so we don't have to manually write and review header updates.
Quoted 2 lines
I'd prefer the shell script part and the new
vhost_typesheader which are actually reviewable to be split out to a separate patch.
I agree that shell script changes should be their own patch. My view is that a header-update commit should be entirely and nothing but the automatically generated results of running scripts/update-linux-headers.sh, with a commit message that says "Generated by running update-linux-headers.sh on upstream kernel commit xxxx". Then (assuming you trust the person who did that to do what they say in the commit message they're doing) you don't need to actually review the changes in detail.
Doing by-hand updates to the headers is quite a common error; I'm not sure if we can automatically catch it with checkpatch. ("Any change to include/standard-headers or linux-headers/ must be a commit that touches only files in those subdirectories and whose commit message is in a standard format", perhaps.)
thanks
-- PMM
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Michael S. Tsirkin
Quoted 1 line · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Note that in the past we just updated what we needed.
Quoted 7 lines
Not if I noticed it -- our copies of the Linux headers are supposed to always be synchronized entirely from a commit of Linux upstream master. Ad-hoc cherry-picked changes can easily be accidentally undone by a later sync by somebody else. This is why we have an automatic script to do header synchronization, so we don't have to manually write and review header updates.
I agree, and shortlog seems to agree too in general. Most commits look like
linux-headers: Update to v3.10-rc5
linux-headers: update to 3.11
linux-headers: Update to 4.2-rc1
linux-headers: sync against v4.14-rc1
linux-headers: update to 3.12-rc1
linux-headers: update to 3.18-rc5
update linux headers to kvm/next
synchronize Linux headers to 4.0-rc3
linux-headers: update to 4.13-rc0
linux header sync against v4.13-rc1
and so on.
Quoted 9 lines
Quoted 2 lines
I'd prefer the shell script part and the new
vhost_typesheader which are actually reviewable to be split out to a separate patch.I agree that shell script changes should be their own patch. My view is that a header-update commit should be entirely and nothing but the automatically generated results of running
scripts/update-linux-headers.sh, with a commit message that says "Generated by runningupdate-linux-headers.shon upstream kernel commit xxxx".
The problem with this approach is that the old script does not work with the new commit and the new script does not work with the old commit. Doing the update in the same commit as the script update means that it's clear from the commit message on which Linux commit you should run it (though in this case I should have specified 4.21-rc1 or 5.0-rc1).
Another way would be to make Linux a submodule. Then you'd upgrade the submodule and the script in one commit, and then generate the headers at compile-time or release-time. This however wouldn't be as nice for users of the git repo. That's the reason why I went for the single commit, but of course I can split it and will in v2.
Paolo
Quoted 10 lines
Doing by-hand updates to the headers is quite a common error; I'm not sure if we can automatically catch it with checkpatch. ("Any change to
include/standard-headersor linux-headers/ must be a commit that touches only files in those subdirectories and whose commit message is in a standard format", perhaps.)thanks
-- PMM
Quoted 13 lines · On Fri, 4 Jan 2019 09:07:23 +0100 Paolo Bonzini <[email protected]> wrote:
Quoted 11 lines · Peter Maydell
Quoted 2 lines · Michael S. Tsirkin
I'd prefer the shell script part and the new
vhost_typesheader which are actually reviewable to be split out to a separate patch.I agree that shell script changes should be their own patch. My view is that a header-update commit should be entirely and nothing but the automatically generated results of running
scripts/update-linux-headers.sh, with a commit message that says "Generated by runningupdate-linux-headers.shon upstream kernel commit xxxx".
Quoted 5 lines
The problem with this approach is that the old script does not work with the new commit and the new script does not work with the old commit. Doing the update in the same commit as the script update means that it's clear from the commit message on which Linux commit you should run it (though in this case I should have specified 4.21-rc1 or 5.0-rc1).
In this case, just note that in the change log? I'd prefer to do it in a single commit if there are dependencies.
Quoted 5 lines
Another way would be to make Linux a submodule. Then you'd upgrade the submodule and the script in one commit, and then generate the headers at compile-time or release-time. This however wouldn't be as nice for users of the git repo. That's the reason why I went for the single commit, but of course I can split it and will in v2.
TBH: Just say no to that submodule idea :)
The need to adapt the script is rare enough for a simple note in the change log to be sufficient if the change can't be split out.
Quoted 42 lines · Paolo Bonzini
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Michael S. Tsirkin
Quoted 1 line · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Note that in the past we just updated what we needed.
Quoted 7 lines
Not if I noticed it -- our copies of the Linux headers are supposed to always be synchronized entirely from a commit of Linux upstream master. Ad-hoc cherry-picked changes can easily be accidentally undone by a later sync by somebody else. This is why we have an automatic script to do header synchronization, so we don't have to manually write and review header updates.
I agree, and shortlog seems to agree too in general. Most commits look like
linux-headers: Update to v3.10-rc5
linux-headers: update to 3.11
linux-headers: Update to 4.2-rc1
linux-headers: sync against v4.14-rc1
linux-headers: update to 3.12-rc1
linux-headers: update to 3.18-rc5
update linux headers to kvm/next
synchronize Linux headers to 4.0-rc3
linux-headers: update to 4.13-rc0
linux header sync against v4.13-rc1and so on.
Quoted 9 lines
Quoted 2 lines
I'd prefer the shell script part and the new
vhost_typesheader which are actually reviewable to be split out to a separate patch.I agree that shell script changes should be their own patch. My view is that a header-update commit should be entirely and nothing but the automatically generated results of running
scripts/update-linux-headers.sh, with a commit message that says "Generated by runningupdate-linux-headers.shon upstream kernel commit xxxx".
Quoted 2 lines
The problem with this approach is that the old script does not work with the new commit and the new script does not work with the old commit.
I would do
update-linux-headers.sh: add support for Linux 4.21-rc1
Since 4.21-rc1 header abc moved from foo/ to bar/ update script accordingly.
---
linux-headers: update to 4.21-rc1
Generated by running update-linux-headers.sh on upstream kernel commit xxxx
Quoted 22 lines
Doing the update in the same commit as the script update means that it's clear from the commit message on which Linux commit you should run it (though in this case I should have specified 4.21-rc1 or 5.0-rc1).
Another way would be to make Linux a submodule. Then you'd upgrade the submodule and the script in one commit, and then generate the headers at compile-time or release-time. This however wouldn't be as nice for users of the git repo. That's the reason why I went for the single commit, but of course I can split it and will in v2.
Paolo
Quoted 10 lines
Doing by-hand updates to the headers is quite a common error; I'm not sure if we can automatically catch it with checkpatch. ("Any change to
include/standard-headersor linux-headers/ must be a commit that touches only files in those subdirectories and whose commit message is in a standard format", perhaps.)thanks
-- PMM