All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@linux.ibm.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>, qemu-devel@nongnu.org
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>,
	qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>,
	david@gibson.dropbear.id.au, clg@kaod.org
Subject: Re: [PATCH 1/1] target/ppc: fix 'skip KVM' cond in cpu_interrupt_exittb()
Date: Fri, 21 Jan 2022 15:32:44 -0300	[thread overview]
Message-ID: <874k5xey7n.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220121160841.9102-1-danielhb413@gmail.com>

Daniel Henrique Barboza <danielhb413@gmail.com> writes:

> cpu_interrupt_exittb() was introduced by commit 044897ef4a22
> ("target/ppc: Fix system lockups caused by interrupt_request state
> corruption") as a way to wrap cpu_interrupt() helper in BQL.
>
> After that, commit 6d38666a8931 ("ppc: Ignore the CPU_INTERRUPT_EXITTB
> interrupt with KVM") added a condition to skip this interrupt if we're
> running with KVM.
>
> Problem is that the change made by the above commit, testing for
> !kvm_enabled() at the start of cpu_interrupt_exittb():
>
> static inline void cpu_interrupt_exittb(CPUState *cs)
> {
>     if (!kvm_enabled()) {
>         return;
>     }
>     (... do cpu_interrupt(cs, CPU_INTERRUPT_EXITTB) ...)
>
> is doing the opposite of what it intended to do. This will return
> immediately if not kvm_enabled(), i.e. it's a emulated CPU, and if
> kvm_enabled() it will proceed to fire CPU_INTERRUPT_EXITTB.
>
> Fix the 'skip KVM' condition so the function is a no-op when
> kvm_enabled().
>
> CC: Greg Kurz <groug@kaod.org>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/809
> Fixes: 6d38666a8931 ("ppc: Ignore the CPU_INTERRUPT_EXITTB interrupt with KVM")
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>

Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>


  reply	other threads:[~2022-01-21 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 16:08 [PATCH 1/1] target/ppc: fix 'skip KVM' cond in cpu_interrupt_exittb() Daniel Henrique Barboza
2022-01-21 18:32 ` Fabiano Rosas [this message]
2022-01-25  9:12 ` Greg Kurz

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=874k5xey7n.fsf@linux.ibm.com \
    --to=farosas@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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.