aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/s390_flic_kvm.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-10 10:59:26 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-10 10:59:26 +0100
commit7b0140e49b1c239c880c90235548917086f53cdc (patch)
tree22a30379a02d6d83be2f11bc432f81e82d4953eb /hw/intc/s390_flic_kvm.c
parent7721a3044234c46cd6f5f899e7467dc9351f3c8d (diff)
parentbbd8bb8e3245cf6fc6d12b10b3320ab183adb866 (diff)
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20140610' into staging
Several patches for s390: - bugfixes: A fix for a long-standing bug in the css code as well as a fixup for the recent I/O adapter support. - Exploitation of the userspace cmma enablement/reset interface, if it is present. - Some debuggability improvements by logging unmanageable conditions. - virtio-ccw finally gets migration support for its structures. - Some cleanup as to how floating interrupts are injected. # gpg: Signature made Tue 10 Jun 2014 08:57:56 BST using RSA key ID C6F02FAF # gpg: Can't check signature: public key not found * remotes/cohuck/tags/s390x-20140610: s390x/kvm: inject via flic s390x: cleanup interrupt injection s390x/kvm: add alternative injection interface s390x: consolidate floating interrupts s390/virtio-ccw: migration support s390x/kvm: Log unmanageable program interruptions s390x/kvm: Log unmanageable external interruptions s390x/kvm: enable/reset cmma via vm attributes s390x/kvm: make flic play well with old kernels s390x/css: handle emw correctly for tsch Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/s390_flic_kvm.c')
-rw-r--r--hw/intc/s390_flic_kvm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 46c9e612d1..b471e7a41e 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -117,6 +117,16 @@ static int flic_enqueue_irqs(void *buf, uint64_t len,
return rc ? -errno : 0;
}
+int kvm_s390_inject_flic(struct kvm_s390_irq *irq)
+{
+ static KVMS390FLICState *flic;
+
+ if (unlikely(!flic)) {
+ flic = KVM_S390_FLIC(s390_get_flic());
+ }
+ return flic_enqueue_irqs(irq, sizeof(*irq), flic);
+}
+
/**
* __get_all_irqs - store all pending irqs in buffer
* @flic: pointer to flic device state
@@ -170,7 +180,8 @@ static int kvm_s390_register_io_adapter(S390FLICState *fs, uint32_t id,
};
if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
- return -ENOSYS;
+ /* nothing to do */
+ return 0;
}
r = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);
@@ -195,7 +206,8 @@ static int kvm_s390_io_adapter_map(S390FLICState *fs, uint32_t id,
int r;
if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
- return -ENOSYS;
+ /* nothing to do */
+ return 0;
}
r = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);