Message ID | 20200820103446.959000-8-ascull@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=CyI3=B6=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B79D3722 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 20 Aug 2020 10:38:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9106F20855 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 20 Aug 2020 10:38:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eoKQpFLe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="IHhApn87" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9106F20855 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/QOiNKf2q4o0hF81ao54z5k9Tol4xnNgwcETUKD0gYg=; b=eoKQpFLemc2W8v+KQ8yYp7QWZ +6Z5C3K5AwqTJ1E0sxE2j3qR1Qyh2aMxTztRycnY+ZQopTvvl47jayZcbh0EWxCNT+d9BmAC/rbxf +Ot0aI6jnYpmtsPZnRJvctaoxZdgs20YUH84jXOZ8XmciCrSQJ0qD+0QkRuuPMMf5ZyD/s0MWroWd pHmvh3pacdZsQJ14SoFnJKfs+2+FcISyS1gUb1pTkjgh+6kvx/UY7gT3I9CzYZ0Gx0NQ98tbvMzoG WvBHAgDgmyvX5bP2bQ94Rho2DyqSywHXRQ8faCv/Qx4AaAiGcaHNorG0lUYluNnvalNNFubEoVAqE dBec0u2vA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8hvb-0002Gt-FI; Thu, 20 Aug 2020 10:36:15 +0000 Received: from mail-wm1-x349.google.com ([2a00:1450:4864:20::349]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8hv0-00020S-9U for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2020 10:35:39 +0000 Received: by mail-wm1-x349.google.com with SMTP id h7so627247wmm.7 for <linux-arm-kernel@lists.infradead.org>; Thu, 20 Aug 2020 03:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=/QX7EylRJ/FExG7A40+IjYbpo4wIFPAOSGmhSNIkFzQ=; b=IHhApn87zJAR0+Rthp+j95Ysv1+rnywvTokZnmx5mS5byQB5tQxxDsWwoYVP+gaKEW 71Hp7fBOd9rA26IKAxO/yyNGVP+vYsqVLnRlrkk07SWYaFI+mJQWx1RX1sCPCZ32zkND gzpoXbdknmPOjj7K9i1YmjSac0jE6klUEMy7NP/QSCe6pwftEpxzN1+wnBR1lLRbcIPa KWlL0hBPvAH96noxP47gSGlvos2QhiC/vyZD07hWYzHWZdV2DFPrfD/naCD6Jv1n+2t7 dk9J0QgazEUaOHGhibDqDKqMjiqxI9BmdrCgKbDMasb/j71Sw3qS/F7OpdzkqOyeUdDX RU4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=/QX7EylRJ/FExG7A40+IjYbpo4wIFPAOSGmhSNIkFzQ=; b=arOhTJIwC6ykf6H8x/ZOcd+R77oyotGrg3+cNAga7kZj9Cb6EHNlHzVKMqOBnwGO47 MotMSEi17wz1NP7xR4NsAR5hto8hGA8IpMQVNCOb1rdSbL9ZRDSJq0h2FMn+Qhsj9VZg ai269V6ymKwpu75CEUC792XNVN8tpM5x12Q17zYr7q+GkeMweHXXKKXqiTF14ol0oWdG 92HuAE/vNvKCDV2vxHBt5Ck1oreylnF64+oT8Vwepi1mqOl8pktL6QRglu4hIYzvLvE1 k8y1icsPpOoNAyGVjlsXkYy+5ZnxvROf2OG55HF5amE6a79k6fZxxr2ucz5xcdZiFpSa IlLQ== X-Gm-Message-State: AOAM533U3a1oPKEVRy4dCIgauFwgeZFdTtnl0CZG3VoRPAntht61YRah DNWA1AEhxWERhS1HgiNYNc8ek2FR5n0= X-Google-Smtp-Source: ABdhPJzg3Plo66Qc18GYT6LlmTM0ZH2VCTtKR3/KsvG5ZrhyMpf4Y2VYjscneeGBFSBzxXgBGoPlI94x6O8= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a5d:540c:: with SMTP id g12mr2528159wrv.120.1597919735573; Thu, 20 Aug 2020 03:35:35 -0700 (PDT) Date: Thu, 20 Aug 2020 11:34:33 +0100 In-Reply-To: <20200820103446.959000-1-ascull@google.com> Message-Id: <20200820103446.959000-8-ascull@google.com> Mime-Version: 1.0 References: <20200820103446.959000-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog Subject: [PATCH v2 07/20] KVM: arm64: nVHE: Don't consume host SErrors with ESB From: Andrew Scull <ascull@google.com> To: kvmarm@lists.cs.columbia.edu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_063538_422767_D938EFFC X-CRM114-Status: GOOD ( 14.44 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:349 listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> 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, kernel-team@android.com, suzuki.poulose@arm.com, maz@kernel.org, Sudeep Holla <sudeep.holla@arm.com>, james.morse@arm.com, Andrew Scull <ascull@google.com>, catalin.marinas@arm.com, will@kernel.org, julien.thierry.kdev@gmail.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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
Introduce separate nVHE hyp context
|
expand
|
diff --git a/arch/arm64/kvm/hyp/nvhe/host.S b/arch/arm64/kvm/hyp/nvhe/host.S index 9c96b9a3b71d..5a7380c342c8 100644 --- a/arch/arm64/kvm/hyp/nvhe/host.S +++ b/arch/arm64/kvm/hyp/nvhe/host.S @@ -24,7 +24,6 @@ SYM_FUNC_END(__hyp_do_panic) .macro valid_host_el1_sync_vect .align 7 - esb stp x0, x1, [sp, #-16]! mrs x0, esr_el2 @@ -77,6 +76,11 @@ SYM_FUNC_END(__hyp_do_panic) .endm /* + * The host vector does not use an ESB instruction in order to avoid consuming + * SErrors that should only be consumed by the host. Guest entry is deferred by + * __guest_enter if there are any pending asynchronous exceptions so hyp will + * always return to the host without having consumerd host SErrors. + * * CONFIG_KVM_INDIRECT_VECTORS is not applied to the host vector because the * host already knows the address of hyp by virtue of loading it there. */
The ESB at the start of the host vector may cause SErrors to be consumed to DISR_EL1. However, this is not checked for the host so the SError could go unhandled. Remove the ESB so that SErrors are not consumed but are instead left pending for the host to consume. __guest_enter already defers entry into a guest if there are any SErrors pending. Fixes: 0e5b9c085dce ("KVM: arm64: Consume pending SError as early as possible") Cc: James Morse <james.morse@arm.com> Signed-off-by: Andrew Scull <ascull@google.com> --- arch/arm64/kvm/hyp/nvhe/host.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)