[PATCH 04/12] Update linux headers

2021-12-07 Thread Matthew Rosato
This is a placeholder that pulls in 5.16-rc4 + unmerged kernel changes
required by this item.  A proper header sync can be done once the
associated kernel code merges.

Signed-off-by: Matthew Rosato 
---
 include/standard-headers/asm-x86/kvm_para.h   |   1 +
 include/standard-headers/drm/drm_fourcc.h | 121 +-
 include/standard-headers/linux/ethtool.h  |  31 +
 include/standard-headers/linux/fuse.h |  15 ++-
 include/standard-headers/linux/pci_regs.h |   6 +
 include/standard-headers/linux/virtio_gpu.h   |  18 ++-
 include/standard-headers/linux/virtio_ids.h   |  24 
 include/standard-headers/linux/virtio_mem.h   |   9 +-
 include/standard-headers/linux/virtio_vsock.h |   3 +-
 linux-headers/asm-arm64/unistd.h  |   1 +
 linux-headers/asm-generic/unistd.h|  22 +++-
 linux-headers/asm-mips/unistd_n32.h   |   2 +
 linux-headers/asm-mips/unistd_n64.h   |   2 +
 linux-headers/asm-mips/unistd_o32.h   |   2 +
 linux-headers/asm-powerpc/unistd_32.h |   2 +
 linux-headers/asm-powerpc/unistd_64.h |   2 +
 linux-headers/asm-s390/kvm.h  |   1 +
 linux-headers/asm-s390/unistd_32.h|   2 +
 linux-headers/asm-s390/unistd_64.h|   2 +
 linux-headers/asm-x86/kvm.h   |   5 +
 linux-headers/asm-x86/unistd_32.h |   3 +
 linux-headers/asm-x86/unistd_64.h |   3 +
 linux-headers/asm-x86/unistd_x32.h|   3 +
 linux-headers/linux/kvm.h |  41 +-
 linux-headers/linux/vfio.h|  22 
 linux-headers/linux/vfio_zdev.h   |  51 
 26 files changed, 370 insertions(+), 24 deletions(-)

diff --git a/include/standard-headers/asm-x86/kvm_para.h 
b/include/standard-headers/asm-x86/kvm_para.h
index 204cfb8640..f0235e58a1 100644
--- a/include/standard-headers/asm-x86/kvm_para.h
+++ b/include/standard-headers/asm-x86/kvm_para.h
@@ -8,6 +8,7 @@
  * should be used to determine that a VM is running under KVM.
  */
 #define KVM_CPUID_SIGNATURE0x4000
+#define KVM_SIGNATURE "KVMKVMKVM\0\0\0"
 
 /* This CPUID returns two feature bitmaps in eax, edx. Before enabling
  * a particular paravirtualization, the appropriate feature bit should
diff --git a/include/standard-headers/drm/drm_fourcc.h 
b/include/standard-headers/drm/drm_fourcc.h
index 352b51fd0a..2c025cb4fe 100644
--- a/include/standard-headers/drm/drm_fourcc.h
+++ b/include/standard-headers/drm/drm_fourcc.h
@@ -103,6 +103,12 @@ extern "C" {
 /* 8 bpp Red */
 #define DRM_FORMAT_R8  fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
 
+/* 10 bpp Red */
+#define DRM_FORMAT_R10 fourcc_code('R', '1', '0', ' ') /* [15:0] x:R 
6:10 little endian */
+
+/* 12 bpp Red */
+#define DRM_FORMAT_R12 fourcc_code('R', '1', '2', ' ') /* [15:0] x:R 
4:12 little endian */
+
 /* 16 bpp Red */
 #define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R 
little endian */
 
@@ -372,6 +378,12 @@ extern "C" {
 
 #define DRM_FORMAT_RESERVED  ((1ULL << 56) - 1)
 
+#define fourcc_mod_get_vendor(modifier) \
+   (((modifier) >> 56) & 0xff)
+
+#define fourcc_mod_is_vendor(modifier, vendor) \
+   (fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_VENDOR_## vendor)
+
 #define fourcc_mod_code(vendor, val) \
uint64_t)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | ((val) & 
0x00ffULL))
 
@@ -899,9 +911,9 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
 
 /*
  * The top 4 bits (out of the 56 bits alloted for specifying vendor specific
- * modifiers) denote the category for modifiers. Currently we have only two
- * categories of modifiers ie AFBC and MISC. We can have a maximum of sixteen
- * different categories.
+ * modifiers) denote the category for modifiers. Currently we have three
+ * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of
+ * sixteen different categories.
  */
 #define DRM_FORMAT_MOD_ARM_CODE(__type, __val) \
fourcc_mod_code(ARM, ((uint64_t)(__type) << 52) | ((__val) & 
0x000fULL))
@@ -1016,6 +1028,109 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t 
modifier)
  */
 #define AFBC_FORMAT_MOD_USM(1ULL << 12)
 
+/*
+ * Arm Fixed-Rate Compression (AFRC) modifiers
+ *
+ * AFRC is a proprietary fixed rate image compression protocol and format,
+ * designed to provide guaranteed bandwidth and memory footprint
+ * reductions in graphics and media use-cases.
+ *
+ * AFRC buffers consist of one or more planes, with the same components
+ * and meaning as an uncompressed buffer using the same pixel format.
+ *
+ * Within each plane, the pixel/luma/chroma values are grouped into
+ * "coding unit" blocks which are individually compressed to a
+ * fixed size (in bytes). All coding units within a given plane of a buffer
+ * store the same number of values, and have the same compressed size.
+ *
+ * The coding unit size is 

[Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Cornelia Huck
Base is kvm-next as of 2013/01/16.

Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
 linux-headers/asm-generic/kvm_para.h |  4 
 linux-headers/asm-powerpc/kvm_para.h |  2 +-
 linux-headers/linux/kvm.h| 21 +
 3 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 linux-headers/asm-generic/kvm_para.h

diff --git a/linux-headers/asm-generic/kvm_para.h 
b/linux-headers/asm-generic/kvm_para.h
new file mode 100644
index 000..486f0af
--- /dev/null
+++ b/linux-headers/asm-generic/kvm_para.h
@@ -0,0 +1,4 @@
+/*
+ * There isn't anything here, but the file must not be empty or patch
+ * will delete it.
+ */
diff --git a/linux-headers/asm-powerpc/kvm_para.h 
b/linux-headers/asm-powerpc/kvm_para.h
index 7e64f57..484bcaa 100644
--- a/linux-headers/asm-powerpc/kvm_para.h
+++ b/linux-headers/asm-powerpc/kvm_para.h
@@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {
 
 #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
 
-#include asm/epapr_hcalls.h
+#include uapi/asm/epapr_hcalls.h
 
 #define KVM_FEATURE_MAGIC_PAGE 1
 
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index bfdbf4d..2602437 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -168,6 +168,7 @@ struct kvm_pit_config {
 #define KVM_EXIT_PAPR_HCALL  19
 #define KVM_EXIT_S390_UCONTROL   20
 #define KVM_EXIT_WATCHDOG 21
+#define KVM_EXIT_S390_TSCH22
 
 /* For KVM_EXIT_INTERNAL_ERROR */
 /* Emulate instruction failed. */
@@ -285,6 +286,15 @@ struct kvm_run {
__u64 ret;
__u64 args[9];
} papr_hcall;
+   /* KVM_EXIT_S390_TSCH */
+   struct {
+   __u16 subchannel_id;
+   __u16 subchannel_nr;
+   __u32 io_int_parm;
+   __u32 io_int_word;
+   __u32 ipb;
+   __u8 dequeued;
+   } s390_tsch;
/* Fix the size of the union. */
char padding[256];
};
@@ -397,10 +407,20 @@ struct kvm_s390_psw {
 #define KVM_S390_PROGRAM_INT   0xfffe0001u
 #define KVM_S390_SIGP_SET_PREFIX   0xfffe0002u
 #define KVM_S390_RESTART   0xfffe0003u
+#define KVM_S390_MCHK  0xfffe1000u
 #define KVM_S390_INT_VIRTIO0x2603u
 #define KVM_S390_INT_SERVICE   0x2401u
 #define KVM_S390_INT_EMERGENCY 0x1201u
 #define KVM_S390_INT_EXTERNAL_CALL 0x1202u
+/* Anything below 0xfffeu is taken by INT_IO */
+#define KVM_S390_INT_IO(ai,cssid,ssid,schid)   \
+   (((schid)) |   \
+((ssid)  16) |  \
+((cssid)  18) | \
+((ai)  26))
+#define KVM_S390_INT_IO_MIN0xu
+#define KVM_S390_INT_IO_MAX0xfffdu
+
 
 struct kvm_s390_interrupt {
__u32 type;
@@ -635,6 +655,7 @@ struct kvm_ppc_smmu_info {
 #define KVM_CAP_IRQFD_RESAMPLE 82
 #define KVM_CAP_PPC_BOOKE_WATCHDOG 83
 #define KVM_CAP_PPC_HTAB_FD 84
+#define KVM_CAP_S390_CSS_SUPPORT 85
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
-- 
1.7.12.4




Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Peter Maydell
On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote:
 Base is kvm-next as of 2013/01/16.

 --- a/linux-headers/asm-powerpc/kvm_para.h
 +++ b/linux-headers/asm-powerpc/kvm_para.h
 @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {

  #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)

 -#include asm/epapr_hcalls.h
 +#include uapi/asm/epapr_hcalls.h

This is reintroducing a bug, isn't it? cf
http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02807.html

(maybe this just means the sync needs to be against some
different set of kernel headers?)

-- PMM



Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Cornelia Huck
On Thu, 17 Jan 2013 15:05:46 +
Peter Maydell peter.mayd...@linaro.org wrote:

 On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote:
  Base is kvm-next as of 2013/01/16.
 
  --- a/linux-headers/asm-powerpc/kvm_para.h
  +++ b/linux-headers/asm-powerpc/kvm_para.h
  @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {
 
   #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
 
  -#include asm/epapr_hcalls.h
  +#include uapi/asm/epapr_hcalls.h
 
 This is reintroducing a bug, isn't it? cf
 http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02807.html
 
 (maybe this just means the sync needs to be against some
 different set of kernel headers?)
 
 -- PMM
 

Hm, I seem to have some stale copy here - will check.




Re: [Qemu-devel] [PATCH 04/12] Update linux headers.

2013-01-17 Thread Alexander Graf

On 17.01.2013, at 17:20, Cornelia Huck wrote:

 On Thu, 17 Jan 2013 15:05:46 +
 Peter Maydell peter.mayd...@linaro.org wrote:
 
 On 17 January 2013 14:23, Cornelia Huck cornelia.h...@de.ibm.com wrote:
 Base is kvm-next as of 2013/01/16.
 
 --- a/linux-headers/asm-powerpc/kvm_para.h
 +++ b/linux-headers/asm-powerpc/kvm_para.h
 @@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {
 
 #define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
 
 -#include asm/epapr_hcalls.h
 +#include uapi/asm/epapr_hcalls.h
 
 This is reintroducing a bug, isn't it? cf
 http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02807.html
 
 (maybe this just means the sync needs to be against some
 different set of kernel headers?)
 
 -- PMM
 
 
 Hm, I seem to have some stale copy here - will check.

No, the problem is that the fix went into master, but you were probably basing 
off of next. This is the way Linus envisions Linux development. Next is always 
a broken tree.


Alex