mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 02:24:38 +00:00
linux-headers: Update to Linux v6.19-rc1
Mainly for adding support for VFIO DMABUF. While at it, update all headers. The header update breaks virtio-net due to virtio_net_hdr_v1_hash changes. Include the virtio-net changes to avoid build and bisect failures. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260121114111.34045-2-skolothumtho@nvidia.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
0e387bd1df
commit
49f6b93d07
@@ -31,7 +31,7 @@
|
||||
#define KVM_SPSR_FIQ 4
|
||||
#define KVM_NR_SPSR 5
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <linux/psci.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -857,9 +857,11 @@ __SYSCALL(__NR_open_tree_attr, sys_open_tree_attr)
|
||||
__SYSCALL(__NR_file_getattr, sys_file_getattr)
|
||||
#define __NR_file_setattr 469
|
||||
__SYSCALL(__NR_file_setattr, sys_file_setattr)
|
||||
#define __NR_listns 470
|
||||
__SYSCALL(__NR_listns, sys_listns)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 470
|
||||
#define __NR_syscalls 471
|
||||
|
||||
/*
|
||||
* 32 bit systems traditionally used different
|
||||
|
||||
@@ -104,6 +104,7 @@ struct kvm_fpu {
|
||||
#define KVM_LOONGARCH_VM_FEAT_PV_IPI 6
|
||||
#define KVM_LOONGARCH_VM_FEAT_PV_STEALTIME 7
|
||||
#define KVM_LOONGARCH_VM_FEAT_PTW 8
|
||||
#define KVM_LOONGARCH_VM_FEAT_MSGINT 9
|
||||
|
||||
/* Device Control API on vcpu fd */
|
||||
#define KVM_LOONGARCH_VCPU_CPUCFG 0
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
|
||||
#if __BITS_PER_LONG == 32
|
||||
#include <asm/unistd_32.h>
|
||||
#else
|
||||
#include <asm/unistd_64.h>
|
||||
#endif
|
||||
|
||||
@@ -322,6 +322,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -398,5 +398,6 @@
|
||||
#define __NR_open_tree_attr (__NR_Linux + 467)
|
||||
#define __NR_file_getattr (__NR_Linux + 468)
|
||||
#define __NR_file_setattr (__NR_Linux + 469)
|
||||
#define __NR_listns (__NR_Linux + 470)
|
||||
|
||||
#endif /* _ASM_UNISTD_N32_H */
|
||||
|
||||
@@ -374,5 +374,6 @@
|
||||
#define __NR_open_tree_attr (__NR_Linux + 467)
|
||||
#define __NR_file_getattr (__NR_Linux + 468)
|
||||
#define __NR_file_setattr (__NR_Linux + 469)
|
||||
#define __NR_listns (__NR_Linux + 470)
|
||||
|
||||
#endif /* _ASM_UNISTD_N64_H */
|
||||
|
||||
@@ -444,5 +444,6 @@
|
||||
#define __NR_open_tree_attr (__NR_Linux + 467)
|
||||
#define __NR_file_getattr (__NR_Linux + 468)
|
||||
#define __NR_file_setattr (__NR_Linux + 469)
|
||||
#define __NR_listns (__NR_Linux + 470)
|
||||
|
||||
#endif /* _ASM_UNISTD_O32_H */
|
||||
|
||||
@@ -451,6 +451,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_32_H */
|
||||
|
||||
@@ -423,6 +423,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#define KVM_INTERRUPT_SET -1U
|
||||
#define KVM_INTERRUPT_UNSET -2U
|
||||
|
||||
#define KVM_EXIT_FAIL_ENTRY_NO_VSFILE (1ULL << 0)
|
||||
|
||||
/* for KVM_GET_REGS and KVM_SET_REGS */
|
||||
struct kvm_regs {
|
||||
};
|
||||
@@ -211,6 +213,7 @@ enum KVM_RISCV_SBI_EXT_ID {
|
||||
KVM_RISCV_SBI_EXT_STA,
|
||||
KVM_RISCV_SBI_EXT_SUSP,
|
||||
KVM_RISCV_SBI_EXT_FWFT,
|
||||
KVM_RISCV_SBI_EXT_MPXY,
|
||||
KVM_RISCV_SBI_EXT_MAX,
|
||||
};
|
||||
|
||||
|
||||
@@ -317,6 +317,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_32_H */
|
||||
|
||||
@@ -327,6 +327,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
#ifndef __ASM_S390_BITSPERLONG_H
|
||||
#define __ASM_S390_BITSPERLONG_H
|
||||
|
||||
#ifndef __s390x__
|
||||
#define __BITS_PER_LONG 32
|
||||
#else
|
||||
#define __BITS_PER_LONG 64
|
||||
#endif
|
||||
|
||||
#include <asm-generic/bitsperlong.h>
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
#ifndef _ASM_S390_UNISTD_H_
|
||||
#define _ASM_S390_UNISTD_H_
|
||||
|
||||
#ifdef __s390x__
|
||||
#include <asm/unistd_64.h>
|
||||
#else
|
||||
#include <asm/unistd_32.h>
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_S390_UNISTD_H_ */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _ASM_S390_UNISTD_64_H
|
||||
#define _ASM_S390_UNISTD_64_H
|
||||
#ifndef _ASM_UNISTD_64_H
|
||||
#define _ASM_UNISTD_64_H
|
||||
|
||||
#define __NR_exit 1
|
||||
#define __NR_fork 2
|
||||
@@ -390,5 +389,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
#endif /* _ASM_S390_UNISTD_64_H */
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -500,6 +500,7 @@ struct kvm_sync_regs {
|
||||
/* vendor-specific groups and attributes for system fd */
|
||||
#define KVM_X86_GRP_SEV 1
|
||||
# define KVM_X86_SEV_VMSA_FEATURES 0
|
||||
# define KVM_X86_SNP_POLICY_BITS 1
|
||||
|
||||
struct kvm_vmx_nested_state_data {
|
||||
__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
|
||||
|
||||
@@ -460,6 +460,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_32_H */
|
||||
|
||||
@@ -384,6 +384,7 @@
|
||||
#define __NR_open_tree_attr 467
|
||||
#define __NR_file_getattr 468
|
||||
#define __NR_file_setattr 469
|
||||
#define __NR_listns 470
|
||||
|
||||
|
||||
#endif /* _ASM_UNISTD_64_H */
|
||||
|
||||
@@ -337,6 +337,7 @@
|
||||
#define __NR_open_tree_attr (__X32_SYSCALL_BIT + 467)
|
||||
#define __NR_file_getattr (__X32_SYSCALL_BIT + 468)
|
||||
#define __NR_file_setattr (__X32_SYSCALL_BIT + 469)
|
||||
#define __NR_listns (__X32_SYSCALL_BIT + 470)
|
||||
#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)
|
||||
#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)
|
||||
#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
|
||||
|
||||
@@ -450,6 +450,16 @@ struct iommu_hwpt_vtd_s1 {
|
||||
* nested domain will translate the same as the nesting parent. The S1 will
|
||||
* install a Context Descriptor Table pointing at userspace memory translated
|
||||
* by the nesting parent.
|
||||
*
|
||||
* It's suggested to allocate a vDEVICE object carrying vSID and then re-attach
|
||||
* the nested domain, as soon as the vSID is available in the VMM level:
|
||||
*
|
||||
* - when Cfg=translate, a vDEVICE must be allocated prior to attaching to the
|
||||
* allocated nested domain, as CD/ATS invalidations and vevents need a vSID.
|
||||
* - when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain
|
||||
* attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if
|
||||
* VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to
|
||||
* report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort.
|
||||
*/
|
||||
struct iommu_hwpt_arm_smmuv3 {
|
||||
__aligned_le64 ste[2];
|
||||
|
||||
@@ -179,6 +179,7 @@ struct kvm_xen_exit {
|
||||
#define KVM_EXIT_LOONGARCH_IOCSR 38
|
||||
#define KVM_EXIT_MEMORY_FAULT 39
|
||||
#define KVM_EXIT_TDX 40
|
||||
#define KVM_EXIT_ARM_SEA 41
|
||||
|
||||
/* For KVM_EXIT_INTERNAL_ERROR */
|
||||
/* Emulate instruction failed. */
|
||||
@@ -465,6 +466,14 @@ struct kvm_run {
|
||||
} setup_event_notify;
|
||||
};
|
||||
} tdx;
|
||||
/* KVM_EXIT_ARM_SEA */
|
||||
struct {
|
||||
#define KVM_EXIT_ARM_SEA_FLAG_GPA_VALID (1ULL << 0)
|
||||
__u64 flags;
|
||||
__u64 esr;
|
||||
__u64 gva;
|
||||
__u64 gpa;
|
||||
} arm_sea;
|
||||
/* Fix the size of the union. */
|
||||
char padding[256];
|
||||
};
|
||||
@@ -955,6 +964,8 @@ struct kvm_enable_cap {
|
||||
#define KVM_CAP_RISCV_MP_STATE_RESET 242
|
||||
#define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243
|
||||
#define KVM_CAP_GUEST_MEMFD_FLAGS 244
|
||||
#define KVM_CAP_ARM_SEA_TO_USER 245
|
||||
#define KVM_CAP_S390_USER_OPEREXEC 246
|
||||
|
||||
struct kvm_irq_routing_irqchip {
|
||||
__u32 irqchip;
|
||||
|
||||
@@ -26,6 +26,7 @@ enum {
|
||||
MSHV_PT_BIT_LAPIC,
|
||||
MSHV_PT_BIT_X2APIC,
|
||||
MSHV_PT_BIT_GPA_SUPER_PAGES,
|
||||
MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
|
||||
MSHV_PT_BIT_COUNT,
|
||||
};
|
||||
|
||||
@@ -41,6 +42,8 @@ enum {
|
||||
* @pt_flags: Bitmask of 1 << MSHV_PT_BIT_*
|
||||
* @pt_isolation: MSHV_PT_ISOLATION_*
|
||||
*
|
||||
* This is the initial/v1 version for backward compatibility.
|
||||
*
|
||||
* Returns a file descriptor to act as a handle to a guest partition.
|
||||
* At this point the partition is not yet initialized in the hypervisor.
|
||||
* Some operations must be done with the partition in this state, e.g. setting
|
||||
@@ -52,6 +55,37 @@ struct mshv_create_partition {
|
||||
__u64 pt_isolation;
|
||||
};
|
||||
|
||||
#define MSHV_NUM_CPU_FEATURES_BANKS 2
|
||||
|
||||
/**
|
||||
* struct mshv_create_partition_v2
|
||||
*
|
||||
* This is extended version of the above initial MSHV_CREATE_PARTITION
|
||||
* ioctl and allows for following additional parameters:
|
||||
*
|
||||
* @pt_num_cpu_fbanks: Must be set to MSHV_NUM_CPU_FEATURES_BANKS.
|
||||
* @pt_cpu_fbanks: Disabled processor feature banks array.
|
||||
* @pt_disabled_xsave: Disabled xsave feature bits.
|
||||
*
|
||||
* pt_cpu_fbanks and pt_disabled_xsave are passed through as-is to the create
|
||||
* partition hypercall.
|
||||
*
|
||||
* Returns : same as above original mshv_create_partition
|
||||
*/
|
||||
struct mshv_create_partition_v2 {
|
||||
__u64 pt_flags;
|
||||
__u64 pt_isolation;
|
||||
__u16 pt_num_cpu_fbanks;
|
||||
__u8 pt_rsvd[6]; /* MBZ */
|
||||
__u64 pt_cpu_fbanks[MSHV_NUM_CPU_FEATURES_BANKS];
|
||||
__u64 pt_rsvd1[2]; /* MBZ */
|
||||
#if defined(__x86_64__)
|
||||
__u64 pt_disabled_xsave;
|
||||
#else
|
||||
__u64 pt_rsvd2; /* MBZ */
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
|
||||
/* /dev/mshv */
|
||||
#define MSHV_CREATE_PARTITION _IOW(MSHV_IOCTL, 0x00, struct mshv_create_partition)
|
||||
|
||||
@@ -89,7 +123,7 @@ enum {
|
||||
* @rsvd: MBZ
|
||||
*
|
||||
* Map or unmap a region of userspace memory to Guest Physical Addresses (GPA).
|
||||
* Mappings can't overlap in GPA space or userspace.
|
||||
* Mappings can't overlap in GPA space.
|
||||
* To unmap, these fields must match an existing mapping.
|
||||
*/
|
||||
struct mshv_user_mem_region {
|
||||
@@ -288,4 +322,84 @@ struct mshv_get_set_vp_state {
|
||||
* #define MSHV_ROOT_HVCALL _IOWR(MSHV_IOCTL, 0x07, struct mshv_root_hvcall)
|
||||
*/
|
||||
|
||||
/* Structure definitions, macros and IOCTLs for mshv_vtl */
|
||||
|
||||
#define MSHV_CAP_CORE_API_STABLE 0x0
|
||||
#define MSHV_CAP_REGISTER_PAGE 0x1
|
||||
#define MSHV_CAP_VTL_RETURN_ACTION 0x2
|
||||
#define MSHV_CAP_DR6_SHARED 0x3
|
||||
#define MSHV_MAX_RUN_MSG_SIZE 256
|
||||
|
||||
struct mshv_vp_registers {
|
||||
__u32 count; /* supports only 1 register at a time */
|
||||
__u32 reserved; /* Reserved for alignment or future use */
|
||||
__u64 regs_ptr; /* pointer to struct hv_register_assoc */
|
||||
};
|
||||
|
||||
struct mshv_vtl_set_eventfd {
|
||||
__s32 fd;
|
||||
__u32 flag;
|
||||
};
|
||||
|
||||
struct mshv_vtl_signal_event {
|
||||
__u32 connection_id;
|
||||
__u32 flag;
|
||||
};
|
||||
|
||||
struct mshv_vtl_sint_post_msg {
|
||||
__u64 message_type;
|
||||
__u32 connection_id;
|
||||
__u32 payload_size; /* Must not exceed HV_MESSAGE_PAYLOAD_BYTE_COUNT */
|
||||
__u64 payload_ptr; /* pointer to message payload (bytes) */
|
||||
};
|
||||
|
||||
struct mshv_vtl_ram_disposition {
|
||||
__u64 start_pfn;
|
||||
__u64 last_pfn;
|
||||
};
|
||||
|
||||
struct mshv_vtl_set_poll_file {
|
||||
__u32 cpu;
|
||||
__u32 fd;
|
||||
};
|
||||
|
||||
struct mshv_vtl_hvcall_setup {
|
||||
__u64 bitmap_array_size; /* stores number of bytes */
|
||||
__u64 allow_bitmap_ptr;
|
||||
};
|
||||
|
||||
struct mshv_vtl_hvcall {
|
||||
__u64 control; /* Hypercall control code */
|
||||
__u64 input_size; /* Size of the input data */
|
||||
__u64 input_ptr; /* Pointer to the input struct */
|
||||
__u64 status; /* Status of the hypercall (output) */
|
||||
__u64 output_size; /* Size of the output data */
|
||||
__u64 output_ptr; /* Pointer to the output struct */
|
||||
};
|
||||
|
||||
struct mshv_sint_mask {
|
||||
__u8 mask;
|
||||
__u8 reserved[7];
|
||||
};
|
||||
|
||||
/* /dev/mshv device IOCTL */
|
||||
#define MSHV_CHECK_EXTENSION _IOW(MSHV_IOCTL, 0x00, __u32)
|
||||
|
||||
/* vtl device */
|
||||
#define MSHV_CREATE_VTL _IOR(MSHV_IOCTL, 0x1D, char)
|
||||
#define MSHV_ADD_VTL0_MEMORY _IOW(MSHV_IOCTL, 0x21, struct mshv_vtl_ram_disposition)
|
||||
#define MSHV_SET_POLL_FILE _IOW(MSHV_IOCTL, 0x25, struct mshv_vtl_set_poll_file)
|
||||
#define MSHV_RETURN_TO_LOWER_VTL _IO(MSHV_IOCTL, 0x27)
|
||||
#define MSHV_GET_VP_REGISTERS _IOWR(MSHV_IOCTL, 0x05, struct mshv_vp_registers)
|
||||
#define MSHV_SET_VP_REGISTERS _IOW(MSHV_IOCTL, 0x06, struct mshv_vp_registers)
|
||||
|
||||
/* VMBus device IOCTLs */
|
||||
#define MSHV_SINT_SIGNAL_EVENT _IOW(MSHV_IOCTL, 0x22, struct mshv_vtl_signal_event)
|
||||
#define MSHV_SINT_POST_MESSAGE _IOW(MSHV_IOCTL, 0x23, struct mshv_vtl_sint_post_msg)
|
||||
#define MSHV_SINT_SET_EVENTFD _IOW(MSHV_IOCTL, 0x24, struct mshv_vtl_set_eventfd)
|
||||
#define MSHV_SINT_PAUSE_MESSAGE_STREAM _IOW(MSHV_IOCTL, 0x25, struct mshv_sint_mask)
|
||||
|
||||
/* hv_hvcall device */
|
||||
#define MSHV_HVCALL_SETUP _IOW(MSHV_IOCTL, 0x1E, struct mshv_vtl_hvcall_setup)
|
||||
#define MSHV_HVCALL _IOWR(MSHV_IOCTL, 0x1F, struct mshv_vtl_hvcall)
|
||||
#endif
|
||||
|
||||
@@ -47,32 +47,32 @@ typedef enum {
|
||||
* with possible values from the specification.
|
||||
*/
|
||||
SEV_RET_NO_FW_CALL = -1,
|
||||
SEV_RET_SUCCESS = 0,
|
||||
SEV_RET_INVALID_PLATFORM_STATE,
|
||||
SEV_RET_INVALID_GUEST_STATE,
|
||||
SEV_RET_INAVLID_CONFIG,
|
||||
SEV_RET_SUCCESS = 0,
|
||||
SEV_RET_INVALID_PLATFORM_STATE = 0x0001,
|
||||
SEV_RET_INVALID_GUEST_STATE = 0x0002,
|
||||
SEV_RET_INAVLID_CONFIG = 0x0003,
|
||||
SEV_RET_INVALID_CONFIG = SEV_RET_INAVLID_CONFIG,
|
||||
SEV_RET_INVALID_LEN,
|
||||
SEV_RET_ALREADY_OWNED,
|
||||
SEV_RET_INVALID_CERTIFICATE,
|
||||
SEV_RET_POLICY_FAILURE,
|
||||
SEV_RET_INACTIVE,
|
||||
SEV_RET_INVALID_ADDRESS,
|
||||
SEV_RET_BAD_SIGNATURE,
|
||||
SEV_RET_BAD_MEASUREMENT,
|
||||
SEV_RET_ASID_OWNED,
|
||||
SEV_RET_INVALID_ASID,
|
||||
SEV_RET_WBINVD_REQUIRED,
|
||||
SEV_RET_DFFLUSH_REQUIRED,
|
||||
SEV_RET_INVALID_GUEST,
|
||||
SEV_RET_INVALID_COMMAND,
|
||||
SEV_RET_ACTIVE,
|
||||
SEV_RET_HWSEV_RET_PLATFORM,
|
||||
SEV_RET_HWSEV_RET_UNSAFE,
|
||||
SEV_RET_UNSUPPORTED,
|
||||
SEV_RET_INVALID_PARAM,
|
||||
SEV_RET_RESOURCE_LIMIT,
|
||||
SEV_RET_SECURE_DATA_INVALID,
|
||||
SEV_RET_INVALID_LEN = 0x0004,
|
||||
SEV_RET_ALREADY_OWNED = 0x0005,
|
||||
SEV_RET_INVALID_CERTIFICATE = 0x0006,
|
||||
SEV_RET_POLICY_FAILURE = 0x0007,
|
||||
SEV_RET_INACTIVE = 0x0008,
|
||||
SEV_RET_INVALID_ADDRESS = 0x0009,
|
||||
SEV_RET_BAD_SIGNATURE = 0x000A,
|
||||
SEV_RET_BAD_MEASUREMENT = 0x000B,
|
||||
SEV_RET_ASID_OWNED = 0x000C,
|
||||
SEV_RET_INVALID_ASID = 0x000D,
|
||||
SEV_RET_WBINVD_REQUIRED = 0x000E,
|
||||
SEV_RET_DFFLUSH_REQUIRED = 0x000F,
|
||||
SEV_RET_INVALID_GUEST = 0x0010,
|
||||
SEV_RET_INVALID_COMMAND = 0x0011,
|
||||
SEV_RET_ACTIVE = 0x0012,
|
||||
SEV_RET_HWSEV_RET_PLATFORM = 0x0013,
|
||||
SEV_RET_HWSEV_RET_UNSAFE = 0x0014,
|
||||
SEV_RET_UNSUPPORTED = 0x0015,
|
||||
SEV_RET_INVALID_PARAM = 0x0016,
|
||||
SEV_RET_RESOURCE_LIMIT = 0x0017,
|
||||
SEV_RET_SECURE_DATA_INVALID = 0x0018,
|
||||
SEV_RET_INVALID_PAGE_SIZE = 0x0019,
|
||||
SEV_RET_INVALID_PAGE_STATE = 0x001A,
|
||||
SEV_RET_INVALID_MDATA_ENTRY = 0x001B,
|
||||
@@ -87,6 +87,22 @@ typedef enum {
|
||||
SEV_RET_RESTORE_REQUIRED = 0x0025,
|
||||
SEV_RET_RMP_INITIALIZATION_FAILED = 0x0026,
|
||||
SEV_RET_INVALID_KEY = 0x0027,
|
||||
SEV_RET_SHUTDOWN_INCOMPLETE = 0x0028,
|
||||
SEV_RET_INCORRECT_BUFFER_LENGTH = 0x0030,
|
||||
SEV_RET_EXPAND_BUFFER_LENGTH_REQUEST = 0x0031,
|
||||
SEV_RET_SPDM_REQUEST = 0x0032,
|
||||
SEV_RET_SPDM_ERROR = 0x0033,
|
||||
SEV_RET_SEV_STATUS_ERR_IN_DEV_CONN = 0x0035,
|
||||
SEV_RET_SEV_STATUS_INVALID_DEV_CTX = 0x0036,
|
||||
SEV_RET_SEV_STATUS_INVALID_TDI_CTX = 0x0037,
|
||||
SEV_RET_SEV_STATUS_INVALID_TDI = 0x0038,
|
||||
SEV_RET_SEV_STATUS_RECLAIM_REQUIRED = 0x0039,
|
||||
SEV_RET_IN_USE = 0x003A,
|
||||
SEV_RET_SEV_STATUS_INVALID_DEV_STATE = 0x003B,
|
||||
SEV_RET_SEV_STATUS_INVALID_TDI_STATE = 0x003C,
|
||||
SEV_RET_SEV_STATUS_DEV_CERT_CHANGED = 0x003D,
|
||||
SEV_RET_SEV_STATUS_RESYNC_REQ = 0x003E,
|
||||
SEV_RET_SEV_STATUS_RESPONSE_TOO_LARGE = 0x003F,
|
||||
SEV_RET_MAX,
|
||||
} sev_ret_code;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/stddef.h>
|
||||
|
||||
#define VFIO_API_VERSION 0
|
||||
|
||||
@@ -1478,6 +1479,33 @@ struct vfio_device_feature_bus_master {
|
||||
};
|
||||
#define VFIO_DEVICE_FEATURE_BUS_MASTER 10
|
||||
|
||||
/**
|
||||
* Upon VFIO_DEVICE_FEATURE_GET create a dma_buf fd for the
|
||||
* regions selected.
|
||||
*
|
||||
* open_flags are the typical flags passed to open(2), eg O_RDWR, O_CLOEXEC,
|
||||
* etc. offset/length specify a slice of the region to create the dmabuf from.
|
||||
* nr_ranges is the total number of (P2P DMA) ranges that comprise the dmabuf.
|
||||
*
|
||||
* flags should be 0.
|
||||
*
|
||||
* Return: The fd number on success, -1 and errno is set on failure.
|
||||
*/
|
||||
#define VFIO_DEVICE_FEATURE_DMA_BUF 11
|
||||
|
||||
struct vfio_region_dma_range {
|
||||
__u64 offset;
|
||||
__u64 length;
|
||||
};
|
||||
|
||||
struct vfio_device_feature_dma_buf {
|
||||
__u32 region_index;
|
||||
__u32 open_flags;
|
||||
__u32 flags;
|
||||
__u32 nr_ranges;
|
||||
struct vfio_region_dma_range dma_ranges[] __counted_by(nr_ranges);
|
||||
};
|
||||
|
||||
/* -------- API for Type1 VFIO IOMMU -------- */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user