linux-headers update against v3.16 pull request
PATCH 1/1 linux-headers update against v3.16 pull request
Based on commit 820b3fcdeb80 (KVM: add missing cleanup_srcu_struct, 2014-06-03). Introduces a new header, linux/psci.h, which is a dependency of asm-arm/kvm.h.
---
Alex, Cornelia, Peter, ok to apply to uq/master?
linux-headers/asm-arm/kvm.h | 10 ++-- linux-headers/asm-arm64/kvm.h | 13 ++++-- linux-headers/asm-mips/kvm.h | 35 ++++++++++++++ linux-headers/asm-powerpc/kvm.h | 2 +- linux-headers/asm-powerpc/kvm_para.h | 6 +++ linux-headers/asm-s390/kvm.h | 28 +++++++++++ linux-headers/linux/kvm.h | 17 ++++++- linux-headers/linux/psci.h | 90 ++++++++++++++++++++++++++++++++++++ scripts/update-linux-headers.sh | 2 +- 9 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 linux-headers/linux/psci.h
linux-headers/asm-arm/kvm.h +6 -4
@@ -20,6 +20,7 @@#define __ARM_KVM_H__#include <linux/types.h> +#include <linux/psci.h> #include <asm/ptrace.h> #define __KVM_HAVE_GUEST_DEBUG
@@ -83,6 +84,7 @@ struct kvm_regs {#define KVM_VGIC_V2_CPU_SIZE 0x2000#define KVM_ARM_VCPU_POWER_OFF 0/* CPU is started in OFF state */ +#define KVM_ARM_VCPU_PSCI_0_2 1/* CPU uses PSCI v0.2 */ struct kvm_vcpu_init {__u32 target;
@@ -201,9 +203,9 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) -#define KVM_PSCI_RET_SUCCESS 0 -#define KVM_PSCI_RET_NI ((unsigned long)-1) -#define KVM_PSCI_RET_INVAL ((unsigned long)-2) -#define KVM_PSCI_RET_DENIED ((unsigned long)-3) +#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS +#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED +#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS +#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED#endif /* __ARM_KVM_H__ */
linux-headers/asm-arm64/kvm.h +8 -5
@@ -31,6 +31,7 @@#define KVM_NR_SPSR 5#ifndef __ASSEMBLY__ +#include <linux/psci.h> #include <asm/types.h> #include <asm/ptrace.h>
@@ -56,8 +57,9 @@ struct kvm_regs {#define KVM_ARM_TARGET_FOUNDATION_V8 1#define KVM_ARM_TARGET_CORTEX_A57 2#define KVM_ARM_TARGET_XGENE_POTENZA 3 +#define KVM_ARM_TARGET_CORTEX_A53 4 -#define KVM_ARM_NUM_TARGETS 4 +#define KVM_ARM_NUM_TARGETS 5/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */ #define KVM_ARM_DEVICE_TYPE_SHIFT 0
@@ -77,6 +79,7 @@ struct kvm_regs {#define KVM_ARM_VCPU_POWER_OFF 0/* CPU is started in OFF state */ #define KVM_ARM_VCPU_EL1_32BIT 1/* CPU running a 32bit VM */ +#define KVM_ARM_VCPU_PSCI_0_2 2/* CPU uses PSCI v0.2 */ struct kvm_vcpu_init {__u32 target;
@@ -186,10 +189,10 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2)#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) -#define KVM_PSCI_RET_SUCCESS 0 -#define KVM_PSCI_RET_NI ((unsigned long)-1) -#define KVM_PSCI_RET_INVAL ((unsigned long)-2) -#define KVM_PSCI_RET_DENIED ((unsigned long)-3) +#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS +#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED +#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS +#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED#endif
linux-headers/asm-mips/kvm.h +35 -0
@@ -106,6 +106,41 @@ struct kvm_fpu {#define KVM_REG_MIPS_LO (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 33)#define KVM_REG_MIPS_PC (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 34) +/* KVM specific control registers */ + +/* +* CP0_Count control +* DC: Set 0: Master disable CP0_Count and set COUNT_RESUME to now +* Set 1: Master re-enable CP0_Count with unchanged bias, handling timer +* interrupts since COUNT_RESUME +* This can be used to freeze the timer to get a consistent snapshot of +* the CP0_Count and timer interrupt pending state, while also resuming +* safely without losing time or guest timer interrupts. +* Other: Reserved, do not change. +*/ +#define KVM_REG_MIPS_COUNT_CTL (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \ + 0x20000 | 0) +#define KVM_REG_MIPS_COUNT_CTL_DC 0x00000001 + +/* +* CP0_Count resume monotonic nanoseconds +* The monotonic nanosecond time of the last set of COUNT_CTL.DC (master +* disable). Any reads and writes of Count related registers while +* COUNT_CTL.DC=1 will appear to occur at this time. When COUNT_CTL.DC is +* cleared again (master enable) any timer interrupts since this time will be +* emulated. +* Modifications to times in the future are rejected. +*/ +#define KVM_REG_MIPS_COUNT_RESUME (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \ + 0x20000 | 1) +/* +* CP0_Count rate in Hz +* Specifies the rate of the CP0_Count timer in Hz. Modifications occur without +* discontinuities in CP0_Count. +*/ +#define KVM_REG_MIPS_COUNT_HZ (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \ + 0x20000 | 2) +/* * KVM MIPS specific structures and definitions *
linux-headers/asm-powerpc/kvm.h +1 -1
@@ -545,7 +545,6 @@ struct kvm_get_htab_header {#define KVM_REG_PPC_TCSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb1)#define KVM_REG_PPC_PID (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb2)#define KVM_REG_PPC_ACOP (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb3) -#define KVM_REG_PPC_WORT (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb4)#define KVM_REG_PPC_VRSAVE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb4)#define KVM_REG_PPC_LPCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb5)
@@ -555,6 +554,7 @@ struct kvm_get_htab_header {#define KVM_REG_PPC_ARCH_COMPAT (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb7)#define KVM_REG_PPC_DABRX (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb8) +#define KVM_REG_PPC_WORT (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb9)/* Transactional Memory checkpointed state: * This is all GPRs, all VSX regs and a subset of SPRs
linux-headers/asm-powerpc/kvm_para.h +6 -0
@@ -82,10 +82,16 @@ struct kvm_vcpu_arch_shared {#define KVM_FEATURE_MAGIC_PAGE 1 +/* Magic page flags from host to guest */ +#define KVM_MAGIC_FEAT_SR (1 << 0)/* MASn, ESR, PIR, and high SPRGs */ #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7 (1 << 1) +/* Magic page flags from guest to host */ + +#define MAGIC_PAGE_FLAG_NOT_MAPPED_NX (1 << 0) +#endif /* __POWERPC_KVM_PARA_H__ */
linux-headers/asm-s390/kvm.h +28 -0
@@ -15,6 +15,7 @@#include <linux/types.h> #define __KVM_S390 +#define __KVM_HAVE_GUEST_DEBUG/* Device control API: s390-specific devices */ #define KVM_DEV_FLIC_GET_ALL_IRQS 1
@@ -54,6 +55,13 @@ struct kvm_s390_io_adapter_req {__u64 addr; }; +/* kvm attr_group on vm fd */ +#define KVM_S390_VM_MEM_CTRL 0 + +/* kvm attributes for mem_ctrl */ +#define KVM_S390_VM_MEM_ENABLE_CMMA 0 +#define KVM_S390_VM_MEM_CLR_CMMA 1 +/* for KVM_GET_REGS and KVM_SET_REGS */ struct kvm_regs {/* general purpose regs for s390 */
@@ -72,11 +80,31 @@ struct kvm_fpu {__u64 fprs[16 ]; }; +#define KVM_GUESTDBG_USE_HW_BP 0x00010000 + +#define KVM_HW_BP 1 +#define KVM_HW_WP_WRITE 2 +#define KVM_SINGLESTEP 4 +struct kvm_debug_exit_arch { +__u64 addr; +__u8 type; +__u8 pad[7 ];/* Should be set to 0 */ +}; + +struct kvm_hw_breakpoint { +__u64 addr; +__u64 phys_addr; +__u64 len; +__u8 type; +__u8 pad[7 ];/* Should be set to 0 */ };/* for KVM_SET_GUEST_DEBUG */ struct kvm_guest_debug_arch { +__u32 nr_hw_bp; +__u32 pad;/* Should be set to 0 */ +struct kvm_hw_breakpoint *hw_bp; };#define KVM_SYNC_PREFIX (1UL << 0)
linux-headers/linux/kvm.h +16 -1
@@ -171,6 +171,7 @@ struct kvm_pit_config {#define KVM_EXIT_WATCHDOG 21#define KVM_EXIT_S390_TSCH 22#define KVM_EXIT_EPR 23 +#define KVM_EXIT_SYSTEM_EVENT 24/* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */
@@ -301,6 +302,13 @@ struct kvm_run {struct {__u32 epr; } epr; +/* KVM_EXIT_SYSTEM_EVENT */ +struct { +#define KVM_SYSTEM_EVENT_SHUTDOWN 1 +#define KVM_SYSTEM_EVENT_RESET 2 +__u32 type; +__u64 flags; + } system_event;/* Fix the size of the union. */ char padding[256 ]; };
@@ -416,6 +424,8 @@ struct kvm_s390_psw {#define KVM_S390_INT_PFAULT_INIT 0xfffe0004u#define KVM_S390_INT_PFAULT_DONE 0xfffe0005u#define KVM_S390_MCHK 0xfffe1000u +#define KVM_S390_INT_CLOCK_COMP 0xffff1004u +#define KVM_S390_INT_CPU_TIMER 0xffff1005u#define KVM_S390_INT_VIRTIO 0xffff2603u#define KVM_S390_INT_SERVICE 0xffff2401u#define KVM_S390_INT_EMERGENCY 0xffff1201u
@@ -515,6 +525,7 @@ enum { kvm_ioeventfd_flag_nr_pio, kvm_ioeventfd_flag_nr_deassign, kvm_ioeventfd_flag_nr_virtio_ccw_notify, + kvm_ioeventfd_flag_nr_fast_mmio, kvm_ioeventfd_flag_nr_max, };
@@ -529,7 +540,7 @@ enum {struct kvm_ioeventfd {__u64 datamatch;__u64 addr;/* legal pio/mmio address */ -__u32 len;/* 1, 2, 4, or 8 bytes */ +__u32 len;/* 1, 2, 4, or 8 bytes; or 0 to ignore length */ __s32 fd;__u32 flags;__u8 pad[36 ];
@@ -743,6 +754,10 @@ struct kvm_ppc_smmu_info {#define KVM_CAP_IOAPIC_POLARITY_IGNORED 97#define KVM_CAP_ENABLE_CAP_VM 98#define KVM_CAP_S390_IRQCHIP 99 +#define KVM_CAP_IOEVENTFD_NO_LENGTH 100 +#define KVM_CAP_VM_ATTRIBUTES 101 +#define KVM_CAP_ARM_PSCI_0_2 102 +#define KVM_CAP_PPC_FIXUP_HCALL 103#ifdef KVM_CAP_IRQ_ROUTING
linux-headers/linux/psci.h new file +90 -0
90 lines not on this page · raw message
scripts/update-linux-headers.sh +1 -1
@@ -61,7 +61,7 @@ done rm -rf "$output/linux-headers/linux" mkdir -p "$output/linux-headers/linux" -for header in kvm.h kvm_para.h vfio.h vhost.h virtio_config.h virtio_ring.h; do +for header in kvm.h kvm_para.h psci.h vfio.h vhost.h virtio_config.h virtio_ring.h; do cp "$tmpdir/include/linux/$header" "$output/linux-headers/linux" done rm -rf "$output/linux-headers/asm-generic"
Signature · 1 line
1.8.3.1
Quoted 5 lines · Paolo Bonzini
Based on commit
820b3fcdeb80(KVM: add missingcleanup_srcu_struct, 2014-06-03). Introduces a new header,linux/psci.h, which is a dependency ofasm-arm/kvm.h.Signed-off-by Paolo Bonzini <[email protected]>
I've just posted a very similar patch to the ML.
Alex
Il 04/06/2014 13:10, Alexander Graf ha scritto:
Quoted 8 lines · Paolo Bonzini
Quoted 5 lines
Based on commit
820b3fcdeb80(KVM: add missingcleanup_srcu_struct, 2014-06-03). Introduces a new header,linux/psci.h, which is a dependency ofasm-arm/kvm.h.Signed-off-by Paolo Bonzini <[email protected]>I've just posted a very similar patch to the ML.
It's okay for me to go ahead with your version (the only difference is that you split it in two, basically).
However, please make a separate pull request for it, so that it doesn't have to wait for other PPC work.
Paolo
Quoted 6 lines · Paolo Bonzini
Il 04/06/2014 13:10, Alexander Graf ha scritto:
Quoted 5 lines · Paolo Bonzini
Quoted 4 lines
Based on commit
820b3fcdeb80(KVM: add missingcleanup_srcu_struct, 2014-06-03). Introduces a new header,linux/psci.h, which is a dependency ofasm-arm/kvm.h.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Paolo Bonzini <[email protected]>I've just posted a very similar patch to the ML.
It's okay for me to go ahead with your version (the only difference is that you split it in two, basically).
However, please make a separate pull request for it, so that it doesn't have to wait for other PPC work.
I personally don't care much, but my ppc queue was really just waiting for this commit to happen so I can safeguard the hypercall patch ;).
I'll send a pull request for the whole thing out after an autotest run.
Alex
Il 04/06/2014 13:22, Alexander Graf ha scritto:
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
It's okay for me to go ahead with your version (the only difference is that you split it in two, basically).
Quoted 8 lines
Quoted 2 lines
However, please make a separate pull request for it, so that it doesn't have to wait for other PPC work.
I personally don't care much, but my ppc queue was really just waiting for this commit to happen so I can safeguard the hypercall patch ;).
I'll send a pull request for the whole thing out after an autotest run.
Sounds great!
Paolo
Quoted 8 lines · Paolo Bonzini
Il 04/06/2014 13:10, Alexander Graf ha scritto:
Quoted 6 lines · Paolo Bonzini
Quoted 5 lines
Based on commit
820b3fcdeb80(KVM: add missingcleanup_srcu_struct, 2014-06-03). Introduces a new header,linux/psci.h, which is a dependency ofasm-arm/kvm.h.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Paolo Bonzini <[email protected]>I've just posted a very similar patch to the ML.
It's okay for me to go ahead with your version (the only difference is that you split it in two, basically).
I much prefer the split version, personally -- I think that all our "update KVM headers" commits should be the purely automated result of running the update-header script.
thanks
-- PMM
Quoted 7 lines · On Wed, 4 Jun 2014 13:09:23 +0200 Paolo Bonzini <[email protected]> wrote:
Based on commit
820b3fcdeb80(KVM: add missingcleanup_srcu_struct, 2014-06-03). Introduces a new header,linux/psci.h, which is a dependency ofasm-arm/kvm.h.Signed-off-by Paolo Bonzini <[email protected]>---
Alex, Cornelia, Peter, ok to apply to uq/master?
*confused* Isn't part of this already in qemu/master since our sync with kvm/next?
Quoted 12 lines
linux-headers/asm-arm/kvm.h | 10 ++-- linux-headers/asm-arm64/kvm.h | 13 ++++-- linux-headers/asm-mips/kvm.h | 35 ++++++++++++++ linux-headers/asm-powerpc/kvm.h | 2 +- linux-headers/asm-powerpc/kvm_para.h | 6 +++ linux-headers/asm-s390/kvm.h | 28 +++++++++++ linux-headers/linux/kvm.h | 17 ++++++- linux-headers/linux/psci.h | 90 ++++++++++++++++++++++++++++++++++++ scripts/update-linux-headers.sh | 2 +- 9 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 linux-headers/linux/psci.h