Message ID | 20150819174958.GA11518@cbox |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCAJ5U7H64CRBCME2OXAKGQEGQFPBIA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 06B232156D for <linaro@patches.linaro.org>; Wed, 19 Aug 2015 17:51:07 +0000 (UTC) Received: by lagz9 with SMTP id z9sf3843621lag.3 for <linaro@patches.linaro.org>; Wed, 19 Aug 2015 10:51:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:cc:content-type:content-transfer-encoding :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=e9XKpwkUd/MWJo3Vepk8yonI6DcxMf3Lo7s756qBgFU=; b=IQIOXDG0oGvHYApwCCkplj3vyNVSD7WsRXBvElqQaeBu6DWUkFn7a4aA4nnCxE2KRN oUr6zcy8Pa/J43Fpu/zB7t9Vw4tMZtEk1W0Q/EyJ1hqEJigExWviIvDHIGMmbTegPB8F z+8V3p0xk+QFqJg0d7d1aYmc6Bd08syCmIKRMgLyaaRv/J3Rs8nFB9FPf3QHSSZb8vZT dxU9fFoVs/UtDMWif8qt3i6V4h9JltY4X3KHrh7SyGNm1L29iaETPuwe2Kcxr4hbfURv 7ACdvuLB7nPQxzc5gtlVb7qlKPcXOXWnD+td8qk3RTLMk2ovpQ6NEKWJFc3mXLOJ7ugn i43A== X-Gm-Message-State: ALoCoQnRYw4nQZ9vfbRsZPyGgMrzPNJ/XGuOfXbpa/iF7grzHjSCxQW/zB5Tb3WK0PTi1D2zwQT5 X-Received: by 10.112.50.10 with SMTP id y10mr3590264lbn.10.1440006665783; Wed, 19 Aug 2015 10:51:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.163 with SMTP id w3ls62032lae.21.gmail; Wed, 19 Aug 2015 10:51:05 -0700 (PDT) X-Received: by 10.112.89.230 with SMTP id br6mr10228625lbb.15.1440006665378; Wed, 19 Aug 2015 10:51:05 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id z10si1263777lae.0.2015.08.19.10.51.05 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 10:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laba3 with SMTP id a3so7870070lab.1 for <patchwork-forward@linaro.org>; Wed, 19 Aug 2015 10:51:05 -0700 (PDT) X-Received: by 10.112.168.100 with SMTP id zv4mr5437929lbb.117.1440006665178; Wed, 19 Aug 2015 10:51:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.162.200 with SMTP id yc8csp523118lbb; Wed, 19 Aug 2015 10:51:03 -0700 (PDT) X-Received: by 10.70.38.35 with SMTP id d3mr16686855pdk.33.1440006663840; Wed, 19 Aug 2015 10:51:03 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ca5si2520760pbd.19.2015.08.19.10.51.03 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 10:51:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZS7UE-0001p0-OI; Wed, 19 Aug 2015 17:49:18 +0000 Received: from mail-la0-f51.google.com ([209.85.215.51]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZS7UC-0001nP-3B for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2015 17:49:16 +0000 Received: by lahi9 with SMTP id i9so7772924lah.2 for <linux-arm-kernel@lists.infradead.org>; Wed, 19 Aug 2015 10:48:53 -0700 (PDT) X-Received: by 10.153.8.137 with SMTP id dk9mr12644385lad.57.1440006533155; Wed, 19 Aug 2015 10:48:53 -0700 (PDT) Received: from localhost (0187900153.0.fullrate.dk. [2.110.55.193]) by smtp.gmail.com with ESMTPSA id o6sm409795lah.20.2015.08.19.10.48.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Aug 2015 10:48:52 -0700 (PDT) Date: Wed, 19 Aug 2015 19:49:58 +0200 From: Christoffer Dall <christoffer.dall@linaro.org> To: Marc Zyngier <marc.zyngier@arm.com> Subject: Re: [PATCH v4 1/2] arm64: KVM: Optimize arm64 skip 30-50% vfp/simd save/restore on exits Message-ID: <20150819174958.GA11518@cbox> References: <1437082178-11039-1-git-send-email-m.smarduch@samsung.com> <1437082178-11039-2-git-send-email-m.smarduch@samsung.com> <55C235B9.3000800@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55C235B9.3000800@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150819_104916_329050_28F68A33 X-CRM114-Status: GOOD ( 24.82 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.51 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.51 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>, Mario Smarduch <m.smarduch@samsung.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 8b2a73b4..842e727 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -769,11 +769,26 @@ .macro activate_traps ldr x2, [x0, #VCPU_HCR_EL2] + + /* + * We are about to set CPTR_EL2.TFP to trap all floating point + * register accesses to EL2, however, the ARM ARM clearly states that + * traps are only taken to EL2 if the operation would not otherwise + * trap to EL1. Therefore, always make sure that for 32-bit guests, + * we set FPEXC.EN to prevent traps to EL1, when setting the TFP bit. + */ + tbnz x2, #HCR_RW_SHIFT, 99f // open code skip_32bit_state + mov x3, #(1 << 30) + msr fpexc32_el2, x3 + isb +99: + msr hcr_el2, x2 mov x2, #CPTR_EL2_TTA orr x2, x2, #CPTR_EL2_TFP msr cptr_el2, x2 + mov x2, #(1 << 15) // Trap CP15 Cr=15 msr hstr_el2, x2