|
|
4841a6 |
From e9ecd7543fa8d3e9fe80f4144e4c0461f783fc37 Mon Sep 17 00:00:00 2001
|
|
|
4841a6 |
From: Vivek Goyal <vgoyal@redhat.com>
|
|
|
4841a6 |
Date: Tue, 8 Feb 2022 15:48:05 -0500
|
|
|
4841a6 |
Subject: [PATCH 03/24] linux-headers: Update headers to v5.17-rc1
|
|
|
4841a6 |
|
|
|
4841a6 |
RH-Author: Paul Lai <plai@redhat.com>
|
|
|
4841a6 |
RH-MergeRequest: 176: Enable KVM AMX support
|
|
|
4841a6 |
RH-Commit: [3/13] 63593c2431eabf02222f37467736b580022b94c8
|
|
|
4841a6 |
RH-Bugzilla: 1916415
|
|
|
4841a6 |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
4841a6 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
4841a6 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
4841a6 |
|
|
|
4841a6 |
Update headers to 5.17-rc1. I need latest fuse changes.
|
|
|
4841a6 |
|
|
|
4841a6 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4841a6 |
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
|
|
4841a6 |
Message-Id: <20220208204813.682906-3-vgoyal@redhat.com>
|
|
|
4841a6 |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4841a6 |
(cherry picked from commit ef17dd6a8e6b6e3aeb29233996d44dfcb736d515)
|
|
|
4841a6 |
Signed-off-by: Paul Lai <plai@redhat.com>
|
|
|
4841a6 |
---
|
|
|
4841a6 |
include/standard-headers/asm-x86/kvm_para.h | 1 +
|
|
|
4841a6 |
include/standard-headers/drm/drm_fourcc.h | 11 ++
|
|
|
4841a6 |
include/standard-headers/linux/ethtool.h | 1 +
|
|
|
4841a6 |
include/standard-headers/linux/fuse.h | 60 +++++++-
|
|
|
4841a6 |
include/standard-headers/linux/pci_regs.h | 142 +++++++++---------
|
|
|
4841a6 |
include/standard-headers/linux/virtio_gpio.h | 72 +++++++++
|
|
|
4841a6 |
include/standard-headers/linux/virtio_i2c.h | 47 ++++++
|
|
|
4841a6 |
include/standard-headers/linux/virtio_iommu.h | 8 +-
|
|
|
4841a6 |
.../standard-headers/linux/virtio_pcidev.h | 65 ++++++++
|
|
|
4841a6 |
include/standard-headers/linux/virtio_scmi.h | 24 +++
|
|
|
4841a6 |
linux-headers/asm-generic/unistd.h | 5 +-
|
|
|
4841a6 |
linux-headers/asm-mips/unistd_n32.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-mips/unistd_n64.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-mips/unistd_o32.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-powerpc/unistd_32.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-powerpc/unistd_64.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-riscv/bitsperlong.h | 14 ++
|
|
|
4841a6 |
linux-headers/asm-riscv/mman.h | 1 +
|
|
|
4841a6 |
linux-headers/asm-riscv/unistd.h | 44 ++++++
|
|
|
4841a6 |
linux-headers/asm-s390/unistd_32.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-s390/unistd_64.h | 2 +
|
|
|
4841a6 |
linux-headers/asm-x86/kvm.h | 16 +-
|
|
|
4841a6 |
linux-headers/asm-x86/unistd_32.h | 1 +
|
|
|
4841a6 |
linux-headers/asm-x86/unistd_64.h | 1 +
|
|
|
4841a6 |
linux-headers/asm-x86/unistd_x32.h | 1 +
|
|
|
4841a6 |
linux-headers/linux/kvm.h | 17 +++
|
|
|
4841a6 |
26 files changed, 469 insertions(+), 76 deletions(-)
|
|
|
4841a6 |
create mode 100644 include/standard-headers/linux/virtio_gpio.h
|
|
|
4841a6 |
create mode 100644 include/standard-headers/linux/virtio_i2c.h
|
|
|
4841a6 |
create mode 100644 include/standard-headers/linux/virtio_pcidev.h
|
|
|
4841a6 |
create mode 100644 include/standard-headers/linux/virtio_scmi.h
|
|
|
4841a6 |
create mode 100644 linux-headers/asm-riscv/bitsperlong.h
|
|
|
4841a6 |
create mode 100644 linux-headers/asm-riscv/mman.h
|
|
|
4841a6 |
create mode 100644 linux-headers/asm-riscv/unistd.h
|
|
|
4841a6 |
|
|
|
4841a6 |
diff --git a/include/standard-headers/asm-x86/kvm_para.h b/include/standard-headers/asm-x86/kvm_para.h
|
|
|
4841a6 |
index 204cfb8640..f0235e58a1 100644
|
|
|
4841a6 |
--- a/include/standard-headers/asm-x86/kvm_para.h
|
|
|
4841a6 |
+++ b/include/standard-headers/asm-x86/kvm_para.h
|
|
|
4841a6 |
@@ -8,6 +8,7 @@
|
|
|
4841a6 |
* should be used to determine that a VM is running under KVM.
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
#define KVM_CPUID_SIGNATURE 0x40000000
|
|
|
4841a6 |
+#define KVM_SIGNATURE "KVMKVMKVM\0\0\0"
|
|
|
4841a6 |
|
|
|
4841a6 |
/* This CPUID returns two feature bitmaps in eax, edx. Before enabling
|
|
|
4841a6 |
* a particular paravirtualization, the appropriate feature bit should
|
|
|
4841a6 |
diff --git a/include/standard-headers/drm/drm_fourcc.h b/include/standard-headers/drm/drm_fourcc.h
|
|
|
4841a6 |
index 2c025cb4fe..4888f85f69 100644
|
|
|
4841a6 |
--- a/include/standard-headers/drm/drm_fourcc.h
|
|
|
4841a6 |
+++ b/include/standard-headers/drm/drm_fourcc.h
|
|
|
4841a6 |
@@ -313,6 +313,13 @@ extern "C" {
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
|
|
|
4841a6 |
|
|
|
4841a6 |
+/* 2 plane YCbCr420.
|
|
|
4841a6 |
+ * 3 10 bit components and 2 padding bits packed into 4 bytes.
|
|
|
4841a6 |
+ * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
|
|
|
4841a6 |
+ * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
/* 3 plane non-subsampled (444) YCbCr
|
|
|
4841a6 |
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
|
|
4841a6 |
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
|
|
4841a6 |
@@ -853,6 +860,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
|
|
|
4841a6 |
* and UV. Some SAND-using hardware stores UV in a separate tiled
|
|
|
4841a6 |
* image from Y to reduce the column height, which is not supported
|
|
|
4841a6 |
* with these modifiers.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also
|
|
|
4841a6 |
+ * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes
|
|
|
4841a6 |
+ * wide, but as this is a 10 bpp format that translates to 96 pixels.
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
|
|
|
4841a6 |
#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/ethtool.h b/include/standard-headers/linux/ethtool.h
|
|
|
4841a6 |
index 688eb8dc39..38d5a4cd6e 100644
|
|
|
4841a6 |
--- a/include/standard-headers/linux/ethtool.h
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/ethtool.h
|
|
|
4841a6 |
@@ -231,6 +231,7 @@ enum tunable_id {
|
|
|
4841a6 |
ETHTOOL_RX_COPYBREAK,
|
|
|
4841a6 |
ETHTOOL_TX_COPYBREAK,
|
|
|
4841a6 |
ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */
|
|
|
4841a6 |
+ ETHTOOL_TX_COPYBREAK_BUF_SIZE,
|
|
|
4841a6 |
/*
|
|
|
4841a6 |
* Add your fresh new tunable attribute above and remember to update
|
|
|
4841a6 |
* tunable_strings[] in net/ethtool/common.c
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/fuse.h b/include/standard-headers/linux/fuse.h
|
|
|
4841a6 |
index 23ea31708b..bda06258be 100644
|
|
|
4841a6 |
--- a/include/standard-headers/linux/fuse.h
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/fuse.h
|
|
|
4841a6 |
@@ -184,6 +184,16 @@
|
|
|
4841a6 |
*
|
|
|
4841a6 |
* 7.34
|
|
|
4841a6 |
* - add FUSE_SYNCFS
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * 7.35
|
|
|
4841a6 |
+ * - add FOPEN_NOFLUSH
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * 7.36
|
|
|
4841a6 |
+ * - extend fuse_init_in with reserved fields, add FUSE_INIT_EXT init flag
|
|
|
4841a6 |
+ * - add flags2 to fuse_init_in and fuse_init_out
|
|
|
4841a6 |
+ * - add FUSE_SECURITY_CTX init flag
|
|
|
4841a6 |
+ * - add security context to create, mkdir, symlink, and mknod requests
|
|
|
4841a6 |
+ * - add FUSE_HAS_INODE_DAX, FUSE_ATTR_DAX
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
|
|
|
4841a6 |
#ifndef _LINUX_FUSE_H
|
|
|
4841a6 |
@@ -215,7 +225,7 @@
|
|
|
4841a6 |
#define FUSE_KERNEL_VERSION 7
|
|
|
4841a6 |
|
|
|
4841a6 |
/** Minor version number of this interface */
|
|
|
4841a6 |
-#define FUSE_KERNEL_MINOR_VERSION 34
|
|
|
4841a6 |
+#define FUSE_KERNEL_MINOR_VERSION 36
|
|
|
4841a6 |
|
|
|
4841a6 |
/** The node ID of the root inode */
|
|
|
4841a6 |
#define FUSE_ROOT_ID 1
|
|
|
4841a6 |
@@ -286,12 +296,14 @@ struct fuse_file_lock {
|
|
|
4841a6 |
* FOPEN_NONSEEKABLE: the file is not seekable
|
|
|
4841a6 |
* FOPEN_CACHE_DIR: allow caching this directory
|
|
|
4841a6 |
* FOPEN_STREAM: the file is stream-like (no file position at all)
|
|
|
4841a6 |
+ * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
#define FOPEN_DIRECT_IO (1 << 0)
|
|
|
4841a6 |
#define FOPEN_KEEP_CACHE (1 << 1)
|
|
|
4841a6 |
#define FOPEN_NONSEEKABLE (1 << 2)
|
|
|
4841a6 |
#define FOPEN_CACHE_DIR (1 << 3)
|
|
|
4841a6 |
#define FOPEN_STREAM (1 << 4)
|
|
|
4841a6 |
+#define FOPEN_NOFLUSH (1 << 5)
|
|
|
4841a6 |
|
|
|
4841a6 |
/**
|
|
|
4841a6 |
* INIT request/reply flags
|
|
|
4841a6 |
@@ -332,6 +344,11 @@ struct fuse_file_lock {
|
|
|
4841a6 |
* write/truncate sgid is killed only if file has group
|
|
|
4841a6 |
* execute permission. (Same as Linux VFS behavior).
|
|
|
4841a6 |
* FUSE_SETXATTR_EXT: Server supports extended struct fuse_setxattr_in
|
|
|
4841a6 |
+ * FUSE_INIT_EXT: extended fuse_init_in request
|
|
|
4841a6 |
+ * FUSE_INIT_RESERVED: reserved, do not use
|
|
|
4841a6 |
+ * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and
|
|
|
4841a6 |
+ * mknod
|
|
|
4841a6 |
+ * FUSE_HAS_INODE_DAX: use per inode DAX
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
#define FUSE_ASYNC_READ (1 << 0)
|
|
|
4841a6 |
#define FUSE_POSIX_LOCKS (1 << 1)
|
|
|
4841a6 |
@@ -363,6 +380,11 @@ struct fuse_file_lock {
|
|
|
4841a6 |
#define FUSE_SUBMOUNTS (1 << 27)
|
|
|
4841a6 |
#define FUSE_HANDLE_KILLPRIV_V2 (1 << 28)
|
|
|
4841a6 |
#define FUSE_SETXATTR_EXT (1 << 29)
|
|
|
4841a6 |
+#define FUSE_INIT_EXT (1 << 30)
|
|
|
4841a6 |
+#define FUSE_INIT_RESERVED (1 << 31)
|
|
|
4841a6 |
+/* bits 32..63 get shifted down 32 bits into the flags2 field */
|
|
|
4841a6 |
+#define FUSE_SECURITY_CTX (1ULL << 32)
|
|
|
4841a6 |
+#define FUSE_HAS_INODE_DAX (1ULL << 33)
|
|
|
4841a6 |
|
|
|
4841a6 |
/**
|
|
|
4841a6 |
* CUSE INIT request/reply flags
|
|
|
4841a6 |
@@ -445,8 +467,10 @@ struct fuse_file_lock {
|
|
|
4841a6 |
* fuse_attr flags
|
|
|
4841a6 |
*
|
|
|
4841a6 |
* FUSE_ATTR_SUBMOUNT: Object is a submount root
|
|
|
4841a6 |
+ * FUSE_ATTR_DAX: Enable DAX for this file in per inode DAX mode
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
#define FUSE_ATTR_SUBMOUNT (1 << 0)
|
|
|
4841a6 |
+#define FUSE_ATTR_DAX (1 << 1)
|
|
|
4841a6 |
|
|
|
4841a6 |
/**
|
|
|
4841a6 |
* Open flags
|
|
|
4841a6 |
@@ -732,6 +756,8 @@ struct fuse_init_in {
|
|
|
4841a6 |
uint32_t minor;
|
|
|
4841a6 |
uint32_t max_readahead;
|
|
|
4841a6 |
uint32_t flags;
|
|
|
4841a6 |
+ uint32_t flags2;
|
|
|
4841a6 |
+ uint32_t unused[11];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
#define FUSE_COMPAT_INIT_OUT_SIZE 8
|
|
|
4841a6 |
@@ -748,7 +774,8 @@ struct fuse_init_out {
|
|
|
4841a6 |
uint32_t time_gran;
|
|
|
4841a6 |
uint16_t max_pages;
|
|
|
4841a6 |
uint16_t map_alignment;
|
|
|
4841a6 |
- uint32_t unused[8];
|
|
|
4841a6 |
+ uint32_t flags2;
|
|
|
4841a6 |
+ uint32_t unused[7];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
#define CUSE_INIT_INFO_MAX 4096
|
|
|
4841a6 |
@@ -856,9 +883,12 @@ struct fuse_dirent {
|
|
|
4841a6 |
char name[];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
|
|
|
4841a6 |
-#define FUSE_DIRENT_ALIGN(x) \
|
|
|
4841a6 |
+/* Align variable length records to 64bit boundary */
|
|
|
4841a6 |
+#define FUSE_REC_ALIGN(x) \
|
|
|
4841a6 |
(((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
|
|
|
4841a6 |
+#define FUSE_DIRENT_ALIGN(x) FUSE_REC_ALIGN(x)
|
|
|
4841a6 |
#define FUSE_DIRENT_SIZE(d) \
|
|
|
4841a6 |
FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
|
|
|
4841a6 |
|
|
|
4841a6 |
@@ -975,4 +1005,26 @@ struct fuse_syncfs_in {
|
|
|
4841a6 |
uint64_t padding;
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * For each security context, send fuse_secctx with size of security context
|
|
|
4841a6 |
+ * fuse_secctx will be followed by security context name and this in turn
|
|
|
4841a6 |
+ * will be followed by actual context label.
|
|
|
4841a6 |
+ * fuse_secctx, name, context
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+struct fuse_secctx {
|
|
|
4841a6 |
+ uint32_t size;
|
|
|
4841a6 |
+ uint32_t padding;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Contains the information about how many fuse_secctx structures are being
|
|
|
4841a6 |
+ * sent and what's the total size of all security contexts (including
|
|
|
4841a6 |
+ * size of fuse_secctx_header).
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+struct fuse_secctx_header {
|
|
|
4841a6 |
+ uint32_t size;
|
|
|
4841a6 |
+ uint32_t nr_secctx;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
#endif /* _LINUX_FUSE_H */
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/pci_regs.h b/include/standard-headers/linux/pci_regs.h
|
|
|
4841a6 |
index ff6ccbc6ef..bee1a9ed6e 100644
|
|
|
4841a6 |
--- a/include/standard-headers/linux/pci_regs.h
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/pci_regs.h
|
|
|
4841a6 |
@@ -301,23 +301,23 @@
|
|
|
4841a6 |
#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */
|
|
|
4841a6 |
#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */
|
|
|
4841a6 |
|
|
|
4841a6 |
-/* Message Signalled Interrupt registers */
|
|
|
4841a6 |
+/* Message Signaled Interrupt registers */
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define PCI_MSI_FLAGS 2 /* Message Control */
|
|
|
4841a6 |
+#define PCI_MSI_FLAGS 0x02 /* Message Control */
|
|
|
4841a6 |
#define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */
|
|
|
4841a6 |
#define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */
|
|
|
4841a6 |
#define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */
|
|
|
4841a6 |
#define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */
|
|
|
4841a6 |
#define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */
|
|
|
4841a6 |
#define PCI_MSI_RFU 3 /* Rest of capability flags */
|
|
|
4841a6 |
-#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */
|
|
|
4841a6 |
-#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
|
|
|
4841a6 |
-#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */
|
|
|
4841a6 |
-#define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */
|
|
|
4841a6 |
-#define PCI_MSI_PENDING_32 16 /* Pending intrs for 32-bit devices */
|
|
|
4841a6 |
-#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */
|
|
|
4841a6 |
-#define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */
|
|
|
4841a6 |
-#define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_ADDRESS_LO 0x04 /* Lower 32 bits */
|
|
|
4841a6 |
+#define PCI_MSI_ADDRESS_HI 0x08 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
|
|
|
4841a6 |
+#define PCI_MSI_DATA_32 0x08 /* 16 bits of data for 32-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_MASK_32 0x0c /* Mask bits register for 32-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_PENDING_32 0x10 /* Pending intrs for 32-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_DATA_64 0x0c /* 16 bits of data for 64-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_MASK_64 0x10 /* Mask bits register for 64-bit devices */
|
|
|
4841a6 |
+#define PCI_MSI_PENDING_64 0x14 /* Pending intrs for 64-bit devices */
|
|
|
4841a6 |
|
|
|
4841a6 |
/* MSI-X registers (in MSI-X capability) */
|
|
|
4841a6 |
#define PCI_MSIX_FLAGS 2 /* Message Control */
|
|
|
4841a6 |
@@ -335,10 +335,10 @@
|
|
|
4841a6 |
|
|
|
4841a6 |
/* MSI-X Table entry format (in memory mapped by a BAR) */
|
|
|
4841a6 |
#define PCI_MSIX_ENTRY_SIZE 16
|
|
|
4841a6 |
-#define PCI_MSIX_ENTRY_LOWER_ADDR 0 /* Message Address */
|
|
|
4841a6 |
-#define PCI_MSIX_ENTRY_UPPER_ADDR 4 /* Message Upper Address */
|
|
|
4841a6 |
-#define PCI_MSIX_ENTRY_DATA 8 /* Message Data */
|
|
|
4841a6 |
-#define PCI_MSIX_ENTRY_VECTOR_CTRL 12 /* Vector Control */
|
|
|
4841a6 |
+#define PCI_MSIX_ENTRY_LOWER_ADDR 0x0 /* Message Address */
|
|
|
4841a6 |
+#define PCI_MSIX_ENTRY_UPPER_ADDR 0x4 /* Message Upper Address */
|
|
|
4841a6 |
+#define PCI_MSIX_ENTRY_DATA 0x8 /* Message Data */
|
|
|
4841a6 |
+#define PCI_MSIX_ENTRY_VECTOR_CTRL 0xc /* Vector Control */
|
|
|
4841a6 |
#define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001
|
|
|
4841a6 |
|
|
|
4841a6 |
/* CompactPCI Hotswap Register */
|
|
|
4841a6 |
@@ -470,7 +470,7 @@
|
|
|
4841a6 |
|
|
|
4841a6 |
/* PCI Express capability registers */
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define PCI_EXP_FLAGS 2 /* Capabilities register */
|
|
|
4841a6 |
+#define PCI_EXP_FLAGS 0x02 /* Capabilities register */
|
|
|
4841a6 |
#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */
|
|
|
4841a6 |
#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */
|
|
|
4841a6 |
#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */
|
|
|
4841a6 |
@@ -484,7 +484,7 @@
|
|
|
4841a6 |
#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */
|
|
|
4841a6 |
#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
|
|
|
4841a6 |
#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
|
|
|
4841a6 |
-#define PCI_EXP_DEVCAP 4 /* Device capabilities */
|
|
|
4841a6 |
+#define PCI_EXP_DEVCAP 0x04 /* Device capabilities */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_EXT_TAG 0x00000020 /* Extended tags */
|
|
|
4841a6 |
@@ -497,7 +497,7 @@
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */
|
|
|
4841a6 |
-#define PCI_EXP_DEVCTL 8 /* Device Control */
|
|
|
4841a6 |
+#define PCI_EXP_DEVCTL 0x08 /* Device Control */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */
|
|
|
4841a6 |
@@ -522,7 +522,7 @@
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_READRQ_2048B 0x4000 /* 2048 Bytes */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_READRQ_4096B 0x5000 /* 4096 Bytes */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */
|
|
|
4841a6 |
-#define PCI_EXP_DEVSTA 10 /* Device Status */
|
|
|
4841a6 |
+#define PCI_EXP_DEVSTA 0x0a /* Device Status */
|
|
|
4841a6 |
#define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */
|
|
|
4841a6 |
#define PCI_EXP_DEVSTA_NFED 0x0002 /* Non-Fatal Error Detected */
|
|
|
4841a6 |
#define PCI_EXP_DEVSTA_FED 0x0004 /* Fatal Error Detected */
|
|
|
4841a6 |
@@ -530,7 +530,7 @@
|
|
|
4841a6 |
#define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */
|
|
|
4841a6 |
#define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */
|
|
|
4841a6 |
#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */
|
|
|
4841a6 |
-#define PCI_EXP_LNKCAP 12 /* Link Capabilities */
|
|
|
4841a6 |
+#define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */
|
|
|
4841a6 |
@@ -549,7 +549,7 @@
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */
|
|
|
4841a6 |
-#define PCI_EXP_LNKCTL 16 /* Link Control */
|
|
|
4841a6 |
+#define PCI_EXP_LNKCTL 0x10 /* Link Control */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_ASPM_L0S 0x0001 /* L0s Enable */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_ASPM_L1 0x0002 /* L1 Enable */
|
|
|
4841a6 |
@@ -562,7 +562,7 @@
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL_LABIE 0x0800 /* Link Autonomous Bandwidth Interrupt Enable */
|
|
|
4841a6 |
-#define PCI_EXP_LNKSTA 18 /* Link Status */
|
|
|
4841a6 |
+#define PCI_EXP_LNKSTA 0x12 /* Link Status */
|
|
|
4841a6 |
#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */
|
|
|
4841a6 |
#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */
|
|
|
4841a6 |
@@ -582,7 +582,7 @@
|
|
|
4841a6 |
#define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */
|
|
|
4841a6 |
#define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */
|
|
|
4841a6 |
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20 /* v1 endpoints with link end here */
|
|
|
4841a6 |
-#define PCI_EXP_SLTCAP 20 /* Slot Capabilities */
|
|
|
4841a6 |
+#define PCI_EXP_SLTCAP 0x14 /* Slot Capabilities */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_MRLSP 0x00000004 /* MRL Sensor Present */
|
|
|
4841a6 |
@@ -595,7 +595,7 @@
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_EIP 0x00020000 /* Electromechanical Interlock Present */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_NCCS 0x00040000 /* No Command Completed Support */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */
|
|
|
4841a6 |
-#define PCI_EXP_SLTCTL 24 /* Slot Control */
|
|
|
4841a6 |
+#define PCI_EXP_SLTCTL 0x18 /* Slot Control */
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_ABPE 0x0001 /* Attention Button Pressed Enable */
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_PFDE 0x0002 /* Power Fault Detected Enable */
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_MRLSCE 0x0004 /* MRL Sensor Changed Enable */
|
|
|
4841a6 |
@@ -617,7 +617,7 @@
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */
|
|
|
4841a6 |
#define PCI_EXP_SLTCTL_IBPD_DISABLE 0x4000 /* In-band PD disable */
|
|
|
4841a6 |
-#define PCI_EXP_SLTSTA 26 /* Slot Status */
|
|
|
4841a6 |
+#define PCI_EXP_SLTSTA 0x1a /* Slot Status */
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_PFD 0x0002 /* Power Fault Detected */
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_MRLSC 0x0004 /* MRL Sensor Changed */
|
|
|
4841a6 |
@@ -627,15 +627,15 @@
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_PDS 0x0040 /* Presence Detect State */
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_EIS 0x0080 /* Electromechanical Interlock Status */
|
|
|
4841a6 |
#define PCI_EXP_SLTSTA_DLLSC 0x0100 /* Data Link Layer State Changed */
|
|
|
4841a6 |
-#define PCI_EXP_RTCTL 28 /* Root Control */
|
|
|
4841a6 |
+#define PCI_EXP_RTCTL 0x1c /* Root Control */
|
|
|
4841a6 |
#define PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */
|
|
|
4841a6 |
#define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */
|
|
|
4841a6 |
#define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */
|
|
|
4841a6 |
#define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */
|
|
|
4841a6 |
#define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */
|
|
|
4841a6 |
-#define PCI_EXP_RTCAP 30 /* Root Capabilities */
|
|
|
4841a6 |
+#define PCI_EXP_RTCAP 0x1e /* Root Capabilities */
|
|
|
4841a6 |
#define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */
|
|
|
4841a6 |
-#define PCI_EXP_RTSTA 32 /* Root Status */
|
|
|
4841a6 |
+#define PCI_EXP_RTSTA 0x20 /* Root Status */
|
|
|
4841a6 |
#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */
|
|
|
4841a6 |
#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */
|
|
|
4841a6 |
/*
|
|
|
4841a6 |
@@ -646,7 +646,7 @@
|
|
|
4841a6 |
* Use pcie_capability_read_word() and similar interfaces to use them
|
|
|
4841a6 |
* safely.
|
|
|
4841a6 |
*/
|
|
|
4841a6 |
-#define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */
|
|
|
4841a6 |
+#define PCI_EXP_DEVCAP2 0x24 /* Device Capabilities 2 */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_COMP_TMOUT_DIS 0x00000010 /* Completion Timeout Disable supported */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */
|
|
|
4841a6 |
@@ -658,7 +658,7 @@
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */
|
|
|
4841a6 |
#define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */
|
|
|
4841a6 |
-#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
|
|
|
4841a6 |
+#define PCI_EXP_DEVCTL2 0x28 /* Device Control 2 */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */
|
|
|
4841a6 |
@@ -670,9 +670,9 @@
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000 /* Enable OBFF Message type A */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */
|
|
|
4841a6 |
#define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */
|
|
|
4841a6 |
-#define PCI_EXP_DEVSTA2 42 /* Device Status 2 */
|
|
|
4841a6 |
-#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */
|
|
|
4841a6 |
-#define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */
|
|
|
4841a6 |
+#define PCI_EXP_DEVSTA2 0x2a /* Device Status 2 */
|
|
|
4841a6 |
+#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 0x2c /* end of v2 EPs w/o link */
|
|
|
4841a6 |
+#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities 2 */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8GT/s */
|
|
|
4841a6 |
@@ -680,7 +680,7 @@
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_SLS_32_0GB 0x00000020 /* Supported Speed 32GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_SLS_64_0GB 0x00000040 /* Supported Speed 64GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */
|
|
|
4841a6 |
-#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */
|
|
|
4841a6 |
+#define PCI_EXP_LNKCTL2 0x30 /* Link Control 2 */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_TLS 0x000f
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */
|
|
|
4841a6 |
@@ -691,12 +691,12 @@
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_ENTER_COMP 0x0010 /* Enter Compliance */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380 /* Transmit Margin */
|
|
|
4841a6 |
#define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */
|
|
|
4841a6 |
-#define PCI_EXP_LNKSTA2 50 /* Link Status 2 */
|
|
|
4841a6 |
-#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */
|
|
|
4841a6 |
-#define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */
|
|
|
4841a6 |
+#define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */
|
|
|
4841a6 |
+#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */
|
|
|
4841a6 |
+#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */
|
|
|
4841a6 |
#define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */
|
|
|
4841a6 |
-#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */
|
|
|
4841a6 |
-#define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */
|
|
|
4841a6 |
+#define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */
|
|
|
4841a6 |
+#define PCI_EXP_SLTSTA2 0x3a /* Slot Status 2 */
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Extended Capabilities (PCI-X 2.0 and Express) */
|
|
|
4841a6 |
#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
|
|
|
4841a6 |
@@ -742,7 +742,7 @@
|
|
|
4841a6 |
#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Advanced Error Reporting */
|
|
|
4841a6 |
-#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
|
|
|
4841a6 |
+#define PCI_ERR_UNCOR_STATUS 0x04 /* Uncorrectable Error Status */
|
|
|
4841a6 |
#define PCI_ERR_UNC_UND 0x00000001 /* Undefined */
|
|
|
4841a6 |
#define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */
|
|
|
4841a6 |
#define PCI_ERR_UNC_SURPDN 0x00000020 /* Surprise Down */
|
|
|
4841a6 |
@@ -760,11 +760,11 @@
|
|
|
4841a6 |
#define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */
|
|
|
4841a6 |
#define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */
|
|
|
4841a6 |
#define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */
|
|
|
4841a6 |
-#define PCI_ERR_UNCOR_MASK 8 /* Uncorrectable Error Mask */
|
|
|
4841a6 |
+#define PCI_ERR_UNCOR_MASK 0x08 /* Uncorrectable Error Mask */
|
|
|
4841a6 |
/* Same bits as above */
|
|
|
4841a6 |
-#define PCI_ERR_UNCOR_SEVER 12 /* Uncorrectable Error Severity */
|
|
|
4841a6 |
+#define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */
|
|
|
4841a6 |
/* Same bits as above */
|
|
|
4841a6 |
-#define PCI_ERR_COR_STATUS 16 /* Correctable Error Status */
|
|
|
4841a6 |
+#define PCI_ERR_COR_STATUS 0x10 /* Correctable Error Status */
|
|
|
4841a6 |
#define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */
|
|
|
4841a6 |
#define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */
|
|
|
4841a6 |
#define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */
|
|
|
4841a6 |
@@ -773,20 +773,20 @@
|
|
|
4841a6 |
#define PCI_ERR_COR_ADV_NFAT 0x00002000 /* Advisory Non-Fatal */
|
|
|
4841a6 |
#define PCI_ERR_COR_INTERNAL 0x00004000 /* Corrected Internal */
|
|
|
4841a6 |
#define PCI_ERR_COR_LOG_OVER 0x00008000 /* Header Log Overflow */
|
|
|
4841a6 |
-#define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */
|
|
|
4841a6 |
+#define PCI_ERR_COR_MASK 0x14 /* Correctable Error Mask */
|
|
|
4841a6 |
/* Same bits as above */
|
|
|
4841a6 |
-#define PCI_ERR_CAP 24 /* Advanced Error Capabilities */
|
|
|
4841a6 |
-#define PCI_ERR_CAP_FEP(x) ((x) & 31) /* First Error Pointer */
|
|
|
4841a6 |
+#define PCI_ERR_CAP 0x18 /* Advanced Error Capabilities & Ctrl*/
|
|
|
4841a6 |
+#define PCI_ERR_CAP_FEP(x) ((x) & 0x1f) /* First Error Pointer */
|
|
|
4841a6 |
#define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */
|
|
|
4841a6 |
#define PCI_ERR_CAP_ECRC_GENE 0x00000040 /* ECRC Generation Enable */
|
|
|
4841a6 |
#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */
|
|
|
4841a6 |
#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */
|
|
|
4841a6 |
-#define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */
|
|
|
4841a6 |
-#define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */
|
|
|
4841a6 |
+#define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */
|
|
|
4841a6 |
+#define PCI_ERR_ROOT_COMMAND 0x2c /* Root Error Command */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */
|
|
|
4841a6 |
-#define PCI_ERR_ROOT_STATUS 48
|
|
|
4841a6 |
+#define PCI_ERR_ROOT_STATUS 0x30
|
|
|
4841a6 |
#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */
|
|
|
4841a6 |
@@ -795,52 +795,52 @@
|
|
|
4841a6 |
#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */
|
|
|
4841a6 |
#define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */
|
|
|
4841a6 |
-#define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */
|
|
|
4841a6 |
+#define PCI_ERR_ROOT_ERR_SRC 0x34 /* Error Source Identification */
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Virtual Channel */
|
|
|
4841a6 |
-#define PCI_VC_PORT_CAP1 4
|
|
|
4841a6 |
+#define PCI_VC_PORT_CAP1 0x04
|
|
|
4841a6 |
#define PCI_VC_CAP1_EVCC 0x00000007 /* extended VC count */
|
|
|
4841a6 |
#define PCI_VC_CAP1_LPEVCC 0x00000070 /* low prio extended VC count */
|
|
|
4841a6 |
#define PCI_VC_CAP1_ARB_SIZE 0x00000c00
|
|
|
4841a6 |
-#define PCI_VC_PORT_CAP2 8
|
|
|
4841a6 |
+#define PCI_VC_PORT_CAP2 0x08
|
|
|
4841a6 |
#define PCI_VC_CAP2_32_PHASE 0x00000002
|
|
|
4841a6 |
#define PCI_VC_CAP2_64_PHASE 0x00000004
|
|
|
4841a6 |
#define PCI_VC_CAP2_128_PHASE 0x00000008
|
|
|
4841a6 |
#define PCI_VC_CAP2_ARB_OFF 0xff000000
|
|
|
4841a6 |
-#define PCI_VC_PORT_CTRL 12
|
|
|
4841a6 |
+#define PCI_VC_PORT_CTRL 0x0c
|
|
|
4841a6 |
#define PCI_VC_PORT_CTRL_LOAD_TABLE 0x00000001
|
|
|
4841a6 |
-#define PCI_VC_PORT_STATUS 14
|
|
|
4841a6 |
+#define PCI_VC_PORT_STATUS 0x0e
|
|
|
4841a6 |
#define PCI_VC_PORT_STATUS_TABLE 0x00000001
|
|
|
4841a6 |
-#define PCI_VC_RES_CAP 16
|
|
|
4841a6 |
+#define PCI_VC_RES_CAP 0x10
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_32_PHASE 0x00000002
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_64_PHASE 0x00000004
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_128_PHASE 0x00000008
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_128_PHASE_TB 0x00000010
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_256_PHASE 0x00000020
|
|
|
4841a6 |
#define PCI_VC_RES_CAP_ARB_OFF 0xff000000
|
|
|
4841a6 |
-#define PCI_VC_RES_CTRL 20
|
|
|
4841a6 |
+#define PCI_VC_RES_CTRL 0x14
|
|
|
4841a6 |
#define PCI_VC_RES_CTRL_LOAD_TABLE 0x00010000
|
|
|
4841a6 |
#define PCI_VC_RES_CTRL_ARB_SELECT 0x000e0000
|
|
|
4841a6 |
#define PCI_VC_RES_CTRL_ID 0x07000000
|
|
|
4841a6 |
#define PCI_VC_RES_CTRL_ENABLE 0x80000000
|
|
|
4841a6 |
-#define PCI_VC_RES_STATUS 26
|
|
|
4841a6 |
+#define PCI_VC_RES_STATUS 0x1a
|
|
|
4841a6 |
#define PCI_VC_RES_STATUS_TABLE 0x00000001
|
|
|
4841a6 |
#define PCI_VC_RES_STATUS_NEGO 0x00000002
|
|
|
4841a6 |
#define PCI_CAP_VC_BASE_SIZEOF 0x10
|
|
|
4841a6 |
-#define PCI_CAP_VC_PER_VC_SIZEOF 0x0C
|
|
|
4841a6 |
+#define PCI_CAP_VC_PER_VC_SIZEOF 0x0c
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Power Budgeting */
|
|
|
4841a6 |
-#define PCI_PWR_DSR 4 /* Data Select Register */
|
|
|
4841a6 |
-#define PCI_PWR_DATA 8 /* Data Register */
|
|
|
4841a6 |
+#define PCI_PWR_DSR 0x04 /* Data Select Register */
|
|
|
4841a6 |
+#define PCI_PWR_DATA 0x08 /* Data Register */
|
|
|
4841a6 |
#define PCI_PWR_DATA_BASE(x) ((x) & 0xff) /* Base Power */
|
|
|
4841a6 |
#define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3) /* Data Scale */
|
|
|
4841a6 |
#define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7) /* PM Sub State */
|
|
|
4841a6 |
#define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3) /* PM State */
|
|
|
4841a6 |
#define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7) /* Type */
|
|
|
4841a6 |
#define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */
|
|
|
4841a6 |
-#define PCI_PWR_CAP 12 /* Capability */
|
|
|
4841a6 |
+#define PCI_PWR_CAP 0x0c /* Capability */
|
|
|
4841a6 |
#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */
|
|
|
4841a6 |
-#define PCI_EXT_CAP_PWR_SIZEOF 16
|
|
|
4841a6 |
+#define PCI_EXT_CAP_PWR_SIZEOF 0x10
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Root Complex Event Collector Endpoint Association */
|
|
|
4841a6 |
#define PCI_RCEC_RCIEP_BITMAP 4 /* Associated Bitmap for RCiEPs */
|
|
|
4841a6 |
@@ -964,7 +964,7 @@
|
|
|
4841a6 |
#define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */
|
|
|
4841a6 |
#define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */
|
|
|
4841a6 |
#define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */
|
|
|
4841a6 |
-#define PCI_EXT_CAP_SRIOV_SIZEOF 64
|
|
|
4841a6 |
+#define PCI_EXT_CAP_SRIOV_SIZEOF 0x40
|
|
|
4841a6 |
|
|
|
4841a6 |
#define PCI_LTR_MAX_SNOOP_LAT 0x4
|
|
|
4841a6 |
#define PCI_LTR_MAX_NOSNOOP_LAT 0x6
|
|
|
4841a6 |
@@ -1017,12 +1017,12 @@
|
|
|
4841a6 |
#define PCI_TPH_LOC_NONE 0x000 /* no location */
|
|
|
4841a6 |
#define PCI_TPH_LOC_CAP 0x200 /* in capability */
|
|
|
4841a6 |
#define PCI_TPH_LOC_MSIX 0x400 /* in MSI-X */
|
|
|
4841a6 |
-#define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* st table mask */
|
|
|
4841a6 |
-#define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */
|
|
|
4841a6 |
-#define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */
|
|
|
4841a6 |
+#define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* ST table mask */
|
|
|
4841a6 |
+#define PCI_TPH_CAP_ST_SHIFT 16 /* ST table shift */
|
|
|
4841a6 |
+#define PCI_TPH_BASE_SIZEOF 0xc /* size with no ST table */
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Downstream Port Containment */
|
|
|
4841a6 |
-#define PCI_EXP_DPC_CAP 4 /* DPC Capability */
|
|
|
4841a6 |
+#define PCI_EXP_DPC_CAP 0x04 /* DPC Capability */
|
|
|
4841a6 |
#define PCI_EXP_DPC_IRQ 0x001F /* Interrupt Message Number */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CAP_RP_EXT 0x0020 /* Root Port Extensions */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CAP_POISONED_TLP 0x0040 /* Poisoned TLP Egress Blocking Supported */
|
|
|
4841a6 |
@@ -1030,19 +1030,19 @@
|
|
|
4841a6 |
#define PCI_EXP_DPC_RP_PIO_LOG_SIZE 0x0F00 /* RP PIO Log Size */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define PCI_EXP_DPC_CTL 6 /* DPC control */
|
|
|
4841a6 |
+#define PCI_EXP_DPC_CTL 0x06 /* DPC control */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */
|
|
|
4841a6 |
#define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define PCI_EXP_DPC_STATUS 8 /* DPC Status */
|
|
|
4841a6 |
+#define PCI_EXP_DPC_STATUS 0x08 /* DPC Status */
|
|
|
4841a6 |
#define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */
|
|
|
4841a6 |
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN 0x0006 /* Trigger Reason */
|
|
|
4841a6 |
#define PCI_EXP_DPC_STATUS_INTERRUPT 0x0008 /* Interrupt Status */
|
|
|
4841a6 |
#define PCI_EXP_DPC_RP_BUSY 0x0010 /* Root Port Busy */
|
|
|
4841a6 |
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */
|
|
|
4841a6 |
|
|
|
4841a6 |
-#define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */
|
|
|
4841a6 |
+#define PCI_EXP_DPC_SOURCE_ID 0x0A /* DPC Source Identifier */
|
|
|
4841a6 |
|
|
|
4841a6 |
#define PCI_EXP_DPC_RP_PIO_STATUS 0x0C /* RP PIO Status */
|
|
|
4841a6 |
#define PCI_EXP_DPC_RP_PIO_MASK 0x10 /* RP PIO Mask */
|
|
|
4841a6 |
@@ -1086,7 +1086,11 @@
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */
|
|
|
4841a6 |
#define PCI_DVSEC_HEADER1 0x4 /* Designated Vendor-Specific Header1 */
|
|
|
4841a6 |
+#define PCI_DVSEC_HEADER1_VID(x) ((x) & 0xffff)
|
|
|
4841a6 |
+#define PCI_DVSEC_HEADER1_REV(x) (((x) >> 16) & 0xf)
|
|
|
4841a6 |
+#define PCI_DVSEC_HEADER1_LEN(x) (((x) >> 20) & 0xfff)
|
|
|
4841a6 |
#define PCI_DVSEC_HEADER2 0x8 /* Designated Vendor-Specific Header2 */
|
|
|
4841a6 |
+#define PCI_DVSEC_HEADER2_ID(x) ((x) & 0xffff)
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Data Link Feature */
|
|
|
4841a6 |
#define PCI_DLF_CAP 0x04 /* Capabilities Register */
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/virtio_gpio.h b/include/standard-headers/linux/virtio_gpio.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..2b5cf06349
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/virtio_gpio.h
|
|
|
4841a6 |
@@ -0,0 +1,72 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#ifndef _LINUX_VIRTIO_GPIO_H
|
|
|
4841a6 |
+#define _LINUX_VIRTIO_GPIO_H
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#include "standard-headers/linux/types.h"
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio GPIO Feature bits */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_F_IRQ 0
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio GPIO request types */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_GET_NAMES 0x0001
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_GET_VALUE 0x0004
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_SET_VALUE 0x0005
|
|
|
4841a6 |
+#define VIRTIO_GPIO_MSG_IRQ_TYPE 0x0006
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Possible values of the status field */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_STATUS_OK 0x0
|
|
|
4841a6 |
+#define VIRTIO_GPIO_STATUS_ERR 0x1
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Direction types */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_DIRECTION_NONE 0x00
|
|
|
4841a6 |
+#define VIRTIO_GPIO_DIRECTION_OUT 0x01
|
|
|
4841a6 |
+#define VIRTIO_GPIO_DIRECTION_IN 0x02
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio GPIO IRQ types */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_NONE 0x00
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_EDGE_RISING 0x01
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_EDGE_FALLING 0x02
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_EDGE_BOTH 0x03
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_LEVEL_HIGH 0x04
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_TYPE_LEVEL_LOW 0x08
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+struct virtio_gpio_config {
|
|
|
4841a6 |
+ uint16_t ngpio;
|
|
|
4841a6 |
+ uint8_t padding[2];
|
|
|
4841a6 |
+ uint32_t gpio_names_size;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio GPIO Request / Response */
|
|
|
4841a6 |
+struct virtio_gpio_request {
|
|
|
4841a6 |
+ uint16_t type;
|
|
|
4841a6 |
+ uint16_t gpio;
|
|
|
4841a6 |
+ uint32_t value;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+struct virtio_gpio_response {
|
|
|
4841a6 |
+ uint8_t status;
|
|
|
4841a6 |
+ uint8_t value;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+struct virtio_gpio_response_get_names {
|
|
|
4841a6 |
+ uint8_t status;
|
|
|
4841a6 |
+ uint8_t value[];
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio GPIO IRQ Request / Response */
|
|
|
4841a6 |
+struct virtio_gpio_irq_request {
|
|
|
4841a6 |
+ uint16_t gpio;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+struct virtio_gpio_irq_response {
|
|
|
4841a6 |
+ uint8_t status;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Possible values of the interrupt status field */
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_STATUS_INVALID 0x0
|
|
|
4841a6 |
+#define VIRTIO_GPIO_IRQ_STATUS_VALID 0x1
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#endif /* _LINUX_VIRTIO_GPIO_H */
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/virtio_i2c.h b/include/standard-headers/linux/virtio_i2c.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..09fa907793
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/virtio_i2c.h
|
|
|
4841a6 |
@@ -0,0 +1,47 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Definitions for virtio I2C Adpter
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * Copyright (c) 2021 Intel Corporation. All rights reserved.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#ifndef _LINUX_VIRTIO_I2C_H
|
|
|
4841a6 |
+#define _LINUX_VIRTIO_I2C_H
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#include "standard-headers/linux/const.h"
|
|
|
4841a6 |
+#include "standard-headers/linux/types.h"
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtio I2C Feature bits */
|
|
|
4841a6 |
+#define VIRTIO_I2C_F_ZERO_LENGTH_REQUEST 0
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* The bit 0 of the @virtio_i2c_out_hdr.@flags, used to group the requests */
|
|
|
4841a6 |
+#define VIRTIO_I2C_FLAGS_FAIL_NEXT _BITUL(0)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* The bit 1 of the @virtio_i2c_out_hdr.@flags, used to mark a buffer as read */
|
|
|
4841a6 |
+#define VIRTIO_I2C_FLAGS_M_RD _BITUL(1)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/**
|
|
|
4841a6 |
+ * struct virtio_i2c_out_hdr - the virtio I2C message OUT header
|
|
|
4841a6 |
+ * @addr: the controlled device address
|
|
|
4841a6 |
+ * @padding: used to pad to full dword
|
|
|
4841a6 |
+ * @flags: used for feature extensibility
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+struct virtio_i2c_out_hdr {
|
|
|
4841a6 |
+ uint16_t addr;
|
|
|
4841a6 |
+ uint16_t padding;
|
|
|
4841a6 |
+ uint32_t flags;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/**
|
|
|
4841a6 |
+ * struct virtio_i2c_in_hdr - the virtio I2C message IN header
|
|
|
4841a6 |
+ * @status: the processing result from the backend
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+struct virtio_i2c_in_hdr {
|
|
|
4841a6 |
+ uint8_t status;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* The final status written by the device */
|
|
|
4841a6 |
+#define VIRTIO_I2C_MSG_OK 0
|
|
|
4841a6 |
+#define VIRTIO_I2C_MSG_ERR 1
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#endif /* _LINUX_VIRTIO_I2C_H */
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/virtio_iommu.h b/include/standard-headers/linux/virtio_iommu.h
|
|
|
4841a6 |
index b9443b83a1..366379c2f0 100644
|
|
|
4841a6 |
--- a/include/standard-headers/linux/virtio_iommu.h
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/virtio_iommu.h
|
|
|
4841a6 |
@@ -16,6 +16,7 @@
|
|
|
4841a6 |
#define VIRTIO_IOMMU_F_BYPASS 3
|
|
|
4841a6 |
#define VIRTIO_IOMMU_F_PROBE 4
|
|
|
4841a6 |
#define VIRTIO_IOMMU_F_MMIO 5
|
|
|
4841a6 |
+#define VIRTIO_IOMMU_F_BYPASS_CONFIG 6
|
|
|
4841a6 |
|
|
|
4841a6 |
struct virtio_iommu_range_64 {
|
|
|
4841a6 |
uint64_t start;
|
|
|
4841a6 |
@@ -36,6 +37,8 @@ struct virtio_iommu_config {
|
|
|
4841a6 |
struct virtio_iommu_range_32 domain_range;
|
|
|
4841a6 |
/* Probe buffer size */
|
|
|
4841a6 |
uint32_t probe_size;
|
|
|
4841a6 |
+ uint8_t bypass;
|
|
|
4841a6 |
+ uint8_t reserved[3];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
/* Request types */
|
|
|
4841a6 |
@@ -66,11 +69,14 @@ struct virtio_iommu_req_tail {
|
|
|
4841a6 |
uint8_t reserved[3];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
+#define VIRTIO_IOMMU_ATTACH_F_BYPASS (1 << 0)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
struct virtio_iommu_req_attach {
|
|
|
4841a6 |
struct virtio_iommu_req_head head;
|
|
|
4841a6 |
uint32_t domain;
|
|
|
4841a6 |
uint32_t endpoint;
|
|
|
4841a6 |
- uint8_t reserved[8];
|
|
|
4841a6 |
+ uint32_t flags;
|
|
|
4841a6 |
+ uint8_t reserved[4];
|
|
|
4841a6 |
struct virtio_iommu_req_tail tail;
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/virtio_pcidev.h b/include/standard-headers/linux/virtio_pcidev.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..bdf1d062da
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/virtio_pcidev.h
|
|
|
4841a6 |
@@ -0,0 +1,65 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Copyright (C) 2021 Intel Corporation
|
|
|
4841a6 |
+ * Author: Johannes Berg <johannes@sipsolutions.net>
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+#ifndef _LINUX_VIRTIO_PCIDEV_H
|
|
|
4841a6 |
+#define _LINUX_VIRTIO_PCIDEV_H
|
|
|
4841a6 |
+#include "standard-headers/linux/types.h"
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/**
|
|
|
4841a6 |
+ * enum virtio_pcidev_ops - virtual PCI device operations
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_RESERVED: reserved to catch errors
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_CFG_READ: read config space, size is 1, 2, 4 or 8;
|
|
|
4841a6 |
+ * the @data field should be filled in by the device (in little endian).
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_CFG_WRITE: write config space, size is 1, 2, 4 or 8;
|
|
|
4841a6 |
+ * the @data field contains the data to write (in little endian).
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_MMIO_READ: read BAR mem/pio, size can be variable;
|
|
|
4841a6 |
+ * the @data field should be filled in by the device (in little endian).
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_MMIO_WRITE: write BAR mem/pio, size can be variable;
|
|
|
4841a6 |
+ * the @data field contains the data to write (in little endian).
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_MMIO_MEMSET: memset MMIO, size is variable but
|
|
|
4841a6 |
+ * the @data field only has one byte (unlike @VIRTIO_PCIDEV_OP_MMIO_WRITE)
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_INT: legacy INTx# pin interrupt, the addr field is 1-4 for
|
|
|
4841a6 |
+ * the number
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_MSI: MSI(-X) interrupt, this message basically transports
|
|
|
4841a6 |
+ * the 16- or 32-bit write that would otherwise be done into memory,
|
|
|
4841a6 |
+ * analogous to the write messages (@VIRTIO_PCIDEV_OP_MMIO_WRITE) above
|
|
|
4841a6 |
+ * @VIRTIO_PCIDEV_OP_PME: Dummy message whose content is ignored (and should be
|
|
|
4841a6 |
+ * all zeroes) to signal the PME# pin.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+enum virtio_pcidev_ops {
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_RESERVED = 0,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_CFG_READ,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_CFG_WRITE,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_MMIO_READ,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_MMIO_WRITE,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_MMIO_MEMSET,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_INT,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_MSI,
|
|
|
4841a6 |
+ VIRTIO_PCIDEV_OP_PME,
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/**
|
|
|
4841a6 |
+ * struct virtio_pcidev_msg - virtio PCI device operation
|
|
|
4841a6 |
+ * @op: the operation to do
|
|
|
4841a6 |
+ * @bar: the bar (only with BAR read/write messages)
|
|
|
4841a6 |
+ * @reserved: reserved
|
|
|
4841a6 |
+ * @size: the size of the read/write (in bytes)
|
|
|
4841a6 |
+ * @addr: the address to read/write
|
|
|
4841a6 |
+ * @data: the data, normally @size long, but just one byte for
|
|
|
4841a6 |
+ * %VIRTIO_PCIDEV_OP_MMIO_MEMSET
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * Note: the fields are all in native (CPU) endian, however, the
|
|
|
4841a6 |
+ * @data values will often be in little endian (see the ops above.)
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+struct virtio_pcidev_msg {
|
|
|
4841a6 |
+ uint8_t op;
|
|
|
4841a6 |
+ uint8_t bar;
|
|
|
4841a6 |
+ uint16_t reserved;
|
|
|
4841a6 |
+ uint32_t size;
|
|
|
4841a6 |
+ uint64_t addr;
|
|
|
4841a6 |
+ uint8_t data[];
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#endif /* _LINUX_VIRTIO_PCIDEV_H */
|
|
|
4841a6 |
diff --git a/include/standard-headers/linux/virtio_scmi.h b/include/standard-headers/linux/virtio_scmi.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..8f2c305aea
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/include/standard-headers/linux/virtio_scmi.h
|
|
|
4841a6 |
@@ -0,0 +1,24 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Copyright (C) 2020-2021 OpenSynergy GmbH
|
|
|
4841a6 |
+ * Copyright (C) 2021 ARM Ltd.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#ifndef _LINUX_VIRTIO_SCMI_H
|
|
|
4841a6 |
+#define _LINUX_VIRTIO_SCMI_H
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#include "standard-headers/linux/virtio_types.h"
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Device implements some SCMI notifications, or delayed responses. */
|
|
|
4841a6 |
+#define VIRTIO_SCMI_F_P2A_CHANNELS 0
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Device implements any SCMI statistics shared memory region */
|
|
|
4841a6 |
+#define VIRTIO_SCMI_F_SHARED_MEMORY 1
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/* Virtqueues */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#define VIRTIO_SCMI_VQ_TX 0 /* cmdq */
|
|
|
4841a6 |
+#define VIRTIO_SCMI_VQ_RX 1 /* eventq */
|
|
|
4841a6 |
+#define VIRTIO_SCMI_VQ_MAX_CNT 2
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#endif /* _LINUX_VIRTIO_SCMI_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-generic/unistd.h b/linux-headers/asm-generic/unistd.h
|
|
|
4841a6 |
index 4557a8b608..1c48b0ae3b 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-generic/unistd.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-generic/unistd.h
|
|
|
4841a6 |
@@ -883,8 +883,11 @@ __SYSCALL(__NR_process_mrelease, sys_process_mrelease)
|
|
|
4841a6 |
#define __NR_futex_waitv 449
|
|
|
4841a6 |
__SYSCALL(__NR_futex_waitv, sys_futex_waitv)
|
|
|
4841a6 |
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
+__SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
#undef __NR_syscalls
|
|
|
4841a6 |
-#define __NR_syscalls 450
|
|
|
4841a6 |
+#define __NR_syscalls 451
|
|
|
4841a6 |
|
|
|
4841a6 |
/*
|
|
|
4841a6 |
* 32 bit systems traditionally used different
|
|
|
4841a6 |
diff --git a/linux-headers/asm-mips/unistd_n32.h b/linux-headers/asm-mips/unistd_n32.h
|
|
|
4841a6 |
index 4b3e7ad1ec..1f14a6fad3 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-mips/unistd_n32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-mips/unistd_n32.h
|
|
|
4841a6 |
@@ -377,5 +377,7 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule (__NR_Linux + 445)
|
|
|
4841a6 |
#define __NR_landlock_restrict_self (__NR_Linux + 446)
|
|
|
4841a6 |
#define __NR_process_mrelease (__NR_Linux + 448)
|
|
|
4841a6 |
+#define __NR_futex_waitv (__NR_Linux + 449)
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_N32_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-mips/unistd_n64.h b/linux-headers/asm-mips/unistd_n64.h
|
|
|
4841a6 |
index 488d9298d9..e5a8ebec78 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-mips/unistd_n64.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-mips/unistd_n64.h
|
|
|
4841a6 |
@@ -353,5 +353,7 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule (__NR_Linux + 445)
|
|
|
4841a6 |
#define __NR_landlock_restrict_self (__NR_Linux + 446)
|
|
|
4841a6 |
#define __NR_process_mrelease (__NR_Linux + 448)
|
|
|
4841a6 |
+#define __NR_futex_waitv (__NR_Linux + 449)
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_N64_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-mips/unistd_o32.h b/linux-headers/asm-mips/unistd_o32.h
|
|
|
4841a6 |
index f47399870a..871d57168f 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-mips/unistd_o32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-mips/unistd_o32.h
|
|
|
4841a6 |
@@ -423,5 +423,7 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule (__NR_Linux + 445)
|
|
|
4841a6 |
#define __NR_landlock_restrict_self (__NR_Linux + 446)
|
|
|
4841a6 |
#define __NR_process_mrelease (__NR_Linux + 448)
|
|
|
4841a6 |
+#define __NR_futex_waitv (__NR_Linux + 449)
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node (__NR_Linux + 450)
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_O32_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-powerpc/unistd_32.h b/linux-headers/asm-powerpc/unistd_32.h
|
|
|
4841a6 |
index 11d54696dc..585c7fefbc 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-powerpc/unistd_32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-powerpc/unistd_32.h
|
|
|
4841a6 |
@@ -430,6 +430,8 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule 445
|
|
|
4841a6 |
#define __NR_landlock_restrict_self 446
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
+#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_32_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-powerpc/unistd_64.h b/linux-headers/asm-powerpc/unistd_64.h
|
|
|
4841a6 |
index cf740bab13..350f7ec0ac 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-powerpc/unistd_64.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-powerpc/unistd_64.h
|
|
|
4841a6 |
@@ -402,6 +402,8 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule 445
|
|
|
4841a6 |
#define __NR_landlock_restrict_self 446
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
+#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_64_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-riscv/bitsperlong.h b/linux-headers/asm-riscv/bitsperlong.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..cc5c45a9ce
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/linux-headers/asm-riscv/bitsperlong.h
|
|
|
4841a6 |
@@ -0,0 +1,14 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Copyright (C) 2012 ARM Ltd.
|
|
|
4841a6 |
+ * Copyright (C) 2015 Regents of the University of California
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#ifndef _ASM_RISCV_BITSPERLONG_H
|
|
|
4841a6 |
+#define _ASM_RISCV_BITSPERLONG_H
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#include <asm-generic/bitsperlong.h>
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#endif /* _ASM_RISCV_BITSPERLONG_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-riscv/mman.h b/linux-headers/asm-riscv/mman.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..8eebf89f5a
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/linux-headers/asm-riscv/mman.h
|
|
|
4841a6 |
@@ -0,0 +1 @@
|
|
|
4841a6 |
+#include <asm-generic/mman.h>
|
|
|
4841a6 |
diff --git a/linux-headers/asm-riscv/unistd.h b/linux-headers/asm-riscv/unistd.h
|
|
|
4841a6 |
new file mode 100644
|
|
|
4841a6 |
index 0000000000..8062996c2d
|
|
|
4841a6 |
--- /dev/null
|
|
|
4841a6 |
+++ b/linux-headers/asm-riscv/unistd.h
|
|
|
4841a6 |
@@ -0,0 +1,44 @@
|
|
|
4841a6 |
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Copyright (C) 2018 David Abdurachmanov <david.abdurachmanov@gmail.com>
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * This program is free software; you can redistribute it and/or modify
|
|
|
4841a6 |
+ * it under the terms of the GNU General Public License version 2 as
|
|
|
4841a6 |
+ * published by the Free Software Foundation.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * This program is distributed in the hope that it will be useful,
|
|
|
4841a6 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4841a6 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
4841a6 |
+ * GNU General Public License for more details.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * You should have received a copy of the GNU General Public License
|
|
|
4841a6 |
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#ifdef __LP64__
|
|
|
4841a6 |
+#define __ARCH_WANT_NEW_STAT
|
|
|
4841a6 |
+#define __ARCH_WANT_SET_GET_RLIMIT
|
|
|
4841a6 |
+#endif /* __LP64__ */
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#define __ARCH_WANT_SYS_CLONE3
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#include <asm-generic/unistd.h>
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+/*
|
|
|
4841a6 |
+ * Allows the instruction cache to be flushed from userspace. Despite RISC-V
|
|
|
4841a6 |
+ * having a direct 'fence.i' instruction available to userspace (which we
|
|
|
4841a6 |
+ * can't trap!), that's not actually viable when running on Linux because the
|
|
|
4841a6 |
+ * kernel might schedule a process on another hart. There is no way for
|
|
|
4841a6 |
+ * userspace to handle this without invoking the kernel (as it doesn't know the
|
|
|
4841a6 |
+ * thread->hart mappings), so we've defined a RISC-V specific system call to
|
|
|
4841a6 |
+ * flush the instruction cache.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * __NR_riscv_flush_icache is defined to flush the instruction cache over an
|
|
|
4841a6 |
+ * address range, with the flush applying to either all threads or just the
|
|
|
4841a6 |
+ * caller. We don't currently do anything with the address range, that's just
|
|
|
4841a6 |
+ * in there for forwards compatibility.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
+#ifndef __NR_riscv_flush_icache
|
|
|
4841a6 |
+#define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15)
|
|
|
4841a6 |
+#endif
|
|
|
4841a6 |
+__SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache)
|
|
|
4841a6 |
diff --git a/linux-headers/asm-s390/unistd_32.h b/linux-headers/asm-s390/unistd_32.h
|
|
|
4841a6 |
index 8f97d98128..8e644d65f5 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-s390/unistd_32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-s390/unistd_32.h
|
|
|
4841a6 |
@@ -420,5 +420,7 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule 445
|
|
|
4841a6 |
#define __NR_landlock_restrict_self 446
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
+#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_S390_UNISTD_32_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-s390/unistd_64.h b/linux-headers/asm-s390/unistd_64.h
|
|
|
4841a6 |
index 021ffc30e6..51da542fec 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-s390/unistd_64.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-s390/unistd_64.h
|
|
|
4841a6 |
@@ -368,5 +368,7 @@
|
|
|
4841a6 |
#define __NR_landlock_add_rule 445
|
|
|
4841a6 |
#define __NR_landlock_restrict_self 446
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
+#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_S390_UNISTD_64_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
|
|
|
4841a6 |
index 5a776a08f7..2da3316bb5 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-x86/kvm.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-x86/kvm.h
|
|
|
4841a6 |
@@ -373,9 +373,23 @@ struct kvm_debugregs {
|
|
|
4841a6 |
__u64 reserved[9];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
-/* for KVM_CAP_XSAVE */
|
|
|
4841a6 |
+/* for KVM_CAP_XSAVE and KVM_CAP_XSAVE2 */
|
|
|
4841a6 |
struct kvm_xsave {
|
|
|
4841a6 |
+ /*
|
|
|
4841a6 |
+ * KVM_GET_XSAVE2 and KVM_SET_XSAVE write and read as many bytes
|
|
|
4841a6 |
+ * as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2)
|
|
|
4841a6 |
+ * respectively, when invoked on the vm file descriptor.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2)
|
|
|
4841a6 |
+ * will always be at least 4096. Currently, it is only greater
|
|
|
4841a6 |
+ * than 4096 if a dynamic feature has been enabled with
|
|
|
4841a6 |
+ * ``arch_prctl()``, but this may change in the future.
|
|
|
4841a6 |
+ *
|
|
|
4841a6 |
+ * The offsets of the state save areas in struct kvm_xsave follow
|
|
|
4841a6 |
+ * the contents of CPUID leaf 0xD on the host.
|
|
|
4841a6 |
+ */
|
|
|
4841a6 |
__u32 region[1024];
|
|
|
4841a6 |
+ __u32 extra[0];
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
#define KVM_MAX_XCRS 16
|
|
|
4841a6 |
diff --git a/linux-headers/asm-x86/unistd_32.h b/linux-headers/asm-x86/unistd_32.h
|
|
|
4841a6 |
index 9c9ffe312b..87e1e977af 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-x86/unistd_32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-x86/unistd_32.h
|
|
|
4841a6 |
@@ -440,6 +440,7 @@
|
|
|
4841a6 |
#define __NR_memfd_secret 447
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_32_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-x86/unistd_64.h b/linux-headers/asm-x86/unistd_64.h
|
|
|
4841a6 |
index 084f1eef9c..147a78d623 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-x86/unistd_64.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-x86/unistd_64.h
|
|
|
4841a6 |
@@ -362,6 +362,7 @@
|
|
|
4841a6 |
#define __NR_memfd_secret 447
|
|
|
4841a6 |
#define __NR_process_mrelease 448
|
|
|
4841a6 |
#define __NR_futex_waitv 449
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node 450
|
|
|
4841a6 |
|
|
|
4841a6 |
|
|
|
4841a6 |
#endif /* _ASM_UNISTD_64_H */
|
|
|
4841a6 |
diff --git a/linux-headers/asm-x86/unistd_x32.h b/linux-headers/asm-x86/unistd_x32.h
|
|
|
4841a6 |
index a2441affc2..27098db7fb 100644
|
|
|
4841a6 |
--- a/linux-headers/asm-x86/unistd_x32.h
|
|
|
4841a6 |
+++ b/linux-headers/asm-x86/unistd_x32.h
|
|
|
4841a6 |
@@ -315,6 +315,7 @@
|
|
|
4841a6 |
#define __NR_memfd_secret (__X32_SYSCALL_BIT + 447)
|
|
|
4841a6 |
#define __NR_process_mrelease (__X32_SYSCALL_BIT + 448)
|
|
|
4841a6 |
#define __NR_futex_waitv (__X32_SYSCALL_BIT + 449)
|
|
|
4841a6 |
+#define __NR_set_mempolicy_home_node (__X32_SYSCALL_BIT + 450)
|
|
|
4841a6 |
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
|
|
|
4841a6 |
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
|
|
|
4841a6 |
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
|
|
|
4841a6 |
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
|
|
|
4841a6 |
index 02c5e7b7bb..00af3bc333 100644
|
|
|
4841a6 |
--- a/linux-headers/linux/kvm.h
|
|
|
4841a6 |
+++ b/linux-headers/linux/kvm.h
|
|
|
4841a6 |
@@ -1130,6 +1130,9 @@ struct kvm_ppc_resize_hpt {
|
|
|
4841a6 |
#define KVM_CAP_BINARY_STATS_FD 203
|
|
|
4841a6 |
#define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
|
|
|
4841a6 |
#define KVM_CAP_ARM_MTE 205
|
|
|
4841a6 |
+#define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206
|
|
|
4841a6 |
+#define KVM_CAP_VM_GPA_BITS 207
|
|
|
4841a6 |
+#define KVM_CAP_XSAVE2 208
|
|
|
4841a6 |
|
|
|
4841a6 |
#ifdef KVM_CAP_IRQ_ROUTING
|
|
|
4841a6 |
|
|
|
4841a6 |
@@ -1161,11 +1164,20 @@ struct kvm_irq_routing_hv_sint {
|
|
|
4841a6 |
__u32 sint;
|
|
|
4841a6 |
};
|
|
|
4841a6 |
|
|
|
4841a6 |
+struct kvm_irq_routing_xen_evtchn {
|
|
|
4841a6 |
+ __u32 port;
|
|
|
4841a6 |
+ __u32 vcpu;
|
|
|
4841a6 |
+ __u32 priority;
|
|
|
4841a6 |
+};
|
|
|
4841a6 |
+
|
|
|
4841a6 |
+#define KVM_IRQ_ROUTING_XEN_EVTCHN_PRIO_2LEVEL ((__u32)(-1))
|
|
|
4841a6 |
+
|
|
|
4841a6 |
/* gsi routing entry types */
|
|
|
4841a6 |
#define KVM_IRQ_ROUTING_IRQCHIP 1
|
|
|
4841a6 |
#define KVM_IRQ_ROUTING_MSI 2
|
|
|
4841a6 |
#define KVM_IRQ_ROUTING_S390_ADAPTER 3
|
|
|
4841a6 |
#define KVM_IRQ_ROUTING_HV_SINT 4
|
|
|
4841a6 |
+#define KVM_IRQ_ROUTING_XEN_EVTCHN 5
|
|
|
4841a6 |
|
|
|
4841a6 |
struct kvm_irq_routing_entry {
|
|
|
4841a6 |
__u32 gsi;
|
|
|
4841a6 |
@@ -1177,6 +1189,7 @@ struct kvm_irq_routing_entry {
|
|
|
4841a6 |
struct kvm_irq_routing_msi msi;
|
|
|
4841a6 |
struct kvm_irq_routing_s390_adapter adapter;
|
|
|
4841a6 |
struct kvm_irq_routing_hv_sint hv_sint;
|
|
|
4841a6 |
+ struct kvm_irq_routing_xen_evtchn xen_evtchn;
|
|
|
4841a6 |
__u32 pad[8];
|
|
|
4841a6 |
} u;
|
|
|
4841a6 |
};
|
|
|
4841a6 |
@@ -1207,6 +1220,7 @@ struct kvm_x86_mce {
|
|
|
4841a6 |
#define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1)
|
|
|
4841a6 |
#define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2)
|
|
|
4841a6 |
#define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3)
|
|
|
4841a6 |
+#define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4)
|
|
|
4841a6 |
|
|
|
4841a6 |
struct kvm_xen_hvm_config {
|
|
|
4841a6 |
__u32 flags;
|
|
|
4841a6 |
@@ -1609,6 +1623,9 @@ struct kvm_enc_region {
|
|
|
4841a6 |
#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)
|
|
|
4841a6 |
#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)
|
|
|
4841a6 |
|
|
|
4841a6 |
+/* Available with KVM_CAP_XSAVE2 */
|
|
|
4841a6 |
+#define KVM_GET_XSAVE2 _IOR(KVMIO, 0xcf, struct kvm_xsave)
|
|
|
4841a6 |
+
|
|
|
4841a6 |
struct kvm_s390_pv_sec_parm {
|
|
|
4841a6 |
__u64 origin;
|
|
|
4841a6 |
__u64 length;
|
|
|
4841a6 |
--
|
|
|
4841a6 |
2.35.3
|
|
|
4841a6 |
|