Message ID | 20200915104643.2543892-8-ascull@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=n+mw=CY=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 9ECCF618 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 15 Sep 2020 11:00:56 +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 5A6AE218AC for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 15 Sep 2020 11:00:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0hCdqW80"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="BR0wA96A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A6AE218AC 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=v9bcrWjD7l7LPDRExTXa4Xwu+MKDy5WgIqdsjH60enA=; b=0hCdqW803S14BcqQxxfFlx9oR 4YBo92xRx3gpt4R1C+9D4KO/74UCWrJIhSxWBUauTow6nLQ1OHNUsY3U0j3XH6qNjdFGb/6L6Wirc 6NQT/HU+lcYsL3JaSqy6WrC/NBeGs/WtXctuZUDnr3aKOmrmTYuXbb0gj17gfRfCWCvhRbSFqLq7f XKghdH2xcglxSHJgTqVAteC28pbl+L32B/HIoWTjkZ7TW5iI6vQPmMJBdEsaAYbcNH3e4eDmPOdr7 JX5rDWqu2CfhLD2RD5ibVALoKHT+y7DvoY8P5ZPKliHeqZ+d986RNfbKzo/A19lQKxiIox7GUSY1S VlZLgWkeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kI8ec-0005LC-Hr; Tue, 15 Sep 2020 10:57:44 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kI8US-0000sV-6N for linux-arm-kernel@lists.infradead.org; Tue, 15 Sep 2020 10:47:14 +0000 Received: by mail-qk1-x74a.google.com with SMTP id r128so2535845qkc.9 for <linux-arm-kernel@lists.infradead.org>; Tue, 15 Sep 2020 03:47:05 -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=Po+wZRTuKANKLTS58/LM8kKLRKZCbVKIB2pLYts5mK0=; b=BR0wA96AJwTKeBnilG3UFR16c/70GIr3wumgpyk13wvWak5PM4pFvRohcsFrvrIc8n QYs8cda2WMomNv5nXMnPLRM4eDxjCqsqkKgaxAIkw+2AxB0zgMAU937h4RhW0Ul4jWdH M0rpEqhPeKUXbcvGzsNqTGu8HizpEYSRveDWv4nZea+hwEgUbJXDcEx1j3hiDvNw/ppf WtaNF9aZ2WwVq5ft85QGu3IMKu1xIGRIrcnuwUJPhL03ip36Hl721+FIWnDflOuVfkmT n29hIqEg7W9Ok5YF5L0LfYLAceh9VQp9p2OC7H2JWUjNYEfcKW5g96lNbDhFGX3Qx/+E 2bfA== 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=Po+wZRTuKANKLTS58/LM8kKLRKZCbVKIB2pLYts5mK0=; b=DcIr/JeQMAtEIsSFd2ZV39/ijDG2vnCiXjlYE2BQy+V4WMMjSY/wnWOA501P6Qds5r CHeGLMathCCbvLos2EU/oPmLhkpRsyQXdwE7xYSSs/DtrWs987wvPnUr/GHeo1UUTG2O Sgzn4o3ZaAGuVSkLxD/Ji/6uy3td2V0D1KcTECkt1DAUy8n1NMLz7HkDI6dkzNIHIMhu /DLt2ls6ofZ8BpN94+/+DEiafGDdf3tKSd4Y+6sele+plli5AjW4UB6QDykmhu/FclFe +bXux47poBxcamCtdx65A4cM4ojHPZh+tTC36QC+TDnjT5Us4lM8ZxaA7LsQBqY9z0+/ bgdw== X-Gm-Message-State: AOAM5302MqqyPxbamqs8oPFYOfpUKk91Ry9KCKQ/REYQVAAiBEetqVhN +ecXZ9XVydnfEugWgbT2zA8ouo0gBis= X-Google-Smtp-Source: ABdhPJyk+qo1IWq4RwKq+M14b8Jl4v+fz5ZHo09dFG0qc7AlS0GZMtT0cSyfEDGhRW0gRIflrPcIfh2Dpsk= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a05:6214:a11:: with SMTP id dw17mr1007655qvb.62.1600166823797; Tue, 15 Sep 2020 03:47:03 -0700 (PDT) Date: Tue, 15 Sep 2020 11:46:31 +0100 In-Reply-To: <20200915104643.2543892-1-ascull@google.com> Message-Id: <20200915104643.2543892-8-ascull@google.com> Mime-Version: 1.0 References: <20200915104643.2543892-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog Subject: [PATCH v4 07/19] 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-20200915_064712_762908_F00D1C7B X-CRM114-Status: GOOD ( 14.96 ) 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 [2607:f8b0:4864:20:0:0:0:74a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 128af58d342d..da21fddcef75 100644 --- a/arch/arm64/kvm/hyp/nvhe/host.S +++ b/arch/arm64/kvm/hyp/nvhe/host.S @@ -25,7 +25,6 @@ SYM_FUNC_END(__hyp_do_panic) .macro host_el1_sync_vect .align 7 .L__vect_start\@: - esb stp x0, x1, [sp, #-16]! mrs x0, esr_el2 lsr x0, x0, #ESR_ELx_EC_SHIFT @@ -80,6 +79,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 vectors because the * host knows about the EL2 vectors already, and there is no point in hiding * them.
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. 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(-)