Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org, kernel-team@android.com,
	James Morse <james.morse@arm.com>
Subject: Re: [PATCH stable-5.7] KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
Date: Tue, 16 Jun 2020 15:09:16 +0200	[thread overview]
Message-ID: <20200616130916.GB3932158@kroah.com> (raw)
In-Reply-To: <20200616125200.2024340-1-maz@kernel.org>

On Tue, Jun 16, 2020 at 01:52:00PM +0100, Marc Zyngier wrote:
> commit 0370964dd3ff7d3d406f292cb443a927952cbd05 upstream
> 
> On a VHE system, the EL1 state is left in the CPU most of the time,
> and only syncronized back to memory when vcpu_put() is called (most
> of the time on preemption).
> 
> Which means that when injecting an exception, we'd better have a way
> to either:
> (1) write directly to the EL1 sysregs
> (2) synchronize the state back to memory, and do the changes there
> 
> For an AArch64, we already do (1), so we are safe. Unfortunately,
> doing the same thing for AArch32 would be pretty invasive. Instead,
> we can easily implement (2) by calling the put/load architectural
> backends, and keep preemption disabled. We can then reload the
> state back into EL1.
> 
> Cc: stable@vger.kernel.org
> Reported-by: James Morse <james.morse@arm.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  virt/kvm/arm/aarch32.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)

Thanks for this, and the other backport.  Queued up.

greg k-h

  reply	other threads:[~2020-06-16 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 12:52 [PATCH stable-5.7] KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception Marc Zyngier
2020-06-16 13:09 ` Greg KH [this message]
2020-06-16 13:19   ` Marc Zyngier
2020-06-16 13:21     ` Marc Zyngier
2020-06-16 13:28       ` Greg KH

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=20200616130916.GB3932158@kroah.com \
    --to=greg@kroah.com \
    --cc=james.morse@arm.com \
    --cc=kernel-team@android.com \
    --cc=maz@kernel.org \
    --cc=stable@vger.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