All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: will.deacon@arm.com, gregkh@linuxfoundation.org, marc.zyngier@arm.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "KVM: arm64: add workaround for Cortex-A57 erratum #852523" has been added to the 4.2-stable tree
Date: Tue, 22 Sep 2015 21:36:12 -0700	[thread overview]
Message-ID: <144298297249147@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    KVM: arm64: add workaround for Cortex-A57 erratum #852523

to the 4.2-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:
     kvm-arm64-add-workaround-for-cortex-a57-erratum-852523.patch
and it can be found in the queue-4.2 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 43297dda0a51e4ffed0888ce727c218cfb7474b6 Mon Sep 17 00:00:00 2001
From: Will Deacon <will.deacon@arm.com>
Date: Mon, 14 Sep 2015 16:06:03 +0100
Subject: KVM: arm64: add workaround for Cortex-A57 erratum #852523

From: Will Deacon <will.deacon@arm.com>

commit 43297dda0a51e4ffed0888ce727c218cfb7474b6 upstream.

When restoring the system register state for an AArch32 guest at EL2,
writes to DACR32_EL2 may not be correctly synchronised by Cortex-A57,
which can lead to the guest effectively running with junk in the DACR
and running into unexpected domain faults.

This patch works around the issue by re-ordering our restoration of the
AArch32 register aliases so that they happen before the AArch64 system
registers. Ensuring that the registers are restored in this order
guarantees that they will be correctly synchronised by the core.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/kvm/hyp.S |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/arm64/kvm/hyp.S
+++ b/arch/arm64/kvm/hyp.S
@@ -943,13 +943,15 @@ ENTRY(__kvm_vcpu_run)
 	// Guest context
 	add	x2, x0, #VCPU_CONTEXT
 
+	// We must restore the 32-bit state before the sysregs, thanks
+	// to Cortex-A57 erratum #852523.
+	restore_guest_32bit_state
 	bl __restore_sysregs
 	bl __restore_fpsimd
 
 	skip_debug_state x3, 1f
 	bl	__restore_debug
 1:
-	restore_guest_32bit_state
 	restore_guest_regs
 
 	// That's it, no more messing around.


Patches currently in stable-queue which might be from will.deacon@arm.com are

queue-4.2/arm64-head.s-initialise-mdcr_el2-in-el2_setup.patch
queue-4.2/arm64-set-max_memblock_addr-according-to-linear-region-size.patch
queue-4.2/arm64-kconfig-move-list_poison-to-a-safe-value.patch
queue-4.2/arm64-flush-fp-simd-state-correctly-after-execve.patch
queue-4.2/arm64-entry-always-restore-x0-from-the-stack-on-syscall-return.patch
queue-4.2/kvm-arm64-add-workaround-for-cortex-a57-erratum-852523.patch
queue-4.2/of-fdt-make-memblock-maximum-physical-address-arch-configurable.patch
queue-4.2/arm64-errata-add-module-build-workaround-for-erratum-843419.patch
queue-4.2/arm64-compat-fix-vfp-save-restore-across-signal-handlers-in-big-endian.patch

                 reply	other threads:[~2015-09-23  4:37 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=144298297249147@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=marc.zyngier@arm.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will.deacon@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.