All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huacai Chen <zltjiangshi@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Aleksandar Markovic" <aleksandar.qemu.devel@gmail.com>
Cc: Huacai Chen <chenhuacai@gmail.com>,
	Huacai Chen <chenhc@lemote.com>,
	Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>,
	qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: [PATCH for-5.1 V3 3/7] hw/mips: Add CPU IRQ3 delivery for KVM
Date: Sun,  3 May 2020 18:20:17 +0800	[thread overview]
Message-ID: <1588501221-1205-4-git-send-email-chenhc@lemote.com> (raw)
In-Reply-To: <1588501221-1205-1-git-send-email-chenhc@lemote.com>

Currently, KVM/MIPS only deliver I/O interrupt via IP2, this patch add
IP3 delivery as well, because Loongson-3 based machine use both IRQ2
(CPU's IP2) and IRQ3 (CPU's IP3).

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 hw/mips/mips_int.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
index 796730b..982ce34 100644
--- a/hw/mips/mips_int.c
+++ b/hw/mips/mips_int.c
@@ -48,14 +48,14 @@ 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) {
+        if (kvm_enabled() && (irq == 2 || irq == 3)) {
             kvm_mips_set_interrupt(cpu, irq, level);
         }
 
     } else {
         env->CP0_Cause &= ~(1 << (irq + CP0Ca_IP));
 
-        if (kvm_enabled() && irq == 2) {
+        if (kvm_enabled() && (irq == 2 || irq == 3)) {
             kvm_mips_set_interrupt(cpu, irq, level);
         }
     }
-- 
2.7.0



  parent reply	other threads:[~2020-05-03 10:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 10:20 [PATCH for-5.1 V3 0/7] mips: Add Loongson-3 machine support (with KVM) Huacai Chen
2020-05-03 10:20 ` [PATCH for-5.1 V3 1/7] configure: Add KVM target support for MIPS64 Huacai Chen
2020-05-12 12:54   ` Aleksandar Markovic
2020-06-01  9:03   ` Aleksandar Markovic
2020-05-03 10:20 ` [PATCH for-5.1 V3 2/7] hw/mips: Implement the kvm_type() hook in MachineClass Huacai Chen
2020-05-14 19:37   ` Aleksandar Markovic
2020-06-01  9:01   ` Aleksandar Markovic
2020-06-01 10:15     ` Aleksandar Markovic
2020-06-01 12:06       ` chen huacai
2020-05-03 10:20 ` Huacai Chen [this message]
2020-05-12 12:57   ` [PATCH for-5.1 V3 3/7] hw/mips: Add CPU IRQ3 delivery for KVM Aleksandar Markovic
2020-05-03 10:20 ` [PATCH for-5.1 V3 4/7] target/mips: Add Loongson-3 CPU definition Huacai Chen
2020-05-03 10:20 ` [PATCH for-5.1 V3 5/7] target/mips: Add more CP0 register for save/restore Huacai Chen
2020-05-12 13:01   ` Aleksandar Markovic
2020-06-01  9:05   ` Aleksandar Markovic
2020-05-03 10:20 ` [PATCH for-5.1 V3 6/7] hw/mips: Add Loongson-3 machine support (with KVM) Huacai Chen
2020-05-03 10:20 ` [PATCH for-5.1 V3 7/7] MAINTAINERS: Add myself as Loongson-3 maintainer Huacai Chen
2020-05-03 10:42 ` [PATCH for-5.1 V3 0/7] mips: Add Loongson-3 machine support (with KVM) 罗勇刚(Yonggang Luo)
2020-05-04  6:13   ` chen huacai
2020-05-04  6:15     ` 罗勇刚(Yonggang Luo)
2020-05-03 10:49 ` no-reply
2020-05-03 10:49 ` Aleksandar Markovic
2020-05-05  7:40   ` chen huacai
2020-05-05 10:12     ` Aleksandar Markovic
2020-05-06  1:50       ` Huacai Chen
2020-05-07 12:17         ` Aleksandar Markovic
2020-05-08  1:41           ` Huacai Chen
2020-05-08 16:55 ` Aleksandar Markovic
2020-05-09  3:07   ` chen huacai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588501221-1205-4-git-send-email-chenhc@lemote.com \
    --to=zltjiangshi@gmail.com \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=aleksandar.rikalo@rt-rk.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhc@lemote.com \
    --cc=chenhuacai@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.