All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Greg KH <greg@kroah.com>
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 14:19:36 +0100	[thread overview]
Message-ID: <4380fcb75d3c486919dd6fe65ce9a6c1@kernel.org> (raw)
In-Reply-To: <20200616130916.GB3932158@kroah.com>

Hi Greg,

On 2020-06-16 14:09, Greg KH wrote:
> 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.

You seem to have queued the same patches for 5.4 and 5.6.
This will break 32bit ARM (the patch applies nicely, but it will blow up 
at compile time).

I'll have the corresponding backports later today, once I've finished 
testing them.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2020-06-16 13:19 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
2020-06-16 13:19   ` Marc Zyngier [this message]
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=4380fcb75d3c486919dd6fe65ce9a6c1@kernel.org \
    --to=maz@kernel.org \
    --cc=greg@kroah.com \
    --cc=james.morse@arm.com \
    --cc=kernel-team@android.com \
    --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 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.