diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2014-03-12 12:40:31 +0100 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2014-06-10 09:50:27 +0200 |
commit | bbd8bb8e3245cf6fc6d12b10b3320ab183adb866 (patch) | |
tree | 22a30379a02d6d83be2f11bc432f81e82d4953eb /target-s390x | |
parent | de13d2161473d02ae97ec0f8e4503147554892dd (diff) | |
download | qemu-bbd8bb8e3245cf6fc6d12b10b3320ab183adb866.zip qemu-bbd8bb8e3245cf6fc6d12b10b3320ab183adb866.tar.gz qemu-bbd8bb8e3245cf6fc6d12b10b3320ab183adb866.tar.bz2 |
s390x/kvm: inject via flic
Try to inject floating interrupts via the flic if it is available.
This allows us to inject the full range of floating interrupts.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x')
-rw-r--r-- | target-s390x/cpu.h | 1 | ||||
-rw-r--r-- | target-s390x/kvm.c | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 9982c35..b13761d 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -365,6 +365,7 @@ void kvm_s390_virtio_irq(int config_change, uint64_t token); void kvm_s390_service_interrupt(uint32_t parm); void kvm_s390_vcpu_interrupt(S390CPU *cpu, struct kvm_s390_irq *irq); void kvm_s390_floating_interrupt(struct kvm_s390_irq *irq); +int kvm_s390_inject_flic(struct kvm_s390_irq *irq); #else static inline void kvm_s390_reset_vcpu(S390CPU *cpu) { diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index a2133ff..a1a4cc2 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -623,7 +623,7 @@ void kvm_s390_vcpu_interrupt(S390CPU *cpu, struct kvm_s390_irq *irq) } } -void kvm_s390_floating_interrupt(struct kvm_s390_irq *irq) +static void __kvm_s390_floating_interrupt(struct kvm_s390_irq *irq) { struct kvm_s390_interrupt kvmint = {}; int r; @@ -641,6 +641,23 @@ void kvm_s390_floating_interrupt(struct kvm_s390_irq *irq) } } +void kvm_s390_floating_interrupt(struct kvm_s390_irq *irq) +{ + static bool use_flic = true; + int r; + + if (use_flic) { + r = kvm_s390_inject_flic(irq); + if (r == -ENOSYS) { + use_flic = false; + } + if (!r) { + return; + } + } + __kvm_s390_floating_interrupt(irq); +} + void kvm_s390_virtio_irq(int config_change, uint64_t token) { struct kvm_s390_irq irq = { |