From 7f4c837186fc09821cfebf94388a645ead246142 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 3 Jun 2024 14:22:19 -0700 Subject: [PATCH] Update to v6.9 kernel headers. Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-6.9 Test: Builds and bionic unit tests pass on raven. Test: Able to log in to an Android GO 32 bit device. Change-Id: If53a38bbb65c3c653ce790fe5c6e51597901a14e --- libc/kernel/uapi/asm-arm64/asm/hwcap.h | 15 + libc/kernel/uapi/asm-arm64/asm/kvm.h | 9 +- libc/kernel/uapi/asm-arm64/asm/sigcontext.h | 5 + libc/kernel/uapi/asm-generic/bitsperlong.h | 3 + libc/kernel/uapi/asm-riscv/asm/auxvec.h | 2 +- libc/kernel/uapi/asm-riscv/asm/hwprobe.h | 2 +- libc/kernel/uapi/asm-riscv/asm/kvm.h | 3 +- libc/kernel/uapi/asm-x86/asm/bootparam.h | 54 +- libc/kernel/uapi/asm-x86/asm/kvm.h | 259 ++++++++- libc/kernel/uapi/asm-x86/asm/kvm_para.h | 3 +- .../kernel/uapi/asm-x86/asm/processor-flags.h | 6 + libc/kernel/uapi/asm-x86/asm/setup_data.h | 64 ++ libc/kernel/uapi/drm/amdgpu_drm.h | 1 + libc/kernel/uapi/drm/i915_drm.h | 7 + libc/kernel/uapi/drm/xe_drm.h | 12 + libc/kernel/uapi/linux/auxvec.h | 2 + libc/kernel/uapi/linux/bits.h | 11 + libc/kernel/uapi/linux/bpf.h | 44 +- libc/kernel/uapi/linux/btrfs.h | 1 + libc/kernel/uapi/linux/can.h | 3 + libc/kernel/uapi/linux/can/isotp.h | 1 + libc/kernel/uapi/linux/can/raw.h | 10 + libc/kernel/uapi/linux/dpll.h | 9 + libc/kernel/uapi/linux/elf.h | 1 + libc/kernel/uapi/linux/ethtool.h | 13 + libc/kernel/uapi/linux/eventpoll.h | 9 + libc/kernel/uapi/linux/fb.h | 5 +- libc/kernel/uapi/linux/fs.h | 13 +- libc/kernel/uapi/linux/fuse.h | 27 +- libc/kernel/uapi/linux/if_link.h | 1 + libc/kernel/uapi/linux/input-event-codes.h | 1 + libc/kernel/uapi/linux/io_uring.h | 9 + libc/kernel/uapi/linux/ioam6_genl.h | 14 + libc/kernel/uapi/linux/kfd_ioctl.h | 11 +- libc/kernel/uapi/linux/kvm.h | 547 +----------------- libc/kernel/uapi/linux/lsm.h | 2 + libc/kernel/uapi/linux/magic.h | 1 + libc/kernel/uapi/linux/mctp.h | 9 + libc/kernel/uapi/linux/mdio.h | 4 + libc/kernel/uapi/linux/mempolicy.h | 1 + libc/kernel/uapi/linux/netdev.h | 17 + libc/kernel/uapi/linux/netfilter/nf_tables.h | 3 +- libc/kernel/uapi/linux/nexthop.h | 20 + libc/kernel/uapi/linux/nl80211.h | 20 +- libc/kernel/uapi/linux/pidfd.h | 4 + libc/kernel/uapi/linux/psp-sev.h | 31 + libc/kernel/uapi/linux/ptp_clock.h | 4 +- libc/kernel/uapi/linux/rkisp1-config.h | 1 + libc/kernel/uapi/linux/tc_act/tc_pedit.h | 2 +- libc/kernel/uapi/linux/ublk_cmd.h | 1 + libc/kernel/uapi/linux/usb/ch9.h | 1 + libc/kernel/uapi/linux/usb/functionfs.h | 9 + libc/kernel/uapi/linux/user_events.h | 4 +- libc/kernel/uapi/linux/vdpa.h | 16 + libc/kernel/uapi/linux/version.h | 4 +- libc/kernel/uapi/linux/vesa.h | 20 + libc/kernel/uapi/linux/vhost.h | 5 +- libc/kernel/uapi/linux/virtio_gpu.h | 1 + libc/kernel/uapi/linux/virtio_pci.h | 10 +- libc/kernel/uapi/linux/virtio_snd.h | 91 +++ libc/kernel/uapi/rdma/hns-abi.h | 14 + libc/kernel/uapi/scsi/scsi_bsg_mpi3mr.h | 2 +- libc/kernel/uapi/sound/intel/avs/tokens.h | 7 + libc/kernel/uapi/sound/sof/tokens.h | 2 + 64 files changed, 829 insertions(+), 654 deletions(-) create mode 100644 libc/kernel/uapi/asm-x86/asm/setup_data.h create mode 100644 libc/kernel/uapi/linux/bits.h create mode 100644 libc/kernel/uapi/linux/vesa.h diff --git a/libc/kernel/uapi/asm-arm64/asm/hwcap.h b/libc/kernel/uapi/asm-arm64/asm/hwcap.h index 5abff63f8..f5c720aba 100644 --- a/libc/kernel/uapi/asm-arm64/asm/hwcap.h +++ b/libc/kernel/uapi/asm-arm64/asm/hwcap.h @@ -86,4 +86,19 @@ #define HWCAP2_SVE_B16B16 (1UL << 45) #define HWCAP2_LRCPC3 (1UL << 46) #define HWCAP2_LSE128 (1UL << 47) +#define HWCAP2_FPMR (1UL << 48) +#define HWCAP2_LUT (1UL << 49) +#define HWCAP2_FAMINMAX (1UL << 50) +#define HWCAP2_F8CVT (1UL << 51) +#define HWCAP2_F8FMA (1UL << 52) +#define HWCAP2_F8DP4 (1UL << 53) +#define HWCAP2_F8DP2 (1UL << 54) +#define HWCAP2_F8E4M3 (1UL << 55) +#define HWCAP2_F8E5M2 (1UL << 56) +#define HWCAP2_SME_LUTV2 (1UL << 57) +#define HWCAP2_SME_F8F16 (1UL << 58) +#define HWCAP2_SME_F8F32 (1UL << 59) +#define HWCAP2_SME_SF8FMA (1UL << 60) +#define HWCAP2_SME_SF8DP4 (1UL << 61) +#define HWCAP2_SME_SF8DP2 (1UL << 62) #endif diff --git a/libc/kernel/uapi/asm-arm64/asm/kvm.h b/libc/kernel/uapi/asm-arm64/asm/kvm.h index 5ad90215b..1818c5f51 100644 --- a/libc/kernel/uapi/asm-arm64/asm/kvm.h +++ b/libc/kernel/uapi/asm-arm64/asm/kvm.h @@ -18,9 +18,7 @@ #include #include #include -#define __KVM_HAVE_GUEST_DEBUG #define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_READONLY_MEM #define __KVM_HAVE_VCPU_EVENTS #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 #define KVM_DIRTY_LOG_PAGE_OFFSET 64 @@ -40,9 +38,9 @@ struct kvm_regs { #define KVM_ARM_TARGET_GENERIC_V8 5 #define KVM_ARM_NUM_TARGETS 6 #define KVM_ARM_DEVICE_TYPE_SHIFT 0 -#define KVM_ARM_DEVICE_TYPE_MASK GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, KVM_ARM_DEVICE_TYPE_SHIFT) +#define KVM_ARM_DEVICE_TYPE_MASK __GENMASK(KVM_ARM_DEVICE_TYPE_SHIFT + 15, KVM_ARM_DEVICE_TYPE_SHIFT) #define KVM_ARM_DEVICE_ID_SHIFT 16 -#define KVM_ARM_DEVICE_ID_MASK GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, KVM_ARM_DEVICE_ID_SHIFT) +#define KVM_ARM_DEVICE_ID_MASK __GENMASK(KVM_ARM_DEVICE_ID_SHIFT + 15, KVM_ARM_DEVICE_ID_SHIFT) #define KVM_ARM_DEVICE_VGIC_V2 0 #define KVM_VGIC_V2_ADDR_TYPE_DIST 0 #define KVM_VGIC_V2_ADDR_TYPE_CPU 1 @@ -89,6 +87,9 @@ struct kvm_debug_exit_arch { struct kvm_sync_regs { __u64 device_irq_level; }; +#define KVM_ARM_DEV_EL1_VTIMER (1 << 0) +#define KVM_ARM_DEV_EL1_PTIMER (1 << 1) +#define KVM_ARM_DEV_PMU (1 << 2) struct kvm_pmu_event_filter { __u16 base_event; __u16 nevents; diff --git a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h index 6098fc78f..8e48d5581 100644 --- a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h +++ b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h @@ -52,6 +52,11 @@ struct tpidr2_context { struct _aarch64_ctx head; __u64 tpidr2; }; +#define FPMR_MAGIC 0x46504d52 +struct fpmr_context { + struct _aarch64_ctx head; + __u64 fpmr; +}; #define ZA_MAGIC 0x54366345 struct za_context { struct _aarch64_ctx head; diff --git a/libc/kernel/uapi/asm-generic/bitsperlong.h b/libc/kernel/uapi/asm-generic/bitsperlong.h index 969913b11..11dcc1a11 100644 --- a/libc/kernel/uapi/asm-generic/bitsperlong.h +++ b/libc/kernel/uapi/asm-generic/bitsperlong.h @@ -13,4 +13,7 @@ #define __BITS_PER_LONG 32 #endif #endif +#ifndef __BITS_PER_LONG_LONG +#define __BITS_PER_LONG_LONG 64 +#endif #endif diff --git a/libc/kernel/uapi/asm-riscv/asm/auxvec.h b/libc/kernel/uapi/asm-riscv/asm/auxvec.h index 446fc54ff..755f4e95a 100644 --- a/libc/kernel/uapi/asm-riscv/asm/auxvec.h +++ b/libc/kernel/uapi/asm-riscv/asm/auxvec.h @@ -15,6 +15,6 @@ #define AT_L2_CACHEGEOMETRY 45 #define AT_L3_CACHESIZE 46 #define AT_L3_CACHEGEOMETRY 47 -#define AT_VECTOR_SIZE_ARCH 9 +#define AT_VECTOR_SIZE_ARCH 10 #define AT_MINSIGSTKSZ 51 #endif diff --git a/libc/kernel/uapi/asm-riscv/asm/hwprobe.h b/libc/kernel/uapi/asm-riscv/asm/hwprobe.h index 6f8d8f585..5c8256102 100644 --- a/libc/kernel/uapi/asm-riscv/asm/hwprobe.h +++ b/libc/kernel/uapi/asm-riscv/asm/hwprobe.h @@ -48,7 +48,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28) #define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29) #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) -#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) +#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31) #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) diff --git a/libc/kernel/uapi/asm-riscv/asm/kvm.h b/libc/kernel/uapi/asm-riscv/asm/kvm.h index 054e1a121..4c759edd9 100644 --- a/libc/kernel/uapi/asm-riscv/asm/kvm.h +++ b/libc/kernel/uapi/asm-riscv/asm/kvm.h @@ -11,7 +11,6 @@ #include #include #define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_READONLY_MEM #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 #define KVM_INTERRUPT_SET - 1U #define KVM_INTERRUPT_UNSET - 2U @@ -126,6 +125,8 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZVFH, KVM_RISCV_ISA_EXT_ZVFHMIN, KVM_RISCV_ISA_EXT_ZFA, + KVM_RISCV_ISA_EXT_ZTSO, + KVM_RISCV_ISA_EXT_ZACAS, KVM_RISCV_ISA_EXT_MAX, }; enum KVM_RISCV_SBI_EXT_ID { diff --git a/libc/kernel/uapi/asm-x86/asm/bootparam.h b/libc/kernel/uapi/asm-x86/asm/bootparam.h index c87a8afe5..6a4b59ce3 100644 --- a/libc/kernel/uapi/asm-x86/asm/bootparam.h +++ b/libc/kernel/uapi/asm-x86/asm/bootparam.h @@ -6,19 +6,7 @@ */ #ifndef _ASM_X86_BOOTPARAM_H #define _ASM_X86_BOOTPARAM_H -#define SETUP_NONE 0 -#define SETUP_E820_EXT 1 -#define SETUP_DTB 2 -#define SETUP_PCI 3 -#define SETUP_EFI 4 -#define SETUP_APPLE_PROPERTIES 5 -#define SETUP_JAILHOUSE 6 -#define SETUP_CC_BLOB 7 -#define SETUP_IMA 8 -#define SETUP_RNG_SEED 9 -#define SETUP_ENUM_MAX SETUP_RNG_SEED -#define SETUP_INDIRECT (1 << 31) -#define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) +#include #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 @@ -34,6 +22,7 @@ #define XLF_EFI_KEXEC (1 << 4) #define XLF_5LEVEL (1 << 5) #define XLF_5LEVEL_ENABLED (1 << 6) +#define XLF_MEM_ENCRYPTION (1 << 7) #ifndef __ASSEMBLY__ #include #include @@ -41,18 +30,6 @@ #include #include #include