linux-headers: update from kvm/next
PATCH 1/1 linux-headers: update from kvm/next
Update to 4.4 for Linux and 4.5 for KVM. The virgl feature name was changed after the previous sync; there is no other change to QEMU code.
Signed-off-by Paolo Bonzini <[email protected]>
--- hw/display/virtio-gpu.c | 4 +- include/standard-headers/asm-x86/hyperv.h | 12 + include/standard-headers/linux/input-event-codes.h | 805 +++++++++++++++++++ include/standard-headers/linux/input.h | 850 ++------------------- include/standard-headers/linux/pci_regs.h | 43 +- include/standard-headers/linux/virtio_gpu.h | 2 +- linux-headers/asm-arm64/kvm.h | 2 +- linux-headers/asm-powerpc/unistd.h | 13 + linux-headers/asm-s390/unistd.h | 19 +- linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/kvm.h | 25 + linux-headers/linux/psci.h | 18 + scripts/update-linux-headers.sh | 3 + 15 files changed, 1001 insertions(+), 798 deletions(-) create mode 100644 include/standard-headers/linux/input-event-codes.h
hw/display/virtio-gpu.c +2 -2
@@ -146,14 +146,14 @@ static uint64_t virtio_gpu_get_features(VirtIODevice *vdev, uint64_t features,VirtIOGPU *g =VIRTIO_GPU (vdev);if (virtio_gpu_virgl_enabled (g->conf)) { - features |= (1 <<VIRTIO_GPU_FEATURE_VIRGL ); + features |= (1 <<VIRTIO_GPU_F_VIRGL ); }return features; }static void virtio_gpu_set_features (VirtIODevice *vdev,uint64_t features) { -static const uint32_t virgl = (1 <<VIRTIO_GPU_FEATURE_VIRGL ); +static const uint32_t virgl = (1 <<VIRTIO_GPU_F_VIRGL );VirtIOGPU *g =VIRTIO_GPU (vdev); g->use_virgl_renderer = ((features & virgl) == virgl);
include/standard-headers/asm-x86/hyperv.h +12 -0
@@ -257,4 +257,16 @@ typedef struct _HV_REFERENCE_TSC_PAGE { int64_t tsc_offset; }HV_REFERENCE_TSC_PAGE , *PHV_REFERENCE_TSC_PAGE ; +/* Define the number of synthetic interrupt sources. */ +#define HV_SYNIC_SINT_COUNT (16) +/* Define the expected SynIC version. */ +#define HV_SYNIC_VERSION_1 (0x1) + +#define HV_SYNIC_CONTROL_ENABLE (1ULL << 0) +#define HV_SYNIC_SIMP_ENABLE (1ULL << 0) +#define HV_SYNIC_SIEFP_ENABLE (1ULL << 0) +#define HV_SYNIC_SINT_MASKED (1ULL << 16) +#define HV_SYNIC_SINT_AUTO_EOI (1ULL << 17) +#define HV_SYNIC_SINT_VECTOR_MASK (0xFF) +#endif
include/standard-headers/linux/input-event-codes.h new file +805 -0
805 lines not on this page · raw message
include/standard-headers/linux/input.h +66 -784
885 lines not on this page · raw message
include/standard-headers/linux/pci_regs.h +42 -1
55 lines not on this page · raw message
include/standard-headers/linux/virtio_gpu.h +1 -1
@@ -40,7 +40,7 @@#include "standard-headers/linux/types.h" -#define VIRTIO_GPU_FEATURE_VIRGL 0 +#define VIRTIO_GPU_F_VIRGL 0enum virtio_gpu_ctrl_type {VIRTIO_GPU_UNDEFINED =0 ,
linux-headers/asm-arm64/kvm.h +1 -1
@@ -32,7 +32,7 @@#ifndef __ASSEMBLY__#include <linux/psci.h> -#include <asm/types.h> +#include <linux/types.h> #include <asm/ptrace.h> #define __KVM_HAVE_GUEST_DEBUG
linux-headers/asm-powerpc/unistd.h +13 -0
@@ -388,5 +388,18 @@#define __NR_switch_endian 363#define __NR_userfaultfd 364#define __NR_membarrier 365 +#define __NR_semop 366 +#define __NR_semget 367 +#define __NR_semctl 368 +#define __NR_semtimedop 369 +#define __NR_msgsnd 370 +#define __NR_msgrcv 371 +#define __NR_msgget 372 +#define __NR_msgctl 373 +#define __NR_shmat 374 +#define __NR_shmdt 375 +#define __NR_shmget 376 +#define __NR_shmctl 377 +#define __NR_mlock2 378#endif /* _ASM_POWERPC_UNISTD_H_ */
linux-headers/asm-s390/unistd.h +10 -9
@@ -192,14 +192,14 @@#define __NR_set_tid_address 252#define __NR_fadvise64 253#define __NR_timer_create 254 -#define __NR_timer_settime (__NR_timer_create+1) -#define __NR_timer_gettime (__NR_timer_create+2) -#define __NR_timer_getoverrun (__NR_timer_create+3) -#define __NR_timer_delete (__NR_timer_create+4) -#define __NR_clock_settime (__NR_timer_create+5) -#define __NR_clock_gettime (__NR_timer_create+6) -#define __NR_clock_getres (__NR_timer_create+7) -#define __NR_clock_nanosleep (__NR_timer_create+8) +#define __NR_timer_settime 255 +#define __NR_timer_gettime 256 +#define __NR_timer_getoverrun 257 +#define __NR_timer_delete 258 +#define __NR_clock_settime 259 +#define __NR_clock_gettime 260 +#define __NR_clock_getres 261 +#define __NR_clock_nanosleep 262/* Number 263 is reserved for vserver */ #define __NR_statfs64 265#define __NR_fstatfs64 266
@@ -309,7 +309,8 @@#define __NR_recvfrom 371#define __NR_recvmsg 372#define __NR_shutdown 373 -#define NR_syscalls 374 +#define __NR_mlock2 374 +#define NR_syscalls 375/* * There are some system calls that are not present on 64 bit, some
linux-headers/asm-x86/unistd_32.h +1 -0
@@ -373,5 +373,6 @@#define __NR_shutdown 373#define __NR_userfaultfd 374#define __NR_membarrier 375 +#define __NR_mlock2 376#endif /* _ASM_X86_UNISTD_32_H */
linux-headers/asm-x86/unistd_64.h +1 -0
@@ -326,5 +326,6 @@#define __NR_execveat 322#define __NR_userfaultfd 323#define __NR_membarrier 324 +#define __NR_mlock2 325#endif /* _ASM_X86_UNISTD_64_H */
linux-headers/asm-x86/unistd_x32.h +1 -0
@@ -281,6 +281,7 @@#define __NR_bpf (__X32_SYSCALL_BIT + 321)#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323)#define __NR_membarrier (__X32_SYSCALL_BIT + 324) +#define __NR_mlock2 (__X32_SYSCALL_BIT + 325)#define __NR_rt_sigaction (__X32_SYSCALL_BIT + 512)#define __NR_rt_sigreturn (__X32_SYSCALL_BIT + 513)#define __NR_ioctl (__X32_SYSCALL_BIT + 514)
linux-headers/linux/kvm.h +25 -0
@@ -154,6 +154,20 @@ struct kvm_s390_skeys {__u32 flags;__u32 reserved[9 ]; }; + +struct kvm_hyperv_exit { +#define KVM_EXIT_HYPERV_SYNIC 1 +__u32 type; +union { +struct { +__u32 msr; +__u64 control; +__u64 evt_page; +__u64 msg_page; + } synic; + } u; +}; +#define KVM_S390_GET_SKEYS_NONE 1#define KVM_S390_SKEYS_MAX 1048576
@@ -184,6 +198,7 @@ struct kvm_s390_skeys {#define KVM_EXIT_SYSTEM_EVENT 24#define KVM_EXIT_S390_STSI 25#define KVM_EXIT_IOAPIC_EOI 26 +#define KVM_EXIT_HYPERV 27/* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */
@@ -338,6 +353,8 @@ struct kvm_run {struct {__u8 vector; } eoi; +/* KVM_EXIT_HYPERV */ +struct kvm_hyperv_exit hyperv;/* Fix the size of the union. */ char padding[256 ]; };
@@ -831,6 +848,7 @@ struct kvm_ppc_smmu_info {#define KVM_CAP_GUEST_DEBUG_HW_WPS 120#define KVM_CAP_SPLIT_IRQCHIP 121#define KVM_CAP_IOEVENTFD_ANY_LENGTH 122 +#define KVM_CAP_HYPERV_SYNIC 123#ifdef KVM_CAP_IRQ_ROUTING
@@ -854,10 +872,16 @@ struct kvm_irq_routing_s390_adapter {__u32 adapter_id; }; +struct kvm_irq_routing_hv_sint { +__u32 vcpu; +__u32 sint; +}; +/* gsi routing entry types */ #define KVM_IRQ_ROUTING_IRQCHIP 1#define KVM_IRQ_ROUTING_MSI 2#define KVM_IRQ_ROUTING_S390_ADAPTER 3 +#define KVM_IRQ_ROUTING_HV_SINT 4struct kvm_irq_routing_entry {__u32 gsi;
@@ -868,6 +892,7 @@ struct kvm_irq_routing_entry {struct kvm_irq_routing_irqchip irqchip;struct kvm_irq_routing_msi msi;struct kvm_irq_routing_s390_adapter adapter; +struct kvm_irq_routing_hv_sint hv_sint;__u32 pad[8 ]; } u; };
linux-headers/linux/psci.h +18 -0
@@ -46,6 +46,11 @@#define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5)#define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7) +#define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) +#define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) + +#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) +/* PSCI v0.2 power state encoding for CPU_SUSPEND function */ #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff#define PSCI_0_2_POWER_STATE_ID_SHIFT 0
@@ -56,6 +61,13 @@#define PSCI_0_2_POWER_STATE_AFFL_MASK \ (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) +/* PSCI extended power state encoding for CPU_SUSPEND function */ +#define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff +#define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0 +#define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30 +#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \ + (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT) +/* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ #define PSCI_0_2_AFFINITY_LEVEL_ON 0#define PSCI_0_2_AFFINITY_LEVEL_OFF 1
@@ -76,6 +88,11 @@#define PSCI_VERSION_MINOR (ver) \ ((ver) & PSCI_VERSION_MINOR_MASK) +/* PSCI features decoding (>=1.0) */ +#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1 +#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ + (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) +/* PSCI return values (inclusive of all PSCI versions) */ #define PSCI_RET_SUCCESS 0#define PSCI_RET_NOT_SUPPORTED -1
@@ -86,5 +103,6 @@#define PSCI_RET_INTERNAL_FAILURE -6#define PSCI_RET_NOT_PRESENT -7#define PSCI_RET_DISABLED -8 +#define PSCI_RET_INVALID_ADDRESS -9#endif /* _LINUX_PSCI_H */
scripts/update-linux-headers.sh +3 -0
@@ -36,6 +36,7 @@ cp_portable() { -e 'linux/types' \ -e 'stdint' \ -e 'linux/if_ether' \ + -e 'input-event-codes' \ -e 'sys/' \ > /dev/null then
@@ -48,6 +49,7 @@ cp_portable() { -e 's/__s\([0-9][0-9]*\)/int\1_t/g' \ -e 's/__le\([0-9][0-9]*\)/uint\1_t/g' \ -e 's/__be\([0-9][0-9]*\)/uint\1_t/g' \ + -e 's/input-event-codes/standard-headers\/linux\/&/' \ -e 's/<linux\/\([^>]*\)>/"standard-headers\/linux\/\1"/' \ -e 's/__bitwise__//' \ -e 's/__attribute__((packed))/QEMU_PACKED/' \
@@ -128,6 +130,7 @@ EOF rm -rf "$output/include/standard-headers/linux" mkdir -p "$output/include/standard-headers/linux" for i in "$tmpdir"/include/linux/*virtio*.h "$tmpdir/include/linux/input.h" \ + "$tmpdir/include/linux/input-event-codes.h" \ "$tmpdir/include/linux/pci_regs.h"; do cp_portable "$i" "$output/include/standard-headers/linux" done
Signature · 1 line
2.5.0
Quoted 1 line · Paolo Bonzini
The virgl feature name was changed after the previous sync
This is why we should never sync against anything other than mainline kernels or maybe kvm-next...
thanks
-- PMM