[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/14] hw/mips: In KVM mode, inject IRQ2 (I/O) interr
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 10/14] hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctls |
Date: |
Fri, 20 Jun 2014 14:11:19 +0200 |
From: Sanjay Lal <address@hidden>
COP0 emulation is in-kernel for KVM, so inject IRQ2 (I/O) interrupts via
ioctls.
Signed-off-by: Sanjay Lal <address@hidden>
Signed-off-by: James Hogan <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/mips/mips_int.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
index 7dbd24d..d740046 100644
--- a/hw/mips/mips_int.c
+++ b/hw/mips/mips_int.c
@@ -23,6 +23,8 @@
#include "hw/hw.h"
#include "hw/mips/cpudevs.h"
#include "cpu.h"
+#include "sysemu/kvm.h"
+#include "kvm_mips.h"
static void cpu_mips_irq_request(void *opaque, int irq, int level)
{
@@ -35,8 +37,17 @@ static void cpu_mips_irq_request(void *opaque, int irq, int
level)
if (level) {
env->CP0_Cause |= 1 << (irq + CP0Ca_IP);
+
+ if (kvm_enabled() && irq == 2) {
+ kvm_mips_set_interrupt(cpu, irq, level);
+ }
+
} else {
env->CP0_Cause &= ~(1 << (irq + CP0Ca_IP));
+
+ if (kvm_enabled() && irq == 2) {
+ kvm_mips_set_interrupt(cpu, irq, level);
+ }
}
if (env->CP0_Cause & CP0Ca_IP_mask) {
--
1.7.1
- [Qemu-devel] [PULL 00/14] Pending KVM patches for 2.1, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 01/14] KVM: Fix GSI number space limit, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 03/14] hw/mips/cputimer: Don't start periodic timer in KVM mode, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 02/14] target-mips: Reset CPU timer consistently, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 04/14] hw/mips: Add API to convert KVM guest KSEG0 <-> GPA, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 05/14] target-mips: get_physical_address: Add defines for segment bases, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 06/14] target-mips: get_physical_address: Add KVM awareness, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 07/14] kvm: Allow arch to set sigmask length, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 08/14] target-mips: kvm: Add main KVM support for MIPS, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 09/14] target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset(), Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 10/14] hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctls,
Paolo Bonzini <=
- [Qemu-devel] [PULL 11/14] hw/mips: malta: Add KVM support, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 12/14] target-mips: Enable KVM support in build system, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 13/14] MAINTAINERS: Add entry for MIPS KVM, Paolo Bonzini, 2014/06/20
- [Qemu-devel] [PULL 14/14] hw/mips: malta: Don't boot from flash with KVM T&E, Paolo Bonzini, 2014/06/20
- Re: [Qemu-devel] [PULL 00/14] Pending KVM patches for 2.1, Peter Maydell, 2014/06/20