[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/19] s390x: Dispatch interrupts to KVM or the real
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 11/19] s390x: Dispatch interrupts to KVM or the real CPU |
Date: |
Tue, 29 Mar 2011 15:29:38 +0200 |
The KVM interrupt injection path is non-generic for now. So we need to push
knowledge of how to inject a device interrupt using KVM into the actual device
code.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/s390-virtio-bus.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 58af164..6a32939 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -43,6 +43,8 @@
do { } while (0)
#endif
+#define VIRTIO_EXT_CODE 0x2603
+
struct BusInfo s390_virtio_bus_info = {
.name = "s390-virtio",
.size = sizeof(VirtIOS390Bus),
@@ -304,9 +306,13 @@ static void virtio_s390_notify(void *opaque, uint16_t
vector)
{
VirtIOS390Device *dev = (VirtIOS390Device*)opaque;
uint64_t token = s390_virtio_device_vq_token(dev, vector);
+ CPUState *env = s390_cpu_addr2state(0);
- /* XXX kvm dependency! */
- kvm_s390_virtio_irq(s390_cpu_addr2state(0), 0, token);
+ if (kvm_enabled()) {
+ kvm_s390_virtio_irq(env, 0, token);
+ } else {
+ cpu_inject_ext(env, VIRTIO_EXT_CODE, 0, token);
+ }
}
static unsigned virtio_s390_get_features(void *opaque)
--
1.6.0.2
- [Qemu-devel] [PATCH 00/19] s390x emulation support, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 01/19] Only build ivshmem when CONFIG_PCI && CONFIG_KVM, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 05/19] s390x: Enable disassembler for s390x, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 02/19] virtio: use generic name when possible, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 11/19] s390x: Dispatch interrupts to KVM or the real CPU,
Alexander Graf <=
- [Qemu-devel] [PATCH 17/19] s390x: Adjust internal kvm code, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 06/19] s390x: Enable nptl for s390x, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 13/19] s390x: virtio machine storage keys, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 09/19] linux-user: define a couple of syscalls for non-uid16 targets, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 12/19] s390x: Adjust GDB stub, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 03/19] s390x: fix KVM target, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 04/19] s390x: fix s390-virtio-serial, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 10/19] s390x: Enable s390x-softmmu target, Alexander Graf, 2011/03/29
- [Qemu-devel] [PATCH 14/19] s390x: Prepare cpu.h for emulation, Alexander Graf, 2011/03/29