From patchwork Fri Jun 19 18:41:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Smarduch X-Patchwork-Id: 6647091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17DE9C0020 for ; Fri, 19 Jun 2015 18:45:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44ED1205DC for ; Fri, 19 Jun 2015 18:45:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD1C12096D for ; Fri, 19 Jun 2015 18:45:03 +0000 (UTC) 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 1Z61FL-0005qF-VG; Fri, 19 Jun 2015 18:42:36 +0000 Received: from mailout3.w2.samsung.com ([211.189.100.13] helo=usmailout3.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z61FC-0005aT-LH for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2015 18:42:27 +0000 Received: from uscpsbgex1.samsung.com (u122.gpu85.samsung.co.kr [203.254.195.122]) by usmailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NQ7007AFFY3CX90@usmailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2015 14:42:03 -0400 (EDT) X-AuditID: cbfec37a-f79c96d000005f02-53-5584627b109a Received: from usmmp1.samsung.com ( [203.254.195.77]) by uscpsbgex1.samsung.com (USCPEXMTA) with SMTP id E9.8A.24322.B7264855; Fri, 19 Jun 2015 14:42:03 -0400 (EDT) Received: from sisasmtp.sisa.samsung.com ([105.144.21.116]) by usmmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NQ700FYDFY2MNF0@usmmp1.samsung.com>; Fri, 19 Jun 2015 14:42:03 -0400 (EDT) Received: from mjsmard-530U3C-530U4C-532U3C.sisa.samsung.com (105.145.24.31) by SISAEX02SJ.sisa.samsung.com (105.144.21.116) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 19 Jun 2015 11:42:02 -0700 From: Mario Smarduch To: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, christoffer.dall@linaro.org Subject: [RESEND PATCH v2 2/2] arm: KVM: keep arm vfp/simd exit handling consistent with arm64 Date: Fri, 19 Jun 2015 11:41:45 -0700 Message-id: <1434739306-23417-1-git-send-email-m.smarduch@samsung.com> X-Mailer: git-send-email 1.7.9.5 MIME-version: 1.0 X-Originating-IP: [105.145.24.31] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJLMWRmVeSWpSXmKPExsVy+t9hX93qpJZQg8n7xCxevP7HaPHx1HF2 i02Pr7Fa/L3zj82BxWPNvDWMHneu7WHzOL9pDbPH5iX1ASxRXDYpqTmZZalF+nYJXBn/Nx5l KzjAVfHl/l/WBsalHF2MnBwSAiYSG2fvY4ewxSQu3FvPBmILCSxjlLjTB1TDBWQ3MUlM+fqD HcK5wCgxvW0eE0gVm4CuxP57G8G6RQRCJa7/bQSLMwsES2x//BTMFhZIkNi76y8ziM0ioCqx e8sBli5GDg5eATeJeyv9QUwJAQWJOZNsQCp4BQQlfky+B1bBLCAh8fyzEsQ5qhLbbj5nhDhT UeLW+flMExgFZiHpmIXQsYCRaRWjWGlxckFxUnpqhaFecWJucWleul5yfu4mRkiAVu1gvPPV 5hCjAAejEg+vwbfmUCHWxLLiytxDjBIczEoivDcjWkKFeFMSK6tSi/Lji0pzUosPMUpzsCiJ 8y6QkAsVEkhPLEnNTk0tSC2CyTJxcEo1MDo9mVy58FBz36Q9yneUCm8s2idmnBMUsjdA18PX 6MU59ZRtm7ReHX9rNX3+9+KJv9z6Neva1yY+zpBqZ7rzTuBdq9H9SPvdwsWn33uyaG5lSDp8 Sc7goXzoTqut4mcE3v/S+HXfuuLq88M8lm+Of3CYEffzg8KxhGfFHcqhVR1/lk6O2RP99J8S S3FGoqEWc1FxIgAVYu9wTAIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150619_114226_810977_C49D8B20 X-CRM114-Status: UNSURE ( 7.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.3 (-----) Cc: linux-arm-kernel@lists.infradead.org, Mario Smarduch X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After enhancing arm64 FP/SIMD exit handling, 32-bit VFP exit branch is moved to guest trap handling, keeping exit handling flow for both architectures consistent. Also replaced an unused label with a comment. Signed-off-by: Mario Smarduch --- arch/arm/kvm/interrupts.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index 79caf79..16f00f1 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S @@ -363,10 +363,6 @@ hyp_hvc: @ Check syndrome register mrc p15, 4, r1, c5, c2, 0 @ HSR lsr r0, r1, #HSR_EC_SHIFT -#ifdef CONFIG_VFPv3 - cmp r0, #HSR_EC_CP_0_13 - beq switch_to_guest_vfp -#endif cmp r0, #HSR_EC_HVC bne guest_trap @ Not HVC instr. @@ -380,7 +376,7 @@ hyp_hvc: cmp r2, #0 bne guest_trap @ Guest called HVC -host_switch_to_hyp: + /* Guest is calling a hyp function, save minimum context branch to it */ pop {r0, r1, r2} /* Check for __hyp_get_vectors */ @@ -411,6 +407,10 @@ guest_trap: @ Check if we need the fault information lsr r1, r1, #HSR_EC_SHIFT +#ifdef CONFIG_VFPv3 + cmp r1, #HSR_EC_CP_0_13 + beq switch_to_guest_vfp +#endif cmp r1, #HSR_EC_IABT mrceq p15, 4, r2, c6, c0, 2 @ HIFAR beq 2f