Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323171
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Christoffer Dall <christoffer.dall@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 16/21] arm64: KVM: VHE: Add fpsimd enabling on guest access |
| Date | Mon, 01 Feb 2016 15:30:05 +0100 |
| Message-ID | <qXnEp-45e-87@gated-at.bofh.it> (permalink) |
| References | <qURIC-68y-3@gated-at.bofh.it> <qURIE-68y-51@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=pgTgxOSvJqf1Qf6Ncm00YlyYd3+Wn8HD+YC2ucNsvus=; b=iuzAf5der1jir+e9bBe3wHVytqxVvq23xdNWITpRjnClM8DW2HgfB3mjY59j8HSCSo FXCxtJsZl20TS5Szqe23uw2RDQZMmYuJYFYMFPsBTG5zhEm49JlWEDLWTAqXhGMgceVf qBbRs+FRjvZwBZrD0xDtRVdwXuwKDWcdM4YLU= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=pgTgxOSvJqf1Qf6Ncm00YlyYd3+Wn8HD+YC2ucNsvus=; b=lG770H530IlqbzVoL2MgquBNC6SRsPYls0tluPmbUrDvD3uODyMDb4FRYnPdFaIVUw U6qYikPF80elgyak1hd9YYD7Rpb60xw4viAJQjXBsucY7BryEB/UP4uVSexsO0Ji1rYD Vd6LrL+7NNYk6UIXeI84XV5Y7RUI00YWVUXU55TgONOi/mPFhBP9su8UpzWTTasCxNcV lFQLIFdk/d6ZPZqFc4py404mzmZwOBRy/T7KVZb9b+tGES+0iELkmFy6AjNXgfKlIkUj WPlKA+YQ4Je/0b8cogeJJirv8T5QFg9NVtQSvJwbv1rG9VxkTxAHQEjhByqk6KDCCiGY PLXA== |
| X-Gm-Message-State | AG10YOR3EgHA3/L1kgJDvoeWrSBGg3Ma0usbirWbCoYsaTjTB3MXAUo8Ss1REpICVxJzR+k0 |
| X-Received | by 10.28.8.142 with SMTP id 136mr12653907wmi.54.1454336631688; Mon, 01 Feb 2016 06:23:51 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu |
| X-Original-Date | Mon, 1 Feb 2016 15:24:18 +0100 |
| X-Original-Message-ID | <20160201142418.GV1478@cbox> |
| X-Original-References | <1453737235-16522-1-git-send-email-marc.zyngier@arm.com> <1453737235-16522-17-git-send-email-marc.zyngier@arm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1323171 |
Show key headers only | View raw
On Mon, Jan 25, 2016 at 03:53:50PM +0000, Marc Zyngier wrote: > Despite the fact that a VHE enabled kernel runs at EL2, it uses > CPACR_EL1 to trap FPSIMD access. Add the required alternative > code to re-enable guest FPSIMD access when it has trapped to > EL2. > > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> > --- > arch/arm64/kvm/hyp/entry.S | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S > index fd0fbe9..759a0ec 100644 > --- a/arch/arm64/kvm/hyp/entry.S > +++ b/arch/arm64/kvm/hyp/entry.S > @@ -130,9 +130,15 @@ ENDPROC(__guest_exit) > ENTRY(__fpsimd_guest_restore) > stp x4, lr, [sp, #-16]! > > +alternative_if_not ARM64_HAS_VIRT_HOST_EXTN > mrs x2, cptr_el2 > bic x2, x2, #CPTR_EL2_TFP > msr cptr_el2, x2 > +alternative_else > + mrs x2, cpacr_el1 > + orr x2, x2, #(3 << 20) nit: bitfield definition again > + msr cpacr_el1, x2 > +alternative_endif > isb > > mrs x3, tpidr_el2 > -- > 2.1.4 > Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v2 16/21] arm64: KVM: VHE: Add fpsimd enabling on guest access Christoffer Dall <christoffer.dall@linaro.org> - 2016-02-01 15:30 +0100
csiph-web