All of lore.kernel.org
 help / color / mirror / Atom feed
From: chen huacai <zltjiangshi@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Huacai Chen <chenhuacai@gmail.com>,
	Huacai Chen <chenhc@lemote.com>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	qemu-level <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH for-5.1 3/7] hw/mips: Add CPU IRQ3 delivery for KVM
Date: Tue, 28 Apr 2020 16:28:42 +0800	[thread overview]
Message-ID: <CABDp7Voe_WJwa6J9W-rQdSRHMx+u=46tfd9ufEdAkE36e59_FQ@mail.gmail.com> (raw)
In-Reply-To: <5a4cc457-971c-de9b-7380-c5e81d1b378b@amsat.org>

Hi, Philippe,

On Mon, Apr 27, 2020 at 5:57 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 4/27/20 11:33 AM, Huacai Chen wrote:
> > Currently, KVM/MIPS only deliver I/O interrupt via IP2, this patch add
> > IP2 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 | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
> > index 796730b..5526219 100644
> > --- a/hw/mips/mips_int.c
> > +++ b/hw/mips/mips_int.c
> > @@ -48,16 +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))
>
> Shouldn't we check env->CP0_Config6 (or Config7) has the required
> feature first?
I'm sorry that I can't understand IRQ delivery has something to do
with Config6/Config7, to identify Loongson-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);
> > -        }
> >      }
> >
> >      if (env->CP0_Cause & CP0Ca_IP_mask) {
> >



-- 
Huacai Chen


  reply	other threads:[~2020-04-28  9:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  9:33 [PATCH for-5.1 1/7] configure: Add KVM target support for MIPS64 Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 2/7] hw/mips: Implement the kvm_type() hook in MachineClass Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 3/7] hw/mips: Add CPU IRQ3 delivery for KVM Huacai Chen
2020-04-27  9:57   ` Philippe Mathieu-Daudé
2020-04-28  8:28     ` chen huacai [this message]
2020-04-28 18:58       ` Aleksandar Markovic
2020-04-29  1:52         ` Huacai Chen
2020-04-29  9:17           ` Philippe Mathieu-Daudé
2020-04-29 10:13             ` Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 4/7] target/mips: Add Loongson-3 CPU definition Huacai Chen
2020-04-28  6:34   ` Philippe Mathieu-Daudé
2020-04-28  8:34     ` chen huacai
2020-04-28 18:37       ` Aleksandar Markovic
2020-04-29  3:51         ` Huacai Chen
2020-04-29  8:09           ` Philippe Mathieu-Daudé
2020-04-29  8:27             ` Huacai Chen
2020-04-29  8:58               ` Philippe Mathieu-Daudé
2020-04-29  9:25                 ` Huacai Chen
2020-04-29  9:30                   ` Philippe Mathieu-Daudé
2020-04-29  9:54                     ` Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 5/7] target/mips: Add more CP0 register for save/restore Huacai Chen
2020-04-28 19:10   ` Aleksandar Markovic
2020-04-29  1:11     ` Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 6/7] hw/mips: Add Loongson-3 machine support (with KVM) Huacai Chen
2020-04-28 19:23   ` Aleksandar Markovic
2020-04-29  1:13     ` Huacai Chen
2020-04-27  9:33 ` [PATCH for-5.1 7/7] MAINTAINERS: Add myself as Loongson-3 maintainer Huacai Chen
2020-04-28  6:18   ` Philippe Mathieu-Daudé
2020-04-28  8:31     ` chen huacai
2020-04-28 19:15 ` [PATCH for-5.1 1/7] configure: Add KVM target support for MIPS64 Aleksandar Markovic

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='CABDp7Voe_WJwa6J9W-rQdSRHMx+u=46tfd9ufEdAkE36e59_FQ@mail.gmail.com' \
    --to=zltjiangshi@gmail.com \
    --cc=aleksandar.qemu.devel@gmail.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.