stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: kvmarm@lists.linux.dev, James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	stable@vger.kernel.org, Xiang Chen <chenxiang66@hisilicon.com>
Subject: Re: [PATCH] KVM: arm64: vgic-v4: Consistently request doorbell irq for blocking vCPU
Date: Tue, 11 Jul 2023 08:57:27 +0100	[thread overview]
Message-ID: <86h6qax4m0.wl-maz@kernel.org> (raw)
In-Reply-To: <ZK0EPhvLzhaFepGk@linux.dev>

On Tue, 11 Jul 2023 08:26:54 +0100,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> On Tue, Jul 11, 2023 at 08:23:25AM +0100, Marc Zyngier wrote:
> > On Mon, 10 Jul 2023 18:55:53 +0100,
> > Oliver Upton <oliver.upton@linux.dev> wrote:
> > > 
> > > Xiang reports that VMs occasionally fail to boot on GICv4.1 systems when
> > > running a preemptible kernel, as it is possible that a vCPU is blocked
> > > without requesting a doorbell interrupt.
> > > 
> > > The issue is that any preemption that occurs between vgic_v4_put() and
> > > schedule() on the block path will mark the vPE as nonresident and *not*
> > > request a doorbell irq.
> > 
> > It'd be worth spelling out. You need to go via *three* schedule()
> > calls: one to be preempted (with DB set), one to be made resident
> > again, and then the final one in kvm_vcpu_halt(), clearing the DB on
> > vcpu_put() due to the bug.
> 
> Yeah, a bit lazy in the wording. What I had meant to imply was
> preemption happening after the doorbell is set up and before the thread
> has an opportunity to explicitly schedule out. Perhaps I should just say
> that.

Yup. And it is the transition via a new 'resident' state that blows
it. No need to repost for that, just amend it locally.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2023-07-11  7:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 17:55 [PATCH] KVM: arm64: vgic-v4: Consistently request doorbell irq for blocking vCPU Oliver Upton
2023-07-11  7:23 ` Marc Zyngier
2023-07-11  7:26   ` Oliver Upton
2023-07-11  7:57     ` Marc Zyngier [this message]
2023-07-12 12:09     ` Zenghui Yu
2023-07-12 13:49       ` Marc Zyngier
2023-07-12 15:56         ` Zenghui Yu
2023-07-13  2:38           ` chenxiang (M)
2023-07-12 20:14         ` Oliver Upton
2023-07-13  5:57         ` chenxiang (M)
2023-07-13  6:01           ` Oliver Upton
2023-07-13  7:11             ` Marc Zyngier
2023-07-11 20:00 ` Oliver Upton

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=86h6qax4m0.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chenxiang66@hisilicon.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).