File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Documentation/virtual/kvm Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -2901,14 +2901,19 @@ userspace buffer and its length:
2901
2901
2902
2902
struct kvm_s390_irq_state {
2903
2903
__u64 buf;
2904
- __u32 flags;
2904
+ __u32 flags; /* will stay unused for compatibility reasons */
2905
2905
__u32 len;
2906
- __u32 reserved[4];
2906
+ __u32 reserved[4]; /* will stay unused for compatibility reasons */
2907
2907
};
2908
2908
2909
2909
Userspace passes in the above struct and for each pending interrupt a
2910
2910
struct kvm_s390_irq is copied to the provided buffer.
2911
2911
2912
+ The structure contains a flags and a reserved field for future extensions. As
2913
+ the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
2914
+ reserved, these fields can not be used in the future without breaking
2915
+ compatibility.
2916
+
2912
2917
If -ENOBUFS is returned the buffer provided was too small and userspace
2913
2918
may retry with a bigger buffer.
2914
2919
@@ -2932,10 +2937,14 @@ containing a struct kvm_s390_irq_state:
2932
2937
2933
2938
struct kvm_s390_irq_state {
2934
2939
__u64 buf;
2940
+ __u32 flags; /* will stay unused for compatibility reasons */
2935
2941
__u32 len;
2936
- __u32 pad;
2942
+ __u32 reserved[4]; /* will stay unused for compatibility reasons */
2937
2943
};
2938
2944
2945
+ The restrictions for flags and reserved apply as well.
2946
+ (see KVM_S390_GET_IRQ_STATE)
2947
+
2939
2948
The userspace memory referenced by buf contains a struct kvm_s390_irq
2940
2949
for each interrupt to be injected into the guest.
2941
2950
If one of the interrupts could not be injected for some reason the
Original file line number Diff line number Diff line change 1
1
// SPDX-License-Identifier: GPL-2.0
2
2
/*
3
- * hosting zSeries kernel virtual machines
3
+ * hosting IBM Z kernel virtual machines (s390x)
4
4
*
5
- * Copyright IBM Corp. 2008, 2009
5
+ * Copyright IBM Corp. 2008, 2017
6
6
*
7
7
* Author(s): Carsten Otte <[email protected] >
8
8
* Christian Borntraeger <[email protected] >
@@ -3808,6 +3808,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
3808
3808
r = - EINVAL ;
3809
3809
break ;
3810
3810
}
3811
+ /* do not use irq_state.flags, it will break old QEMUs */
3811
3812
r = kvm_s390_set_irq_state (vcpu ,
3812
3813
(void __user * ) irq_state .buf ,
3813
3814
irq_state .len );
@@ -3823,6 +3824,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
3823
3824
r = - EINVAL ;
3824
3825
break ;
3825
3826
}
3827
+ /* do not use irq_state.flags, it will break old QEMUs */
3826
3828
r = kvm_s390_get_irq_state (vcpu ,
3827
3829
(__u8 __user * ) irq_state .buf ,
3828
3830
irq_state .len );
Original file line number Diff line number Diff line change @@ -630,9 +630,9 @@ struct kvm_s390_irq {
630
630
631
631
struct kvm_s390_irq_state {
632
632
__u64 buf ;
633
- __u32 flags ;
633
+ __u32 flags ; /* will stay unused for compatibility reasons */
634
634
__u32 len ;
635
- __u32 reserved [4 ];
635
+ __u32 reserved [4 ]; /* will stay unused for compatibility reasons */
636
636
};
637
637
638
638
/* for KVM_SET_GUEST_DEBUG */
You can’t perform that action at this time.
0 commit comments