header update request
v2 cover header update request
We need new headers for live migration and in-kernel interrupt controller support.
However just copying new headers breaks at least PPC so dummy kvm_arch_init_irq_routing() is required as well.
Changes since v1:
* added dummy functions for ARM and S390 as they are supposed to get broken after the headers update;
* now headers are from v3.10-rc5 (the previous try was for rc4).
Alexey Kardashevskiy (3):
KVM: ARM: Add dummy kvm_arch_init_irq_routing()
KVM: S390: Add dummy kvm_arch_init_irq_routing()
linux-headers: Update to v3.10-rc5
Scott Wood (1):
KVM: PPC: Add dummy kvm_arch_init_irq_routing()
linux-headers/asm-arm/kvm.h | 12 ++-- linux-headers/asm-mips/kvm.h | 138 +++++++++++++++++++++++++++++++++++++ linux-headers/asm-mips/kvm_para.h | 1 + linux-headers/asm-powerpc/kvm.h | 89 ++++++++++++++++++++++++ linux-headers/asm-x86/kvm.h | 1 - linux-headers/linux/kvm.h | 42 +++++++++-- linux-headers/linux/vfio.h | 1 + linux-headers/linux/vhost.h | 28 ++++++++ target-arm/kvm.c | 4 ++ target-ppc/kvm.c | 4 ++ target-s390x/kvm.c | 4 ++ 11 files changed, 311 insertions(+), 13 deletions(-) create mode 100644 linux-headers/asm-mips/kvm.h create mode 100644 linux-headers/asm-mips/kvm_para.h
Signature · 1 line
1.7.10.4
PATCH v2 1/4 KVM: ARM: Add dummy kvm_arch_init_irq_routing()
The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this.
--- target-arm/kvm.c | 4 ++++ 1 file changed, 4 insertions(+)
target-arm/kvm.c +4 -0
@@ -493,3 +493,7 @@ void kvm_arch_remove_all_hw_breakpoints(void) {qemu_log_mask (LOG_UNIMP ,"%s: not implemented\n" , __func__); } + +void kvm_arch_init_irq_routing (KVMState *s) +{ +}
Signature · 1 line
1.7.10.4
PATCH v2 2/4 KVM: S390: Add dummy kvm_arch_init_irq_routing()
In reply to Alexey KardashevskiyThe common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this.
--- target-s390x/kvm.c | 4 ++++ 1 file changed, 4 insertions(+)
target-s390x/kvm.c +4 -0
@@ -928,3 +928,7 @@ void kvm_s390_enable_css_support(S390CPU *cpu) r =kvm_vcpu_ioctl (CPU (cpu),KVM_ENABLE_CAP , &cap);assert (r ==0 ); } + +void kvm_arch_init_irq_routing (KVMState *s) +{ +}
Signature · 1 line
1.7.10.4
PATCH v2 3/4 KVM: PPC: Add dummy kvm_arch_init_irq_routing()
In reply to Alexey KardashevskiyFrom: Scott Wood <[email protected]>
The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this.
Unlike x86, PPC does not have one default irqchip, so there's no common code that we'd stick here. Even if you ignore the routes themselves, which even on x86 are not set up in this function, the initial XICS kernel implementation will not support IRQ routing, so it's best to leave even the general feature flags up to the specific irqchip code.
--- target-ppc/kvm.c | 4 ++++ 1 file changed, 4 insertions(+)
target-ppc/kvm.c +4 -0
@@ -1797,3 +1797,7 @@ int kvm_arch_on_sigbus(int code, void *addr) {return 1 ; } + +void kvm_arch_init_irq_routing (KVMState *s) +{ +}
Signature · 1 line
1.7.10.4
PATCH v2 4/4 linux-headers: Update to v3.10-rc5
In reply to Alexey KardashevskiyThis adds symbols required for PPC64 pseries platform features:
1. sPAPR live migration;
2. in-kernel XICS interrupt controller.
--- linux-headers/asm-arm/kvm.h | 12 ++-- linux-headers/asm-mips/kvm.h | 138 +++++++++++++++++++++++++++++++++++++ linux-headers/asm-mips/kvm_para.h | 1 + linux-headers/asm-powerpc/kvm.h | 89 ++++++++++++++++++++++++ linux-headers/asm-x86/kvm.h | 1 - linux-headers/linux/kvm.h | 42 +++++++++-- linux-headers/linux/vfio.h | 1 + linux-headers/linux/vhost.h | 28 ++++++++ 8 files changed, 299 insertions(+), 13 deletions(-) create mode 100644 linux-headers/asm-mips/kvm.h create mode 100644 linux-headers/asm-mips/kvm_para.h
linux-headers/asm-arm/kvm.h +6 -6
@@ -53,12 +53,12 @@#define KVM_ARM_FIQ_spsr fiq_regs[7]struct kvm_regs { -struct pt_regs usr_regs;/* R0_usr - R14_usr, PC, CPSR */ -__u32 svc_regs[3 ];/* SP_svc, LR_svc, SPSR_svc */ -__u32 abt_regs[3 ];/* SP_abt, LR_abt, SPSR_abt */ -__u32 und_regs[3 ];/* SP_und, LR_und, SPSR_und */ -__u32 irq_regs[3 ];/* SP_irq, LR_irq, SPSR_irq */ -__u32 fiq_regs[8 ];/* R8_fiq - R14_fiq, SPSR_fiq */ +struct pt_regs usr_regs;/* R0_usr - R14_usr, PC, CPSR */ +unsigned long svc_regs[3 ];/* SP_svc, LR_svc, SPSR_svc */ +unsigned long abt_regs[3 ];/* SP_abt, LR_abt, SPSR_abt */ +unsigned long und_regs[3 ];/* SP_und, LR_und, SPSR_und */ +unsigned long irq_regs[3 ];/* SP_irq, LR_irq, SPSR_irq */ +unsigned long fiq_regs[8 ];/* R8_fiq - R14_fiq, SPSR_fiq */ };/* Supported Processor Types */
linux-headers/asm-mips/kvm.h new file +138 -0
138 lines not on this page · raw message
linux-headers/asm-mips/kvm_para.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/kvm_para.h>
linux-headers/asm-powerpc/kvm.h +89 -0
119 lines not on this page · raw message
linux-headers/asm-x86/kvm.h +0 -1
@@ -29,7 +29,6 @@#define __KVM_HAVE_PIT#define __KVM_HAVE_IOAPIC#define __KVM_HAVE_IRQ_LINE -#define __KVM_HAVE_DEVICE_ASSIGNMENT#define __KVM_HAVE_MSI#define __KVM_HAVE_USER_NMI#define __KVM_HAVE_GUEST_DEBUG
linux-headers/linux/kvm.h +36 -6
76 lines not on this page · raw message
linux-headers/linux/vfio.h +1 -0
@@ -319,6 +319,7 @@ enum {VFIO_PCI_INTX_IRQ_INDEX ,VFIO_PCI_MSI_IRQ_INDEX ,VFIO_PCI_MSIX_IRQ_INDEX , +VFIO_PCI_ERR_IRQ_INDEX , VFIO_PCI_NUM_IRQS };
linux-headers/linux/vhost.h +28 -0
@@ -127,4 +127,32 @@ struct vhost_memory {/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */ #define VHOST_NET_F_VIRTIO_NET_HDR 27 +/* VHOST_SCSI specific definitions */ + +/* +* Used by QEMU userspace to ensure a consistent vhost-scsi ABI. +* +* ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate + +* RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage +* ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_scsi_target. +* All the targets under vhost_wwpn can be seen and used by guset. +*/ + +#define VHOST_SCSI_ABI_VERSION 1 + +struct vhost_scsi_target { +int abi_version; +char vhost_wwpn[224 ];/* TRANSPORT_IQN_LEN */ +unsigned short vhost_tpgt; +unsigned short reserved; +}; + +#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target) +#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target) +/* Changing this breaks userspace. */ +#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int) +/* Set and get the events missed flag */ +#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32) +#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32) +#endif
Signature · 1 line
1.7.10.4
Michael Tokarev
AppliedQuoted 9 lines · Alexey Kardashevskiy
We need new headers for live migration and in-kernel interrupt controller support.
However just copying new headers breaks at least PPC so dummy
kvm_arch_init_irq_routing()is required as well.Changes since v1:
* added dummy functions for ARM and S390 as they are supposed to get broken after the headers update;
* now headers are from v3.10-rc5 (the previous try was for rc4).
Thank you, applied to the trivial patches queue.
Some notes:
1. I haven't tried to build it on neither PPC nor ARM nor S390, so I've no idea if that will work or not... ;)
2. the difference between -rc4 and rc5 is wihin mips kvm.h, which introduced a bunch of definitions in there. And whole patchset introduces kvm definitions for mips for the first time. JFYI.
/mjt
Quoted 11 lines · Michael Tokarev
Quoted 9 lines · Alexey Kardashevskiy
We need new headers for live migration and in-kernel interrupt controller support.
However just copying new headers breaks at least PPC so dummy
kvm_arch_init_irq_routing()is required as well.Changes since v1:
* added dummy functions for ARM and S390 as they are supposed to get broken after the headers update;
* now headers are from v3.10-rc5 (the previous try was for rc4).
Quoted 6 lines
Thank you, applied to the trivial patches queue.
Some notes:
1. I haven't tried to build it on neither PPC nor ARM nor S390, so I've no idea if that will work or not... ;)
All I can try is building fully emulated versions on x86, this passes :)
Quoted 5 lines
2. the difference between -rc4 and rc5 is wihin mips
kvm.h, which introduced a bunch of definitions in there. And whole patchset introduces kvm definitions for mips for the first time. JFYI.
I noticed but as I noticed, commit messages of linux headers update are not very detailed and do not include what exactly changed in kernel headers. Or do they?
Quoted 3 lines
/mjt
Signature · 1 line
Alexey