Skip to content

Commit

Permalink
linux-headers: update to current kvm/next
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Apr 23, 2024
1 parent b40b8eb commit ab0c7fb
Show file tree
Hide file tree
Showing 23 changed files with 1,120 additions and 740 deletions.
8 changes: 0 additions & 8 deletions hw/i386/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,6 @@ DeviceState *ioapic_init_secondary(GSIState *gsi_state)
return dev;
}

struct setup_data {
uint64_t next;
uint32_t type;
uint32_t len;
uint8_t data[];
} __attribute__((packed));


/*
* The entry point into the kernel for PVH boot is different from
* the native entry point. The PVH entry is defined by the x86/HVM
Expand Down
17 changes: 2 additions & 15 deletions include/standard-headers/asm-x86/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
#ifndef _ASM_X86_BOOTPARAM_H
#define _ASM_X86_BOOTPARAM_H

/* setup_data/setup_indirect types */
#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 "standard-headers/asm-x86/setup_data.h"

/* ram_size flags */
#define RAMDISK_IMAGE_START_MASK 0x07FF
Expand All @@ -38,6 +24,7 @@
#define XLF_EFI_KEXEC (1<<4)
#define XLF_5LEVEL (1<<5)
#define XLF_5LEVEL_ENABLED (1<<6)
#define XLF_MEM_ENCRYPTION (1<<7)


#endif /* _ASM_X86_BOOTPARAM_H */
3 changes: 1 addition & 2 deletions include/standard-headers/asm-x86/kvm_para.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct kvm_clock_pairing {
#define KVM_ASYNC_PF_DELIVERY_AS_INT (1 << 3)

/* MSR_KVM_ASYNC_PF_INT */
#define KVM_ASYNC_PF_VEC_MASK GENMASK(7, 0)
#define KVM_ASYNC_PF_VEC_MASK __GENMASK(7, 0)

/* MSR_KVM_MIGRATION_CONTROL */
#define KVM_MIGRATION_READY (1 << 0)
Expand Down Expand Up @@ -142,7 +142,6 @@ struct kvm_vcpu_pv_apf_data {
uint32_t token;

uint8_t pad[56];
uint32_t enabled;
};

#define KVM_PV_EOI_BIT 0
Expand Down
83 changes: 83 additions & 0 deletions include/standard-headers/asm-x86/setup_data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_X86_SETUP_DATA_H
#define _ASM_X86_SETUP_DATA_H

/* setup_data/setup_indirect types */
#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)

#ifndef __ASSEMBLY__

#include "standard-headers/linux/types.h"

/* extensible setup data list node */
struct setup_data {
uint64_t next;
uint32_t type;
uint32_t len;
uint8_t data[];
};

/* extensible setup indirect data node */
struct setup_indirect {
uint32_t type;
uint32_t reserved; /* Reserved, must be set to zero. */
uint64_t len;
uint64_t addr;
};

/*
* The E820 memory region entry of the boot protocol ABI:
*/
struct boot_e820_entry {
uint64_t addr;
uint64_t size;
uint32_t type;
} QEMU_PACKED;

/*
* The boot loader is passing platform information via this Jailhouse-specific
* setup data structure.
*/
struct jailhouse_setup_data {
struct {
uint16_t version;
uint16_t compatible_version;
} QEMU_PACKED hdr;
struct {
uint16_t pm_timer_address;
uint16_t num_cpus;
uint64_t pci_mmconfig_base;
uint32_t tsc_khz;
uint32_t apic_khz;
uint8_t standard_ioapic;
uint8_t cpu_ids[255];
} QEMU_PACKED v1;
struct {
uint32_t flags;
} QEMU_PACKED v2;
} QEMU_PACKED;

/*
* IMA buffer setup data information from the previous kernel during kexec
*/
struct ima_setup_data {
uint64_t addr;
uint64_t size;
} QEMU_PACKED;

#endif /* __ASSEMBLY__ */

#endif /* _ASM_X86_SETUP_DATA_H */
48 changes: 48 additions & 0 deletions include/standard-headers/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,53 @@ static inline int ethtool_validate_duplex(uint8_t duplex)
#define IPV4_FLOW 0x10 /* hash only */
#define IPV6_FLOW 0x11 /* hash only */
#define ETHER_FLOW 0x12 /* spec only (ether_spec) */

/* Used for GTP-U IPv4 and IPv6.
* The format of GTP packets only includes
* elements such as TEID and GTP version.
* It is primarily intended for data communication of the UE.
*/
#define GTPU_V4_FLOW 0x13 /* hash only */
#define GTPU_V6_FLOW 0x14 /* hash only */

/* Use for GTP-C IPv4 and v6.
* The format of these GTP packets does not include TEID.
* Primarily expected to be used for communication
* to create sessions for UE data communication,
* commonly referred to as CSR (Create Session Request).
*/
#define GTPC_V4_FLOW 0x15 /* hash only */
#define GTPC_V6_FLOW 0x16 /* hash only */

/* Use for GTP-C IPv4 and v6.
* Unlike GTPC_V4_FLOW, the format of these GTP packets includes TEID.
* After session creation, it becomes this packet.
* This is mainly used for requests to realize UE handover.
*/
#define GTPC_TEID_V4_FLOW 0x17 /* hash only */
#define GTPC_TEID_V6_FLOW 0x18 /* hash only */

/* Use for GTP-U and extended headers for the PSC (PDU Session Container).
* The format of these GTP packets includes TEID and QFI.
* In 5G communication using UPF (User Plane Function),
* data communication with this extended header is performed.
*/
#define GTPU_EH_V4_FLOW 0x19 /* hash only */
#define GTPU_EH_V6_FLOW 0x1a /* hash only */

/* Use for GTP-U IPv4 and v6 PSC (PDU Session Container) extended headers.
* This differs from GTPU_EH_V(4|6)_FLOW in that it is distinguished by
* UL/DL included in the PSC.
* There are differences in the data included based on Downlink/Uplink,
* and can be used to distinguish packets.
* The functions described so far are useful when you want to
* handle communication from the mobile network in UPF, PGW, etc.
*/
#define GTPU_UL_V4_FLOW 0x1b /* hash only */
#define GTPU_UL_V6_FLOW 0x1c /* hash only */
#define GTPU_DL_V4_FLOW 0x1d /* hash only */
#define GTPU_DL_V6_FLOW 0x1e /* hash only */

/* Flag to enable additional fields in struct ethtool_rx_flow_spec */
#define FLOW_EXT 0x80000000
#define FLOW_MAC_EXT 0x40000000
Expand All @@ -2037,6 +2084,7 @@ static inline int ethtool_validate_duplex(uint8_t duplex)
#define RXH_IP_DST (1 << 5)
#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
#define RXH_GTP_TEID (1 << 8) /* teid in case of GTP */
#define RXH_DISCARD (1 << 31)

#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
Expand Down
39 changes: 36 additions & 3 deletions include/standard-headers/linux/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@
* 7.39
* - add FUSE_DIRECT_IO_ALLOW_MMAP
* - add FUSE_STATX and related structures
*
* 7.40
* - add max_stack_depth to fuse_init_out, add FUSE_PASSTHROUGH init flag
* - add backing_id to fuse_open_out, add FOPEN_PASSTHROUGH open flag
* - add FUSE_NO_EXPORT_SUPPORT init flag
* - add FUSE_NOTIFY_RESEND, add FUSE_HAS_RESEND init flag
*/

#ifndef _LINUX_FUSE_H
Expand Down Expand Up @@ -242,7 +248,7 @@
#define FUSE_KERNEL_VERSION 7

/** Minor version number of this interface */
#define FUSE_KERNEL_MINOR_VERSION 39
#define FUSE_KERNEL_MINOR_VERSION 40

/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
Expand Down Expand Up @@ -349,6 +355,7 @@ struct fuse_file_lock {
* FOPEN_STREAM: the file is stream-like (no file position at all)
* FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE)
* FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode
* FOPEN_PASSTHROUGH: passthrough read/write io for this open file
*/
#define FOPEN_DIRECT_IO (1 << 0)
#define FOPEN_KEEP_CACHE (1 << 1)
Expand All @@ -357,6 +364,7 @@ struct fuse_file_lock {
#define FOPEN_STREAM (1 << 4)
#define FOPEN_NOFLUSH (1 << 5)
#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
#define FOPEN_PASSTHROUGH (1 << 7)

/**
* INIT request/reply flags
Expand Down Expand Up @@ -406,6 +414,9 @@ struct fuse_file_lock {
* symlink and mknod (single group that matches parent)
* FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation
* FUSE_DIRECT_IO_ALLOW_MMAP: allow shared mmap in FOPEN_DIRECT_IO mode.
* FUSE_NO_EXPORT_SUPPORT: explicitly disable export support
* FUSE_HAS_RESEND: kernel supports resending pending requests, and the high bit
* of the request ID indicates resend requests
*/
#define FUSE_ASYNC_READ (1 << 0)
#define FUSE_POSIX_LOCKS (1 << 1)
Expand Down Expand Up @@ -445,6 +456,9 @@ struct fuse_file_lock {
#define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
#define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
#define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36)
#define FUSE_PASSTHROUGH (1ULL << 37)
#define FUSE_NO_EXPORT_SUPPORT (1ULL << 38)
#define FUSE_HAS_RESEND (1ULL << 39)

/* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */
#define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP
Expand Down Expand Up @@ -631,6 +645,7 @@ enum fuse_notify_code {
FUSE_NOTIFY_STORE = 4,
FUSE_NOTIFY_RETRIEVE = 5,
FUSE_NOTIFY_DELETE = 6,
FUSE_NOTIFY_RESEND = 7,
FUSE_NOTIFY_CODE_MAX,
};

Expand Down Expand Up @@ -757,7 +772,7 @@ struct fuse_create_in {
struct fuse_open_out {
uint64_t fh;
uint32_t open_flags;
uint32_t padding;
int32_t backing_id;
};

struct fuse_release_in {
Expand Down Expand Up @@ -873,7 +888,8 @@ struct fuse_init_out {
uint16_t max_pages;
uint16_t map_alignment;
uint32_t flags2;
uint32_t unused[7];
uint32_t max_stack_depth;
uint32_t unused[6];
};

#define CUSE_INIT_INFO_MAX 4096
Expand Down Expand Up @@ -956,6 +972,14 @@ struct fuse_fallocate_in {
uint32_t padding;
};

/**
* FUSE request unique ID flag
*
* Indicates whether this is a resend request. The receiver should handle this
* request accordingly.
*/
#define FUSE_UNIQUE_RESEND (1ULL << 63)

struct fuse_in_header {
uint32_t len;
uint32_t opcode;
Expand Down Expand Up @@ -1045,9 +1069,18 @@ struct fuse_notify_retrieve_in {
uint64_t dummy4;
};

struct fuse_backing_map {
int32_t fd;
uint32_t flags;
uint64_t padding;
};

/* Device ioctls: */
#define FUSE_DEV_IOC_MAGIC 229
#define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t)
#define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, \
struct fuse_backing_map)
#define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t)

struct fuse_lseek_in {
uint64_t fh;
Expand Down
1 change: 1 addition & 0 deletions include/standard-headers/linux/input-event-codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@

#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
#define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */

#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */
#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */
Expand Down
2 changes: 2 additions & 0 deletions include/standard-headers/linux/virtio_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ struct virtio_gpu_cmd_submit {

#define VIRTIO_GPU_CAPSET_VIRGL 1
#define VIRTIO_GPU_CAPSET_VIRGL2 2
/* 3 is reserved for gfxstream */
#define VIRTIO_GPU_CAPSET_VENUS 4

/* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
struct virtio_gpu_get_capset_info {
Expand Down
10 changes: 5 additions & 5 deletions include/standard-headers/linux/virtio_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ struct virtio_pci_cfg_cap {
#define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_READ 0x5
#define VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO 0x6

struct QEMU_PACKED virtio_admin_cmd_hdr {
struct virtio_admin_cmd_hdr {
uint16_t opcode;
/*
* 1 - SR-IOV
Expand All @@ -252,20 +252,20 @@ struct QEMU_PACKED virtio_admin_cmd_hdr {
uint64_t group_member_id;
};

struct QEMU_PACKED virtio_admin_cmd_status {
struct virtio_admin_cmd_status {
uint16_t status;
uint16_t status_qualifier;
/* Unused, reserved for future extensions. */
uint8_t reserved2[4];
};

struct QEMU_PACKED virtio_admin_cmd_legacy_wr_data {
struct virtio_admin_cmd_legacy_wr_data {
uint8_t offset; /* Starting offset of the register(s) to write. */
uint8_t reserved[7];
uint8_t registers[];
};

struct QEMU_PACKED virtio_admin_cmd_legacy_rd_data {
struct virtio_admin_cmd_legacy_rd_data {
uint8_t offset; /* Starting offset of the register(s) to read. */
};

Expand All @@ -275,7 +275,7 @@ struct QEMU_PACKED virtio_admin_cmd_legacy_rd_data {

#define VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO 4

struct QEMU_PACKED virtio_admin_cmd_notify_info_data {
struct virtio_admin_cmd_notify_info_data {
uint8_t flags; /* 0 = end of list, 1 = owner device, 2 = member device */
uint8_t bar; /* BAR of the member or the owner device */
uint8_t padding[6];
Expand Down

0 comments on commit ab0c7fb

Please sign in to comment.