From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5927C433DF for ; Tue, 16 Jun 2020 13:09:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABF7620B80 for ; Tue, 16 Jun 2020 13:09:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="KNzXg1bn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="n7Fqq2Kc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728740AbgFPNJX (ORCPT ); Tue, 16 Jun 2020 09:09:23 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41857 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727966AbgFPNJW (ORCPT ); Tue, 16 Jun 2020 09:09:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A99AD5C00CC; Tue, 16 Jun 2020 09:09:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 16 Jun 2020 09:09:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=SGfS1oaev7CuM0/Rjg3cna9aAU2 +Gh4jA5IxO+dqbd0=; b=KNzXg1bnm5XXjiT3D+m/E0XkfBMst2TsOrq3/TUAhAR rKFYttqkjfc0MJWJKe/IYXVMoBndpkBiiZJg4Rp260TFqq8Sn9SvbatkwGwkNjxO iR7X+B+iNrsBoPbxxoClaVAv6Mi6Y3YljrRIevLTXvgGl+96m70L9XOq1wiPT+t6 RkEVJpxO66yFR0prVIIUOkNRKPDzlG/dYAAHe4s9rki41VS2maFUkCAVwrU/BtiD KlfHtfvMGEQth0aq0MgkhgvJUtLct057BlqKDnL335qZ3rHec7EzZSq42y31uN7y xlb5mfDgfqnagv+8BneGWc/axn4+k9YDVQZQ1yLCnyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=SGfS1o aev7CuM0/Rjg3cna9aAU2+Gh4jA5IxO+dqbd0=; b=n7Fqq2KcdOiDdcT/Bi/UY9 5chrTvarjUYBeuhLai1gNdhIa2hNSTIwlIPt0A7/y2/EJDWcjvIbwyomSFniR4EN OhwYAnuJuYCA5bjBQ6ndWsp0+uRQ2Eekf5RUmyGWT1kRoD6hZV+alELq3p9RKAlk /YQ862Ai50h6HTk4abVdoVJh3qDnYFszQGxf1TAD1n7E+y2/9p84+Jy7kYCCTm8i RlVlX/BlfxbdxReJ8Nf3wg3skejcXovspCqEZTDzCguwjFPKglSAd4Ao0dlfF2Z3 K8c4sFBmwvP3jDVOmlCisiCTncFYGZgreJCueNyP6i7IM92G3WLf/aP75vJLl+Rw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejtddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucfkphepkeef rdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 0B2F9328005A; Tue, 16 Jun 2020 09:09:20 -0400 (EDT) Date: Tue, 16 Jun 2020 15:09:16 +0200 From: Greg KH To: Marc Zyngier Cc: stable@vger.kernel.org, kernel-team@android.com, James Morse Subject: Re: [PATCH stable-5.7] KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception Message-ID: <20200616130916.GB3932158@kroah.com> References: <20200616125200.2024340-1-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200616125200.2024340-1-maz@kernel.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.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 > Signed-off-by: Marc Zyngier > --- > virt/kvm/arm/aarch32.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) Thanks for this, and the other backport. Queued up. greg k-h