Linux KVM/arm64 development list
 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>,
	David Matlack <dmatlack@google.com>,
	Reiji Watanabe <reijiw@google.com>
Subject: Re: [PATCH 0/2] KVM: arm64: Fix for mapping incorrect PA at stage-2
Date: Fri, 21 Apr 2023 10:12:48 +0100	[thread overview]
Message-ID: <86sfctk38v.wl-maz@kernel.org> (raw)
In-Reply-To: <20230421071606.1603916-1-oliver.upton@linux.dev>

On Fri, 21 Apr 2023 08:16:04 +0100,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> Ugh.
> 
> So it appears that there is a race between two parallel stage-2 map
> walkers that could lead to mapping the incorrect PA for a given IPA, as
> the IPA -> PA relationship picks up an unintended offset. This series
> eliminates the problem by using the current IPA of the walk as the
> source-of-truth regarding where we are in a map operation. If you're
> curious about the race, it is spelled out in the first patch.

Ugh indeed.

> 
> While there is no such race to update hyp's stage-1, the second patch
> applies the same rationale to hyp stage-1 walks for the sake of
> consistency.
> 
> Applies to 6.3-rc3, and merges w/o conflict into kvmarm/next. Took this
> for a ride with selftests, kvm-unit-tests, QEMU, and our internal VMM
> (affectionately referred to as Vanadium on the list from time to time).
> I also ran through the gamut of nVHE, VHE, and pKVM given the effects on
> hyp stage-1.
> 
> Marc, the bug can have some rather ugly (albeit rare) consequences, so
> I'd like to get this in ASAP. The door is shut on 6.3, but it'd be nice
> to squeeze in the 6.4 pull request if possible.

This is a pretty invasive change, and I'd really like to give it some
-next exposure. I'm not doubting your testing, but experience shows
that there is always someone with a more tricky setup...

What I'd suggest is to not include it in the pull request that I'm
about to send today, but to let it simmer in -next for a week. This
will give us some confidence that we're OK, and also avoid being
shouted at for sending stuff that hasn't been in -next at all.

If everything checks out after a week, I'll send another PR with this
fix (and whatever will have landed in the meantime).

Would that work for you?

	M.

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

  parent reply	other threads:[~2023-04-21  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  7:16 [PATCH 0/2] KVM: arm64: Fix for mapping incorrect PA at stage-2 Oliver Upton
2023-04-21  7:16 ` [PATCH 1/2] KVM: arm64: Infer the PA offset from IPA in stage-2 map walker Oliver Upton
2023-04-21  9:28   ` Marc Zyngier
2023-04-21  9:35     ` Oliver Upton
2023-04-21  7:16 ` [PATCH 2/2] KVM: arm64: Infer PA offset from VA in hyp " Oliver Upton
2023-04-21  9:12 ` Marc Zyngier [this message]
2023-04-21  9:29   ` [PATCH 0/2] KVM: arm64: Fix for mapping incorrect PA at stage-2 Oliver Upton
2023-04-21 12:53 ` Marc Zyngier

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=86sfctk38v.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=dmatlack@google.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --cc=reijiw@google.com \
    --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