stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	stable@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org,
	alexandru.elisei@arm.com, christoffer.dall@arm.com
Subject: Re: [PATCH] KVM: arm64: nvhe: Save the SPE context early
Date: Thu, 18 Mar 2021 09:07:54 -0400	[thread overview]
Message-ID: <YFNQqsr34+dtLyGb@sashalap> (raw)
In-Reply-To: <87eegdj2yf.wl-maz@kernel.org>

On Wed, Mar 17, 2021 at 01:59:36PM +0000, Marc Zyngier wrote:
>On Tue, 16 Mar 2021 18:33:53 +0000,
>Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>
>> commit b96b0c5de685df82019e16826a282d53d86d112c upstream
>>
>> The nVHE KVM hyp drains and disables the SPE buffer, before
>> entering the guest, as the EL1&0 translation regime
>> is going to be loaded with that of the guest.
>>
>> But this operation is performed way too late, because :
>>  - The owning translation regime of the SPE buffer
>>    is transferred to EL2. (MDCR_EL2_E2PB == 0)
>>  - The guest Stage1 is loaded.
>>
>> Thus the flush could use the host EL1 virtual address,
>> but use the EL2 translations instead of host EL1, for writing
>> out any cached data.
>>
>> Fix this by moving the SPE buffer handling early enough.
>> The restore path is doing the right thing.
>>
>> Cc: stable@vger.kernel.org # v5.4-
>> Cc: Christoffer Dall <christoffer.dall@arm.com>
>> Cc: Marc Zyngier <maz@kernel.org>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Alexandru Elisei <alexandru.elisei@arm.com>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>Acked-by: Marc Zyngier <maz@kernel.org>

Queued up this and the 4.19 backport, thanks!

-- 
Thanks,
Sasha

  reply	other threads:[~2021-03-18 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  8:49 FAILED: patch "[PATCH] KVM: arm64: nvhe: Save the SPE context early" failed to apply to 5.4-stable tree gregkh
2021-03-16 18:33 ` [PATCH] KVM: arm64: nvhe: Save the SPE context early Suzuki K Poulose
2021-03-17 13:59   ` Marc Zyngier
2021-03-18 13:07     ` Sasha Levin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15  8:49 FAILED: patch "[PATCH] KVM: arm64: nvhe: Save the SPE context early" failed to apply to 4.19-stable tree gregkh
2021-03-17 11:50 ` [PATCH] KVM: arm64: nvhe: Save the SPE context early Suzuki K Poulose
2021-03-17 13:58   ` Marc Zyngier
2021-03-02 12:03 [PATCH] kvm: " Suzuki K Poulose
2021-03-02 18:57 ` 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=YFNQqsr34+dtLyGb@sashalap \
    --to=sashal@kernel.org \
    --cc=alexandru.elisei@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.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 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).