From: <gregkh@linuxfoundation.org>
To: vladimir.murzin@arm.com, christoffer.dall@linaro.org,
gregkh@linuxfoundation.org, james.morse@arm.com,
marc.zyngier@arm.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2" has been added to the 4.8-stable tree
Date: Wed, 26 Oct 2016 10:44:21 +0200 [thread overview]
Message-ID: <14774714614283@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-kvm-vhe-reset-pstate.pan-on-entry-to-el2.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cb96408da4e11698674abd04aeac941c1bed2038 Mon Sep 17 00:00:00 2001
From: Vladimir Murzin <vladimir.murzin@arm.com>
Date: Thu, 1 Sep 2016 15:29:03 +0100
Subject: arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2
From: Vladimir Murzin <vladimir.murzin@arm.com>
commit cb96408da4e11698674abd04aeac941c1bed2038 upstream.
SCTLR_EL2.SPAN bit controls what happens with the PSTATE.PAN bit on an
exception. However, this bit has no effect on the PSTATE.PAN when
HCR_EL2.E2H or HCR_EL2.TGE is unset. Thus when VHE is used and
exception taken from a guest PSTATE.PAN bit left unchanged and we
continue with a value guest has set.
To address that always reset PSTATE.PAN on entry from EL1.
Fixes: 1f364c8c48a0 ("arm64: VHE: Add support for running Linux in EL2 mode")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
[ rebased for v4.7+ ]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/kvm/hyp/entry.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/arm64/kvm/hyp/entry.S
+++ b/arch/arm64/kvm/hyp/entry.S
@@ -98,6 +98,8 @@ ENTRY(__guest_exit)
// x4-x29,lr: vcpu regs
// vcpu x0-x3 on the stack
+ ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN)
+
add x2, x0, #VCPU_CONTEXT
stp x4, x5, [x2, #CPU_XREG_OFFSET(4)]
Patches currently in stable-queue which might be from vladimir.murzin@arm.com are
queue-4.8/arm64-kvm-vhe-reset-pstate.pan-on-entry-to-el2.patch
reply other threads:[~2016-10-26 8:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=14774714614283@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=christoffer.dall@linaro.org \
--cc=james.morse@arm.com \
--cc=marc.zyngier@arm.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vladimir.murzin@arm.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 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.