Patchwork [1/2] linux-headers: update for s390 floating interrupt controller

login
register
mail settings
Submitter Jens Freimann
Date Sept. 6, 2013, 12:19 p.m.
Message ID <1378469970-62769-2-git-send-email-jfrei@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/273170/
State New
Headers show

Comments

Jens Freimann - Sept. 6, 2013, 12:19 p.m.
Add symbols required for the s390 floating interrupt controller (flic)

Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
---
 linux-headers/asm-s390/kvm.h |  5 ++++
 linux-headers/linux/kvm.h    | 65 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
Peter Maydell - Sept. 6, 2013, 12:23 p.m.
On 6 September 2013 13:19, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote:
> Add symbols required for the s390 floating interrupt controller (flic)

Updates to linux-headers should be the result of a sync
against a specified mainline kernel revision, please
(otherwise this should be an RFC patchset).

thanks
-- PMM
Peter Maydell - Sept. 6, 2013, 12:32 p.m.
On 6 September 2013 13:19, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote:
> @@ -839,6 +903,7 @@ struct kvm_device_attr {
>  #define KVM_DEV_TYPE_FSL_MPIC_20       1
>  #define KVM_DEV_TYPE_FSL_MPIC_42       2
>  #define KVM_DEV_TYPE_XICS              3
> +#define KVM_DEV_TYPE_FLIC              4

Christoffer's patchset switching the ARM VGIC to this
list also uses 4 as its enumeration value:

https://lists.cs.columbia.edu/pipermail/kvmarm/2013-August/006822.html

That patchset isn't in yet, but maybe you should use
5 to avoid conflicts?

thanks
-- PMM
Jens Freimann - Sept. 6, 2013, 12:34 p.m.
On Fri, Sep 06, 2013 at 01:23:32PM +0100, Peter Maydell wrote:
> On 6 September 2013 13:19, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote:
> > Add symbols required for the s390 floating interrupt controller (flic)
> 
> Updates to linux-headers should be the result of a sync
> against a specified mainline kernel revision, please
> (otherwise this should be an RFC patchset).

ok, I understand.  I was not sure about that and only added a remark in 
the cover letter

regards
Jens
 
> thanks
> -- PMM
>
Jens Freimann - Sept. 6, 2013, 12:41 p.m.
On Fri, Sep 06, 2013 at 01:32:52PM +0100, Peter Maydell wrote:
> On 6 September 2013 13:19, Jens Freimann <jfrei@linux.vnet.ibm.com> wrote:
> > @@ -839,6 +903,7 @@ struct kvm_device_attr {
> >  #define KVM_DEV_TYPE_FSL_MPIC_20       1
> >  #define KVM_DEV_TYPE_FSL_MPIC_42       2
> >  #define KVM_DEV_TYPE_XICS              3
> > +#define KVM_DEV_TYPE_FLIC              4
> 
> Christoffer's patchset switching the ARM VGIC to this
> list also uses 4 as its enumeration value:
> 
> https://lists.cs.columbia.edu/pipermail/kvmarm/2013-August/006822.html
> 
> That patchset isn't in yet, but maybe you should use
> 5 to avoid conflicts?

sure, will do

regards
Jens

> 
> thanks
> -- PMM
>
Christian Borntraeger - Sept. 6, 2013, 1:18 p.m.
On 06/09/13 14:19, Jens Freimann wrote:
> Add symbols required for the s390 floating interrupt controller (flic)
> 
> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>

As Peter said, this should come via a sync, but you already mentioned that
in your cover-letter. I will Ack the kernel patch and let it come via
that way.

Patch

diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h
index d25da59..33d52b8 100644
--- a/linux-headers/asm-s390/kvm.h
+++ b/linux-headers/asm-s390/kvm.h
@@ -16,6 +16,11 @@ 
 
 #define __KVM_S390
 
+/* Device control API: s390-specific devices */
+#define KVM_DEV_FLIC_DEQUEUE 1
+#define KVM_DEV_FLIC_ENQUEUE 2
+#define KVM_DEV_FLIC_CLEAR_IRQS 3
+
 /* for KVM_GET_REGS and KVM_SET_REGS */
 struct kvm_regs {
 	/* general purpose regs for s390 */
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index c614070..1f34381 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -434,6 +434,70 @@  struct kvm_s390_interrupt {
 	__u64 parm64;
 };
 
+struct kvm_s390_io_info {
+	__u16 subchannel_id;
+	__u16 subchannel_nr;
+	__u32 io_int_parm;
+	__u32 io_int_word;
+};
+
+struct kvm_s390_ext_info {
+	__u32 ext_params;
+	__u32 pad;
+	__u64 ext_params2;
+};
+
+struct kvm_s390_pgm_info {
+	__u64 trans_exc_code;
+	__u64 mon_code;
+	__u64 per_address;
+	__u32 data_exc_code;
+	__u16 code;
+	__u16 mon_class_nr;
+	__u8 per_code;
+	__u8 per_atmid;
+	__u8 exc_access_id;
+	__u8 per_access_id;
+	__u8 op_access_id;
+	__u8 pad[3];
+};
+
+struct kvm_s390_prefix_info {
+	__u32 address;
+};
+
+struct kvm_s390_extcall_info {
+	__u16 code;
+};
+
+struct kvm_s390_emerg_info {
+	__u16 code;
+};
+
+struct kvm_s390_mchk_info {
+	__u64 cr14;
+	__u64 mcic;
+	__u64 failing_storage_address;
+	__u32 ext_damage_code;
+	__u32 pad;
+	__u8 fixed_logout[16];
+};
+
+struct kvm_s390_irq {
+	__u64 type;
+	union {
+		struct kvm_s390_io_info io;
+		struct kvm_s390_ext_info ext;
+		struct kvm_s390_pgm_info pgm;
+		struct kvm_s390_emerg_info emerg;
+		struct kvm_s390_extcall_info extcall;
+		struct kvm_s390_prefix_info prefix;
+		struct kvm_s390_mchk_info mchk;
+		char reserved[64];
+	};
+};
+
+
 /* for KVM_SET_GUEST_DEBUG */
 
 #define KVM_GUESTDBG_ENABLE		0x00000001
@@ -839,6 +903,7 @@  struct kvm_device_attr {
 #define KVM_DEV_TYPE_FSL_MPIC_20	1
 #define KVM_DEV_TYPE_FSL_MPIC_42	2
 #define KVM_DEV_TYPE_XICS		3
+#define KVM_DEV_TYPE_FLIC		4
 
 /*
  * ioctls for VM fds