diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-08-25 06:27:29 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-09-10 06:19:12 -0400 |
commit | 614aeab4dcd0aafb1538d5035eb9855f15b84014 (patch) | |
tree | ebd538bdf15c6e71ff5abefc93346b48b8a22476 /arch/s390 | |
parent | 5102ee879539ebd2e0de1eb93290e3d691973e79 (diff) |
KVM: s390: add __must_check to interrupt deliver functions
We now propagate interrupt injection errors back to the ioctl. We
should mark functions that might fail with __must_check.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 12 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 60a5cf40d49a..d56da1db8ba0 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define IOINT_AI_MASK 0x04000000 | 28 | #define IOINT_AI_MASK 0x04000000 |
29 | #define PFAULT_INIT 0x0600 | 29 | #define PFAULT_INIT 0x0600 |
30 | 30 | ||
31 | static int deliver_ckc_interrupt(struct kvm_vcpu *vcpu); | 31 | static int __must_check deliver_ckc_interrupt(struct kvm_vcpu *vcpu); |
32 | 32 | ||
33 | static int is_ioint(u64 type) | 33 | static int is_ioint(u64 type) |
34 | { | 34 | { |
@@ -77,7 +77,7 @@ static u64 int_word_to_isc_bits(u32 int_word) | |||
77 | return (0x80 >> isc) << 24; | 77 | return (0x80 >> isc) << 24; |
78 | } | 78 | } |
79 | 79 | ||
80 | static int __interrupt_is_deliverable(struct kvm_vcpu *vcpu, | 80 | static int __must_check __interrupt_is_deliverable(struct kvm_vcpu *vcpu, |
81 | struct kvm_s390_interrupt_info *inti) | 81 | struct kvm_s390_interrupt_info *inti) |
82 | { | 82 | { |
83 | switch (inti->type) { | 83 | switch (inti->type) { |
@@ -225,7 +225,7 @@ static u16 get_ilc(struct kvm_vcpu *vcpu) | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | static int __deliver_prog_irq(struct kvm_vcpu *vcpu, | 228 | static int __must_check __deliver_prog_irq(struct kvm_vcpu *vcpu, |
229 | struct kvm_s390_pgm_info *pgm_info) | 229 | struct kvm_s390_pgm_info *pgm_info) |
230 | { | 230 | { |
231 | int rc = 0; | 231 | int rc = 0; |
@@ -307,7 +307,7 @@ static int __deliver_prog_irq(struct kvm_vcpu *vcpu, | |||
307 | return rc; | 307 | return rc; |
308 | } | 308 | } |
309 | 309 | ||
310 | static int __do_deliver_interrupt(struct kvm_vcpu *vcpu, | 310 | static int __must_check __do_deliver_interrupt(struct kvm_vcpu *vcpu, |
311 | struct kvm_s390_interrupt_info *inti) | 311 | struct kvm_s390_interrupt_info *inti) |
312 | { | 312 | { |
313 | const unsigned short table[] = { 2, 4, 4, 6 }; | 313 | const unsigned short table[] = { 2, 4, 4, 6 }; |
@@ -508,7 +508,7 @@ static int __do_deliver_interrupt(struct kvm_vcpu *vcpu, | |||
508 | return rc; | 508 | return rc; |
509 | } | 509 | } |
510 | 510 | ||
511 | static int deliver_ckc_interrupt(struct kvm_vcpu *vcpu) | 511 | static int __must_check deliver_ckc_interrupt(struct kvm_vcpu *vcpu) |
512 | { | 512 | { |
513 | int rc; | 513 | int rc; |
514 | 514 | ||
@@ -657,7 +657,7 @@ void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu) | |||
657 | &vcpu->kvm->arch.sca->cpu[vcpu->vcpu_id].ctrl); | 657 | &vcpu->kvm->arch.sca->cpu[vcpu->vcpu_id].ctrl); |
658 | } | 658 | } |
659 | 659 | ||
660 | int kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) | 660 | int __must_check kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) |
661 | { | 661 | { |
662 | struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; | 662 | struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; |
663 | struct kvm_s390_float_interrupt *fi = vcpu->arch.local_int.float_int; | 663 | struct kvm_s390_float_interrupt *fi = vcpu->arch.local_int.float_int; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index 99abcb56e478..b1a77669137b 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -138,7 +138,7 @@ static inline int kvm_s390_user_cpu_state_ctrl(struct kvm *kvm) | |||
138 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); | 138 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); |
139 | void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu); | 139 | void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu); |
140 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); | 140 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); |
141 | int kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu); | 141 | int __must_check kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu); |
142 | void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu); | 142 | void kvm_s390_clear_local_irqs(struct kvm_vcpu *vcpu); |
143 | void kvm_s390_clear_float_irqs(struct kvm *kvm); | 143 | void kvm_s390_clear_float_irqs(struct kvm *kvm); |
144 | int __must_check kvm_s390_inject_vm(struct kvm *kvm, | 144 | int __must_check kvm_s390_inject_vm(struct kvm *kvm, |