1be5c7
From 64808db4a14867ad774b5e7535972a886e20a156 Mon Sep 17 00:00:00 2001
1be5c7
From: Paolo Bonzini <pbonzini@redhat.com>
1be5c7
Date: Thu, 11 Nov 2021 12:06:01 +0100
1be5c7
Subject: [PATCH 02/24] linux-headers: update to 5.16-rc1
1be5c7
MIME-Version: 1.0
1be5c7
Content-Type: text/plain; charset=UTF-8
1be5c7
Content-Transfer-Encoding: 8bit
1be5c7
1be5c7
RH-Author: Paul Lai <plai@redhat.com>
1be5c7
RH-MergeRequest: 176: Enable KVM AMX support
1be5c7
RH-Commit: [2/13] 4af2f4942db029b81890e3862793fb54b62791cc
1be5c7
RH-Bugzilla: 1916415
1be5c7
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
1be5c7
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
1be5c7
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
1be5c7
1be5c7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1be5c7
Acked-by: Cornelia Huck <cohuck@redhat.com>
1be5c7
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
1be5c7
Message-Id: <20211111110604.207376-3-pbonzini@redhat.com>
1be5c7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1be5c7
(cherry picked from commit 43709a0ca3b09e952bde3f38112f1d7fbf7c65b1)
1be5c7
Signed-off-by: Paul Lai <plai@redhat.com>
1be5c7
---
1be5c7
 include/standard-headers/drm/drm_fourcc.h     | 121 +++++++++++++++++-
1be5c7
 include/standard-headers/linux/ethtool.h      |  31 +++++
1be5c7
 include/standard-headers/linux/fuse.h         |  10 +-
1be5c7
 include/standard-headers/linux/pci_regs.h     |   6 +
1be5c7
 include/standard-headers/linux/virtio_gpu.h   |  18 ++-
1be5c7
 include/standard-headers/linux/virtio_ids.h   |  24 ++++
1be5c7
 include/standard-headers/linux/virtio_vsock.h |   3 +-
1be5c7
 linux-headers/asm-arm64/unistd.h              |   1 +
1be5c7
 linux-headers/asm-generic/unistd.h            |  22 +++-
1be5c7
 linux-headers/asm-mips/unistd_n32.h           |   1 +
1be5c7
 linux-headers/asm-mips/unistd_n64.h           |   1 +
1be5c7
 linux-headers/asm-mips/unistd_o32.h           |   1 +
1be5c7
 linux-headers/asm-powerpc/unistd_32.h         |   1 +
1be5c7
 linux-headers/asm-powerpc/unistd_64.h         |   1 +
1be5c7
 linux-headers/asm-s390/unistd_32.h            |   1 +
1be5c7
 linux-headers/asm-s390/unistd_64.h            |   1 +
1be5c7
 linux-headers/asm-x86/kvm.h                   |   5 +
1be5c7
 linux-headers/asm-x86/unistd_32.h             |   3 +
1be5c7
 linux-headers/asm-x86/unistd_64.h             |   3 +
1be5c7
 linux-headers/asm-x86/unistd_x32.h            |   3 +
1be5c7
 linux-headers/linux/kvm.h                     |  40 +++++-
1be5c7
 21 files changed, 276 insertions(+), 21 deletions(-)
1be5c7
1be5c7
diff --git a/include/standard-headers/drm/drm_fourcc.h b/include/standard-headers/drm/drm_fourcc.h
1be5c7
index 352b51fd0a..2c025cb4fe 100644
1be5c7
--- a/include/standard-headers/drm/drm_fourcc.h
1be5c7
+++ b/include/standard-headers/drm/drm_fourcc.h
1be5c7
@@ -103,6 +103,12 @@ extern "C" {
1be5c7
 /* 8 bpp Red */
1be5c7
 #define DRM_FORMAT_R8		fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
1be5c7
 
1be5c7
+/* 10 bpp Red */
1be5c7
+#define DRM_FORMAT_R10		fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 6:10 little endian */
1be5c7
+
1be5c7
+/* 12 bpp Red */
1be5c7
+#define DRM_FORMAT_R12		fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 4:12 little endian */
1be5c7
+
1be5c7
 /* 16 bpp Red */
1be5c7
 #define DRM_FORMAT_R16		fourcc_code('R', '1', '6', ' ') /* [15:0] R little endian */
1be5c7
 
1be5c7
@@ -372,6 +378,12 @@ extern "C" {
1be5c7
 
1be5c7
 #define DRM_FORMAT_RESERVED	      ((1ULL << 56) - 1)
1be5c7
 
1be5c7
+#define fourcc_mod_get_vendor(modifier) \
1be5c7
+	(((modifier) >> 56) & 0xff)
1be5c7
+
1be5c7
+#define fourcc_mod_is_vendor(modifier, vendor) \
1be5c7
+	(fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_VENDOR_## vendor)
1be5c7
+
1be5c7
 #define fourcc_mod_code(vendor, val) \
1be5c7
 	((((uint64_t)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
1be5c7
 
1be5c7
@@ -899,9 +911,9 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
1be5c7
 
1be5c7
 /*
1be5c7
  * The top 4 bits (out of the 56 bits alloted for specifying vendor specific
1be5c7
- * modifiers) denote the category for modifiers. Currently we have only two
1be5c7
- * categories of modifiers ie AFBC and MISC. We can have a maximum of sixteen
1be5c7
- * different categories.
1be5c7
+ * modifiers) denote the category for modifiers. Currently we have three
1be5c7
+ * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of
1be5c7
+ * sixteen different categories.
1be5c7
  */
1be5c7
 #define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \
1be5c7
 	fourcc_mod_code(ARM, ((uint64_t)(__type) << 52) | ((__val) & 0x000fffffffffffffULL))
1be5c7
@@ -1016,6 +1028,109 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
1be5c7
  */
1be5c7
 #define AFBC_FORMAT_MOD_USM	(1ULL << 12)
1be5c7
 
1be5c7
+/*
1be5c7
+ * Arm Fixed-Rate Compression (AFRC) modifiers
1be5c7
+ *
1be5c7
+ * AFRC is a proprietary fixed rate image compression protocol and format,
1be5c7
+ * designed to provide guaranteed bandwidth and memory footprint
1be5c7
+ * reductions in graphics and media use-cases.
1be5c7
+ *
1be5c7
+ * AFRC buffers consist of one or more planes, with the same components
1be5c7
+ * and meaning as an uncompressed buffer using the same pixel format.
1be5c7
+ *
1be5c7
+ * Within each plane, the pixel/luma/chroma values are grouped into
1be5c7
+ * "coding unit" blocks which are individually compressed to a
1be5c7
+ * fixed size (in bytes). All coding units within a given plane of a buffer
1be5c7
+ * store the same number of values, and have the same compressed size.
1be5c7
+ *
1be5c7
+ * The coding unit size is configurable, allowing different rates of compression.
1be5c7
+ *
1be5c7
+ * The start of each AFRC buffer plane must be aligned to an alignment granule which
1be5c7
+ * depends on the coding unit size.
1be5c7
+ *
1be5c7
+ * Coding Unit Size   Plane Alignment
1be5c7
+ * ----------------   ---------------
1be5c7
+ * 16 bytes           1024 bytes
1be5c7
+ * 24 bytes           512  bytes
1be5c7
+ * 32 bytes           2048 bytes
1be5c7
+ *
1be5c7
+ * Coding units are grouped into paging tiles. AFRC buffer dimensions must be aligned
1be5c7
+ * to a multiple of the paging tile dimensions.
1be5c7
+ * The dimensions of each paging tile depend on whether the buffer is optimised for
1be5c7
+ * scanline (SCAN layout) or rotated (ROT layout) access.
1be5c7
+ *
1be5c7
+ * Layout   Paging Tile Width   Paging Tile Height
1be5c7
+ * ------   -----------------   ------------------
1be5c7
+ * SCAN     16 coding units     4 coding units
1be5c7
+ * ROT      8  coding units     8 coding units
1be5c7
+ *
1be5c7
+ * The dimensions of each coding unit depend on the number of components
1be5c7
+ * in the compressed plane and whether the buffer is optimised for
1be5c7
+ * scanline (SCAN layout) or rotated (ROT layout) access.
1be5c7
+ *
1be5c7
+ * Number of Components in Plane   Layout      Coding Unit Width   Coding Unit Height
1be5c7
+ * -----------------------------   ---------   -----------------   ------------------
1be5c7
+ * 1                               SCAN        16 samples          4 samples
1be5c7
+ * Example: 16x4 luma samples in a 'Y' plane
1be5c7
+ *          16x4 chroma 'V' values, in the 'V' plane of a fully-planar YUV buffer
1be5c7
+ * -----------------------------   ---------   -----------------   ------------------
1be5c7
+ * 1                               ROT         8 samples           8 samples
1be5c7
+ * Example: 8x8 luma samples in a 'Y' plane
1be5c7
+ *          8x8 chroma 'V' values, in the 'V' plane of a fully-planar YUV buffer
1be5c7
+ * -----------------------------   ---------   -----------------   ------------------
1be5c7
+ * 2                               DONT CARE   8 samples           4 samples
1be5c7
+ * Example: 8x4 chroma pairs in the 'UV' plane of a semi-planar YUV buffer
1be5c7
+ * -----------------------------   ---------   -----------------   ------------------
1be5c7
+ * 3                               DONT CARE   4 samples           4 samples
1be5c7
+ * Example: 4x4 pixels in an RGB buffer without alpha
1be5c7
+ * -----------------------------   ---------   -----------------   ------------------
1be5c7
+ * 4                               DONT CARE   4 samples           4 samples
1be5c7
+ * Example: 4x4 pixels in an RGB buffer with alpha
1be5c7
+ */
1be5c7
+
1be5c7
+#define DRM_FORMAT_MOD_ARM_TYPE_AFRC 0x02
1be5c7
+
1be5c7
+#define DRM_FORMAT_MOD_ARM_AFRC(__afrc_mode) \
1be5c7
+	DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFRC, __afrc_mode)
1be5c7
+
1be5c7
+/*
1be5c7
+ * AFRC coding unit size modifier.
1be5c7
+ *
1be5c7
+ * Indicates the number of bytes used to store each compressed coding unit for
1be5c7
+ * one or more planes in an AFRC encoded buffer. The coding unit size for chrominance
1be5c7
+ * is the same for both Cb and Cr, which may be stored in separate planes.
1be5c7
+ *
1be5c7
+ * AFRC_FORMAT_MOD_CU_SIZE_P0 indicates the number of bytes used to store
1be5c7
+ * each compressed coding unit in the first plane of the buffer. For RGBA buffers
1be5c7
+ * this is the only plane, while for semi-planar and fully-planar YUV buffers,
1be5c7
+ * this corresponds to the luma plane.
1be5c7
+ *
1be5c7
+ * AFRC_FORMAT_MOD_CU_SIZE_P12 indicates the number of bytes used to store
1be5c7
+ * each compressed coding unit in the second and third planes in the buffer.
1be5c7
+ * For semi-planar and fully-planar YUV buffers, this corresponds to the chroma plane(s).
1be5c7
+ *
1be5c7
+ * For single-plane buffers, AFRC_FORMAT_MOD_CU_SIZE_P0 must be specified
1be5c7
+ * and AFRC_FORMAT_MOD_CU_SIZE_P12 must be zero.
1be5c7
+ * For semi-planar and fully-planar buffers, both AFRC_FORMAT_MOD_CU_SIZE_P0 and
1be5c7
+ * AFRC_FORMAT_MOD_CU_SIZE_P12 must be specified.
1be5c7
+ */
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_MASK 0xf
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_16 (1ULL)
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_24 (2ULL)
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_32 (3ULL)
1be5c7
+
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_P0(__afrc_cu_size) (__afrc_cu_size)
1be5c7
+#define AFRC_FORMAT_MOD_CU_SIZE_P12(__afrc_cu_size) ((__afrc_cu_size) << 4)
1be5c7
+
1be5c7
+/*
1be5c7
+ * AFRC scanline memory layout.
1be5c7
+ *
1be5c7
+ * Indicates if the buffer uses the scanline-optimised layout
1be5c7
+ * for an AFRC encoded buffer, otherwise, it uses the rotation-optimised layout.
1be5c7
+ * The memory layout is the same for all planes.
1be5c7
+ */
1be5c7
+#define AFRC_FORMAT_MOD_LAYOUT_SCAN (1ULL << 8)
1be5c7
+
1be5c7
 /*
1be5c7
  * Arm 16x16 Block U-Interleaved modifier
1be5c7
  *
1be5c7
diff --git a/include/standard-headers/linux/ethtool.h b/include/standard-headers/linux/ethtool.h
1be5c7
index 053d3fafdf..688eb8dc39 100644
1be5c7
--- a/include/standard-headers/linux/ethtool.h
1be5c7
+++ b/include/standard-headers/linux/ethtool.h
1be5c7
@@ -603,6 +603,7 @@ enum ethtool_link_ext_state {
1be5c7
 	ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
1be5c7
 	ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
1be5c7
 	ETHTOOL_LINK_EXT_STATE_OVERHEAT,
1be5c7
+	ETHTOOL_LINK_EXT_STATE_MODULE,
1be5c7
 };
1be5c7
 
1be5c7
 /* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */
1be5c7
@@ -639,6 +640,8 @@ enum ethtool_link_ext_substate_link_logical_mismatch {
1be5c7
 enum ethtool_link_ext_substate_bad_signal_integrity {
1be5c7
 	ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
1be5c7
 	ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
1be5c7
+	ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_REFERENCE_CLOCK_LOST,
1be5c7
+	ETHTOOL_LINK_EXT_SUBSTATE_BSI_SERDES_ALOS,
1be5c7
 };
1be5c7
 
1be5c7
 /* More information in addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE. */
1be5c7
@@ -647,6 +650,11 @@ enum ethtool_link_ext_substate_cable_issue {
1be5c7
 	ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
1be5c7
 };
1be5c7
 
1be5c7
+/* More information in addition to ETHTOOL_LINK_EXT_STATE_MODULE. */
1be5c7
+enum ethtool_link_ext_substate_module {
1be5c7
+	ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY = 1,
1be5c7
+};
1be5c7
+
1be5c7
 #define ETH_GSTRING_LEN		32
1be5c7
 
1be5c7
 /**
1be5c7
@@ -704,6 +712,29 @@ enum ethtool_stringset {
1be5c7
 	ETH_SS_COUNT
1be5c7
 };
1be5c7
 
1be5c7
+/**
1be5c7
+ * enum ethtool_module_power_mode_policy - plug-in module power mode policy
1be5c7
+ * @ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH: Module is always in high power mode.
1be5c7
+ * @ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO: Module is transitioned by the host
1be5c7
+ *	to high power mode when the first port using it is put administratively
1be5c7
+ *	up and to low power mode when the last port using it is put
1be5c7
+ *	administratively down.
1be5c7
+ */
1be5c7
+enum ethtool_module_power_mode_policy {
1be5c7
+	ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH = 1,
1be5c7
+	ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO,
1be5c7
+};
1be5c7
+
1be5c7
+/**
1be5c7
+ * enum ethtool_module_power_mode - plug-in module power mode
1be5c7
+ * @ETHTOOL_MODULE_POWER_MODE_LOW: Module is in low power mode.
1be5c7
+ * @ETHTOOL_MODULE_POWER_MODE_HIGH: Module is in high power mode.
1be5c7
+ */
1be5c7
+enum ethtool_module_power_mode {
1be5c7
+	ETHTOOL_MODULE_POWER_MODE_LOW = 1,
1be5c7
+	ETHTOOL_MODULE_POWER_MODE_HIGH,
1be5c7
+};
1be5c7
+
1be5c7
 /**
1be5c7
  * struct ethtool_gstrings - string set for data tagging
1be5c7
  * @cmd: Command number = %ETHTOOL_GSTRINGS
1be5c7
diff --git a/include/standard-headers/linux/fuse.h b/include/standard-headers/linux/fuse.h
1be5c7
index cce105bfba..23ea31708b 100644
1be5c7
--- a/include/standard-headers/linux/fuse.h
1be5c7
+++ b/include/standard-headers/linux/fuse.h
1be5c7
@@ -181,6 +181,9 @@
1be5c7
  *  - add FUSE_OPEN_KILL_SUIDGID
1be5c7
  *  - extend fuse_setxattr_in, add FUSE_SETXATTR_EXT
1be5c7
  *  - add FUSE_SETXATTR_ACL_KILL_SGID
1be5c7
+ *
1be5c7
+ *  7.34
1be5c7
+ *  - add FUSE_SYNCFS
1be5c7
  */
1be5c7
 
1be5c7
 #ifndef _LINUX_FUSE_H
1be5c7
@@ -212,7 +215,7 @@
1be5c7
 #define FUSE_KERNEL_VERSION 7
1be5c7
 
1be5c7
 /** Minor version number of this interface */
1be5c7
-#define FUSE_KERNEL_MINOR_VERSION 33
1be5c7
+#define FUSE_KERNEL_MINOR_VERSION 34
1be5c7
 
1be5c7
 /** The node ID of the root inode */
1be5c7
 #define FUSE_ROOT_ID 1
1be5c7
@@ -505,6 +508,7 @@ enum fuse_opcode {
1be5c7
 	FUSE_COPY_FILE_RANGE	= 47,
1be5c7
 	FUSE_SETUPMAPPING	= 48,
1be5c7
 	FUSE_REMOVEMAPPING	= 49,
1be5c7
+	FUSE_SYNCFS		= 50,
1be5c7
 
1be5c7
 	/* CUSE specific operations */
1be5c7
 	CUSE_INIT		= 4096,
1be5c7
@@ -967,4 +971,8 @@ struct fuse_removemapping_one {
1be5c7
 #define FUSE_REMOVEMAPPING_MAX_ENTRY   \
1be5c7
 		(PAGE_SIZE / sizeof(struct fuse_removemapping_one))
1be5c7
 
1be5c7
+struct fuse_syncfs_in {
1be5c7
+	uint64_t	padding;
1be5c7
+};
1be5c7
+
1be5c7
 #endif /* _LINUX_FUSE_H */
1be5c7
diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h
1be5c7
index e709ae8235..ff6ccbc6ef 100644
1be5c7
--- a/include/standard-headers/linux/pci_regs.h
1be5c7
+++ b/include/standard-headers/linux/pci_regs.h
1be5c7
@@ -504,6 +504,12 @@
1be5c7
 #define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
1be5c7
 #define  PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
1be5c7
 #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_128B 0x0000 /* 128 Bytes */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_256B 0x0020 /* 256 Bytes */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_512B 0x0040 /* 512 Bytes */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */
1be5c7
+#define  PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */
1be5c7
 #define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
1be5c7
 #define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
1be5c7
 #define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
1be5c7
diff --git a/include/standard-headers/linux/virtio_gpu.h b/include/standard-headers/linux/virtio_gpu.h
1be5c7
index 1357e4774e..2da48d3d4c 100644
1be5c7
--- a/include/standard-headers/linux/virtio_gpu.h
1be5c7
+++ b/include/standard-headers/linux/virtio_gpu.h
1be5c7
@@ -59,6 +59,11 @@
1be5c7
  * VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB
1be5c7
  */
1be5c7
 #define VIRTIO_GPU_F_RESOURCE_BLOB       3
1be5c7
+/*
1be5c7
+ * VIRTIO_GPU_CMD_CREATE_CONTEXT with
1be5c7
+ * context_init and multiple timelines
1be5c7
+ */
1be5c7
+#define VIRTIO_GPU_F_CONTEXT_INIT        4
1be5c7
 
1be5c7
 enum virtio_gpu_ctrl_type {
1be5c7
 	VIRTIO_GPU_UNDEFINED = 0,
1be5c7
@@ -122,14 +127,20 @@ enum virtio_gpu_shm_id {
1be5c7
 	VIRTIO_GPU_SHM_ID_HOST_VISIBLE = 1
1be5c7
 };
1be5c7
 
1be5c7
-#define VIRTIO_GPU_FLAG_FENCE (1 << 0)
1be5c7
+#define VIRTIO_GPU_FLAG_FENCE         (1 << 0)
1be5c7
+/*
1be5c7
+ * If the following flag is set, then ring_idx contains the index
1be5c7
+ * of the command ring that needs to used when creating the fence
1be5c7
+ */
1be5c7
+#define VIRTIO_GPU_FLAG_INFO_RING_IDX (1 << 1)
1be5c7
 
1be5c7
 struct virtio_gpu_ctrl_hdr {
1be5c7
 	uint32_t type;
1be5c7
 	uint32_t flags;
1be5c7
 	uint64_t fence_id;
1be5c7
 	uint32_t ctx_id;
1be5c7
-	uint32_t padding;
1be5c7
+	uint8_t ring_idx;
1be5c7
+	uint8_t padding[3];
1be5c7
 };
1be5c7
 
1be5c7
 /* data passed in the cursor vq */
1be5c7
@@ -269,10 +280,11 @@ struct virtio_gpu_resource_create_3d {
1be5c7
 };
1be5c7
 
1be5c7
 /* VIRTIO_GPU_CMD_CTX_CREATE */
1be5c7
+#define VIRTIO_GPU_CONTEXT_INIT_CAPSET_ID_MASK 0x000000ff
1be5c7
 struct virtio_gpu_ctx_create {
1be5c7
 	struct virtio_gpu_ctrl_hdr hdr;
1be5c7
 	uint32_t nlen;
1be5c7
-	uint32_t padding;
1be5c7
+	uint32_t context_init;
1be5c7
 	char debug_name[64];
1be5c7
 };
1be5c7
 
1be5c7
diff --git a/include/standard-headers/linux/virtio_ids.h b/include/standard-headers/linux/virtio_ids.h
1be5c7
index 4fe842c3a3..80d76b75bc 100644
1be5c7
--- a/include/standard-headers/linux/virtio_ids.h
1be5c7
+++ b/include/standard-headers/linux/virtio_ids.h
1be5c7
@@ -54,7 +54,31 @@
1be5c7
 #define VIRTIO_ID_SOUND			25 /* virtio sound */
1be5c7
 #define VIRTIO_ID_FS			26 /* virtio filesystem */
1be5c7
 #define VIRTIO_ID_PMEM			27 /* virtio pmem */
1be5c7
+#define VIRTIO_ID_RPMB			28 /* virtio rpmb */
1be5c7
 #define VIRTIO_ID_MAC80211_HWSIM	29 /* virtio mac80211-hwsim */
1be5c7
+#define VIRTIO_ID_VIDEO_ENCODER		30 /* virtio video encoder */
1be5c7
+#define VIRTIO_ID_VIDEO_DECODER		31 /* virtio video decoder */
1be5c7
+#define VIRTIO_ID_SCMI			32 /* virtio SCMI */
1be5c7
+#define VIRTIO_ID_NITRO_SEC_MOD		33 /* virtio nitro secure module*/
1be5c7
+#define VIRTIO_ID_I2C_ADAPTER		34 /* virtio i2c adapter */
1be5c7
+#define VIRTIO_ID_WATCHDOG		35 /* virtio watchdog */
1be5c7
+#define VIRTIO_ID_CAN			36 /* virtio can */
1be5c7
+#define VIRTIO_ID_DMABUF		37 /* virtio dmabuf */
1be5c7
+#define VIRTIO_ID_PARAM_SERV		38 /* virtio parameter server */
1be5c7
+#define VIRTIO_ID_AUDIO_POLICY		39 /* virtio audio policy */
1be5c7
 #define VIRTIO_ID_BT			40 /* virtio bluetooth */
1be5c7
+#define VIRTIO_ID_GPIO			41 /* virtio gpio */
1be5c7
+
1be5c7
+/*
1be5c7
+ * Virtio Transitional IDs
1be5c7
+ */
1be5c7
+
1be5c7
+#define VIRTIO_TRANS_ID_NET		1000 /* transitional virtio net */
1be5c7
+#define VIRTIO_TRANS_ID_BLOCK		1001 /* transitional virtio block */
1be5c7
+#define VIRTIO_TRANS_ID_BALLOON		1002 /* transitional virtio balloon */
1be5c7
+#define VIRTIO_TRANS_ID_CONSOLE		1003 /* transitional virtio console */
1be5c7
+#define VIRTIO_TRANS_ID_SCSI		1004 /* transitional virtio SCSI */
1be5c7
+#define VIRTIO_TRANS_ID_RNG		1005 /* transitional virtio rng */
1be5c7
+#define VIRTIO_TRANS_ID_9P		1009 /* transitional virtio 9p console */
1be5c7
 
1be5c7
 #endif /* _LINUX_VIRTIO_IDS_H */
1be5c7
diff --git a/include/standard-headers/linux/virtio_vsock.h b/include/standard-headers/linux/virtio_vsock.h
1be5c7
index 3a23488e42..467e751b17 100644
1be5c7
--- a/include/standard-headers/linux/virtio_vsock.h
1be5c7
+++ b/include/standard-headers/linux/virtio_vsock.h
1be5c7
@@ -97,7 +97,8 @@ enum virtio_vsock_shutdown {
1be5c7
 
1be5c7
 /* VIRTIO_VSOCK_OP_RW flags values */
1be5c7
 enum virtio_vsock_rw {
1be5c7
-	VIRTIO_VSOCK_SEQ_EOR = 1,
1be5c7
+	VIRTIO_VSOCK_SEQ_EOM = 1,
1be5c7
+	VIRTIO_VSOCK_SEQ_EOR = 2,
1be5c7
 };
1be5c7
 
1be5c7
 #endif /* _LINUX_VIRTIO_VSOCK_H */
1be5c7
diff --git a/linux-headers/asm-arm64/unistd.h b/linux-headers/asm-arm64/unistd.h
1be5c7
index f83a70e07d..ce2ee8f1e3 100644
1be5c7
--- a/linux-headers/asm-arm64/unistd.h
1be5c7
+++ b/linux-headers/asm-arm64/unistd.h
1be5c7
@@ -20,5 +20,6 @@
1be5c7
 #define __ARCH_WANT_SET_GET_RLIMIT
1be5c7
 #define __ARCH_WANT_TIME32_SYSCALLS
1be5c7
 #define __ARCH_WANT_SYS_CLONE3
1be5c7
+#define __ARCH_WANT_MEMFD_SECRET
1be5c7
 
1be5c7
 #include <asm-generic/unistd.h>
1be5c7
diff --git a/linux-headers/asm-generic/unistd.h b/linux-headers/asm-generic/unistd.h
1be5c7
index f211961ce1..4557a8b608 100644
1be5c7
--- a/linux-headers/asm-generic/unistd.h
1be5c7
+++ b/linux-headers/asm-generic/unistd.h
1be5c7
@@ -673,15 +673,15 @@ __SYSCALL(__NR_madvise, sys_madvise)
1be5c7
 #define __NR_remap_file_pages 234
1be5c7
 __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
1be5c7
 #define __NR_mbind 235
1be5c7
-__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
1be5c7
+__SYSCALL(__NR_mbind, sys_mbind)
1be5c7
 #define __NR_get_mempolicy 236
1be5c7
-__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
1be5c7
+__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy)
1be5c7
 #define __NR_set_mempolicy 237
1be5c7
-__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
1be5c7
+__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy)
1be5c7
 #define __NR_migrate_pages 238
1be5c7
-__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
1be5c7
+__SYSCALL(__NR_migrate_pages, sys_migrate_pages)
1be5c7
 #define __NR_move_pages 239
1be5c7
-__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
1be5c7
+__SYSCALL(__NR_move_pages, sys_move_pages)
1be5c7
 #endif
1be5c7
 
1be5c7
 #define __NR_rt_tgsigqueueinfo 240
1be5c7
@@ -873,8 +873,18 @@ __SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
 __SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
1be5c7
 
1be5c7
+#ifdef __ARCH_WANT_MEMFD_SECRET
1be5c7
+#define __NR_memfd_secret 447
1be5c7
+__SYSCALL(__NR_memfd_secret, sys_memfd_secret)
1be5c7
+#endif
1be5c7
+#define __NR_process_mrelease 448
1be5c7
+__SYSCALL(__NR_process_mrelease, sys_process_mrelease)
1be5c7
+
1be5c7
+#define __NR_futex_waitv 449
1be5c7
+__SYSCALL(__NR_futex_waitv, sys_futex_waitv)
1be5c7
+
1be5c7
 #undef __NR_syscalls
1be5c7
-#define __NR_syscalls 447
1be5c7
+#define __NR_syscalls 450
1be5c7
 
1be5c7
 /*
1be5c7
  * 32 bit systems traditionally used different
1be5c7
diff --git a/linux-headers/asm-mips/unistd_n32.h b/linux-headers/asm-mips/unistd_n32.h
1be5c7
index 09cd297698..4b3e7ad1ec 100644
1be5c7
--- a/linux-headers/asm-mips/unistd_n32.h
1be5c7
+++ b/linux-headers/asm-mips/unistd_n32.h
1be5c7
@@ -376,5 +376,6 @@
1be5c7
 #define __NR_landlock_create_ruleset (__NR_Linux + 444)
1be5c7
 #define __NR_landlock_add_rule (__NR_Linux + 445)
1be5c7
 #define __NR_landlock_restrict_self (__NR_Linux + 446)
1be5c7
+#define __NR_process_mrelease (__NR_Linux + 448)
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_N32_H */
1be5c7
diff --git a/linux-headers/asm-mips/unistd_n64.h b/linux-headers/asm-mips/unistd_n64.h
1be5c7
index 780e0cead6..488d9298d9 100644
1be5c7
--- a/linux-headers/asm-mips/unistd_n64.h
1be5c7
+++ b/linux-headers/asm-mips/unistd_n64.h
1be5c7
@@ -352,5 +352,6 @@
1be5c7
 #define __NR_landlock_create_ruleset (__NR_Linux + 444)
1be5c7
 #define __NR_landlock_add_rule (__NR_Linux + 445)
1be5c7
 #define __NR_landlock_restrict_self (__NR_Linux + 446)
1be5c7
+#define __NR_process_mrelease (__NR_Linux + 448)
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_N64_H */
1be5c7
diff --git a/linux-headers/asm-mips/unistd_o32.h b/linux-headers/asm-mips/unistd_o32.h
1be5c7
index 06a2b3b55e..f47399870a 100644
1be5c7
--- a/linux-headers/asm-mips/unistd_o32.h
1be5c7
+++ b/linux-headers/asm-mips/unistd_o32.h
1be5c7
@@ -422,5 +422,6 @@
1be5c7
 #define __NR_landlock_create_ruleset (__NR_Linux + 444)
1be5c7
 #define __NR_landlock_add_rule (__NR_Linux + 445)
1be5c7
 #define __NR_landlock_restrict_self (__NR_Linux + 446)
1be5c7
+#define __NR_process_mrelease (__NR_Linux + 448)
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_O32_H */
1be5c7
diff --git a/linux-headers/asm-powerpc/unistd_32.h b/linux-headers/asm-powerpc/unistd_32.h
1be5c7
index cd5a8a41b2..11d54696dc 100644
1be5c7
--- a/linux-headers/asm-powerpc/unistd_32.h
1be5c7
+++ b/linux-headers/asm-powerpc/unistd_32.h
1be5c7
@@ -429,6 +429,7 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_process_mrelease 448
1be5c7
 
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_32_H */
1be5c7
diff --git a/linux-headers/asm-powerpc/unistd_64.h b/linux-headers/asm-powerpc/unistd_64.h
1be5c7
index 8458effa8d..cf740bab13 100644
1be5c7
--- a/linux-headers/asm-powerpc/unistd_64.h
1be5c7
+++ b/linux-headers/asm-powerpc/unistd_64.h
1be5c7
@@ -401,6 +401,7 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_process_mrelease 448
1be5c7
 
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_64_H */
1be5c7
diff --git a/linux-headers/asm-s390/unistd_32.h b/linux-headers/asm-s390/unistd_32.h
1be5c7
index 0c3cd299e4..8f97d98128 100644
1be5c7
--- a/linux-headers/asm-s390/unistd_32.h
1be5c7
+++ b/linux-headers/asm-s390/unistd_32.h
1be5c7
@@ -419,5 +419,6 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_process_mrelease 448
1be5c7
 
1be5c7
 #endif /* _ASM_S390_UNISTD_32_H */
1be5c7
diff --git a/linux-headers/asm-s390/unistd_64.h b/linux-headers/asm-s390/unistd_64.h
1be5c7
index 8dfc08b5e6..021ffc30e6 100644
1be5c7
--- a/linux-headers/asm-s390/unistd_64.h
1be5c7
+++ b/linux-headers/asm-s390/unistd_64.h
1be5c7
@@ -367,5 +367,6 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_process_mrelease 448
1be5c7
 
1be5c7
 #endif /* _ASM_S390_UNISTD_64_H */
1be5c7
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
1be5c7
index a6c327f8ad..5a776a08f7 100644
1be5c7
--- a/linux-headers/asm-x86/kvm.h
1be5c7
+++ b/linux-headers/asm-x86/kvm.h
1be5c7
@@ -295,6 +295,7 @@ struct kvm_debug_exit_arch {
1be5c7
 #define KVM_GUESTDBG_USE_HW_BP		0x00020000
1be5c7
 #define KVM_GUESTDBG_INJECT_DB		0x00040000
1be5c7
 #define KVM_GUESTDBG_INJECT_BP		0x00080000
1be5c7
+#define KVM_GUESTDBG_BLOCKIRQ		0x00100000
1be5c7
 
1be5c7
 /* for KVM_SET_GUEST_DEBUG */
1be5c7
 struct kvm_guest_debug_arch {
1be5c7
@@ -503,4 +504,8 @@ struct kvm_pmu_event_filter {
1be5c7
 #define KVM_PMU_EVENT_ALLOW 0
1be5c7
 #define KVM_PMU_EVENT_DENY 1
1be5c7
 
1be5c7
+/* for KVM_{GET,SET,HAS}_DEVICE_ATTR */
1be5c7
+#define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */
1be5c7
+#define   KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */
1be5c7
+
1be5c7
 #endif /* _ASM_X86_KVM_H */
1be5c7
diff --git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unistd_32.h
1be5c7
index 66e96c0c68..9c9ffe312b 100644
1be5c7
--- a/linux-headers/asm-x86/unistd_32.h
1be5c7
+++ b/linux-headers/asm-x86/unistd_32.h
1be5c7
@@ -437,6 +437,9 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_memfd_secret 447
1be5c7
+#define __NR_process_mrelease 448
1be5c7
+#define __NR_futex_waitv 449
1be5c7
 
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_32_H */
1be5c7
diff --git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unistd_64.h
1be5c7
index b8ff6f14ee..084f1eef9c 100644
1be5c7
--- a/linux-headers/asm-x86/unistd_64.h
1be5c7
+++ b/linux-headers/asm-x86/unistd_64.h
1be5c7
@@ -359,6 +359,9 @@
1be5c7
 #define __NR_landlock_create_ruleset 444
1be5c7
 #define __NR_landlock_add_rule 445
1be5c7
 #define __NR_landlock_restrict_self 446
1be5c7
+#define __NR_memfd_secret 447
1be5c7
+#define __NR_process_mrelease 448
1be5c7
+#define __NR_futex_waitv 449
1be5c7
 
1be5c7
 
1be5c7
 #endif /* _ASM_UNISTD_64_H */
1be5c7
diff --git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/unistd_x32.h
1be5c7
index 06a1097c15..a2441affc2 100644
1be5c7
--- a/linux-headers/asm-x86/unistd_x32.h
1be5c7
+++ b/linux-headers/asm-x86/unistd_x32.h
1be5c7
@@ -312,6 +312,9 @@
1be5c7
 #define __NR_landlock_create_ruleset (__X32_SYSCALL_BIT + 444)
1be5c7
 #define __NR_landlock_add_rule (__X32_SYSCALL_BIT + 445)
1be5c7
 #define __NR_landlock_restrict_self (__X32_SYSCALL_BIT + 446)
1be5c7
+#define __NR_memfd_secret (__X32_SYSCALL_BIT + 447)
1be5c7
+#define __NR_process_mrelease (__X32_SYSCALL_BIT + 448)
1be5c7
+#define __NR_futex_waitv (__X32_SYSCALL_BIT + 449)
1be5c7
 #define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
1be5c7
 #define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
1be5c7
 #define __NR_ioctl (__X32_SYSCALL_BIT + 514)
1be5c7
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
1be5c7
index bcaf66cc4d..02c5e7b7bb 100644
1be5c7
--- a/linux-headers/linux/kvm.h
1be5c7
+++ b/linux-headers/linux/kvm.h
1be5c7
@@ -269,6 +269,7 @@ struct kvm_xen_exit {
1be5c7
 #define KVM_EXIT_AP_RESET_HOLD    32
1be5c7
 #define KVM_EXIT_X86_BUS_LOCK     33
1be5c7
 #define KVM_EXIT_XEN              34
1be5c7
+#define KVM_EXIT_RISCV_SBI        35
1be5c7
 
1be5c7
 /* For KVM_EXIT_INTERNAL_ERROR */
1be5c7
 /* Emulate instruction failed. */
1be5c7
@@ -397,13 +398,23 @@ struct kvm_run {
1be5c7
 		 * "ndata" is correct, that new fields are enumerated in "flags",
1be5c7
 		 * and that each flag enumerates fields that are 64-bit aligned
1be5c7
 		 * and sized (so that ndata+internal.data[] is valid/accurate).
1be5c7
+		 *
1be5c7
+		 * Space beyond the defined fields may be used to store arbitrary
1be5c7
+		 * debug information relating to the emulation failure. It is
1be5c7
+		 * accounted for in "ndata" but the format is unspecified and is
1be5c7
+		 * not represented in "flags". Any such information is *not* ABI!
1be5c7
 		 */
1be5c7
 		struct {
1be5c7
 			__u32 suberror;
1be5c7
 			__u32 ndata;
1be5c7
 			__u64 flags;
1be5c7
-			__u8  insn_size;
1be5c7
-			__u8  insn_bytes[15];
1be5c7
+			union {
1be5c7
+				struct {
1be5c7
+					__u8  insn_size;
1be5c7
+					__u8  insn_bytes[15];
1be5c7
+				};
1be5c7
+			};
1be5c7
+			/* Arbitrary debug data may follow. */
1be5c7
 		} emulation_failure;
1be5c7
 		/* KVM_EXIT_OSI */
1be5c7
 		struct {
1be5c7
@@ -469,6 +480,13 @@ struct kvm_run {
1be5c7
 		} msr;
1be5c7
 		/* KVM_EXIT_XEN */
1be5c7
 		struct kvm_xen_exit xen;
1be5c7
+		/* KVM_EXIT_RISCV_SBI */
1be5c7
+		struct {
1be5c7
+			unsigned long extension_id;
1be5c7
+			unsigned long function_id;
1be5c7
+			unsigned long args[6];
1be5c7
+			unsigned long ret[2];
1be5c7
+		} riscv_sbi;
1be5c7
 		/* Fix the size of the union. */
1be5c7
 		char padding[256];
1be5c7
 	};
1be5c7
@@ -1223,11 +1241,16 @@ struct kvm_irqfd {
1be5c7
 
1be5c7
 /* Do not use 1, KVM_CHECK_EXTENSION returned it before we had flags.  */
1be5c7
 #define KVM_CLOCK_TSC_STABLE		2
1be5c7
+#define KVM_CLOCK_REALTIME		(1 << 2)
1be5c7
+#define KVM_CLOCK_HOST_TSC		(1 << 3)
1be5c7
 
1be5c7
 struct kvm_clock_data {
1be5c7
 	__u64 clock;
1be5c7
 	__u32 flags;
1be5c7
-	__u32 pad[9];
1be5c7
+	__u32 pad0;
1be5c7
+	__u64 realtime;
1be5c7
+	__u64 host_tsc;
1be5c7
+	__u32 pad[4];
1be5c7
 };
1be5c7
 
1be5c7
 /* For KVM_CAP_SW_TLB */
1be5c7
@@ -1965,7 +1988,9 @@ struct kvm_stats_header {
1be5c7
 #define KVM_STATS_TYPE_CUMULATIVE	(0x0 << KVM_STATS_TYPE_SHIFT)
1be5c7
 #define KVM_STATS_TYPE_INSTANT		(0x1 << KVM_STATS_TYPE_SHIFT)
1be5c7
 #define KVM_STATS_TYPE_PEAK		(0x2 << KVM_STATS_TYPE_SHIFT)
1be5c7
-#define KVM_STATS_TYPE_MAX		KVM_STATS_TYPE_PEAK
1be5c7
+#define KVM_STATS_TYPE_LINEAR_HIST	(0x3 << KVM_STATS_TYPE_SHIFT)
1be5c7
+#define KVM_STATS_TYPE_LOG_HIST		(0x4 << KVM_STATS_TYPE_SHIFT)
1be5c7
+#define KVM_STATS_TYPE_MAX		KVM_STATS_TYPE_LOG_HIST
1be5c7
 
1be5c7
 #define KVM_STATS_UNIT_SHIFT		4
1be5c7
 #define KVM_STATS_UNIT_MASK		(0xF << KVM_STATS_UNIT_SHIFT)
1be5c7
@@ -1988,8 +2013,9 @@ struct kvm_stats_header {
1be5c7
  * @size: The number of data items for this stats.
1be5c7
  *        Every data item is of type __u64.
1be5c7
  * @offset: The offset of the stats to the start of stat structure in
1be5c7
- *          struture kvm or kvm_vcpu.
1be5c7
- * @unused: Unused field for future usage. Always 0 for now.
1be5c7
+ *          structure kvm or kvm_vcpu.
1be5c7
+ * @bucket_size: A parameter value used for histogram stats. It is only used
1be5c7
+ *		for linear histogram stats, specifying the size of the bucket;
1be5c7
  * @name: The name string for the stats. Its size is indicated by the
1be5c7
  *        &kvm_stats_header->name_size.
1be5c7
  */
1be5c7
@@ -1998,7 +2024,7 @@ struct kvm_stats_desc {
1be5c7
 	__s16 exponent;
1be5c7
 	__u16 size;
1be5c7
 	__u32 offset;
1be5c7
-	__u32 unused;
1be5c7
+	__u32 bucket_size;
1be5c7
 	char name[];
1be5c7
 };
1be5c7
 
1be5c7
-- 
1be5c7
2.35.3
1be5c7