From nobody Mon Feb 9 19:30:15 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1572534659; cv=none; d=zoho.com; s=zohoarc; b=XzZu6JJ+kAXDz7lMEFZWeG4KF3ntulT/UYAq9fmPHXpuoXkACi5hed6diMjgymqRWngKeVWuXFWMOTFs1NbPdf/P7kFSq7QtSyN6j83YqOx1632lr+ha6LcbjoPQuwJJZxYxBmBTtWZLRvGb9iKnKRd7FmXB0ivYSZbfW46cn/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572534659; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fTz0HATC195JmE1Ve91RC73QX4s6IhXdLT+g4B9v6OQ=; b=Jyl6VKA3cl5Pda8+fd3rForosWl7gFU1ibYCJDI86xxlNdNT4wTxN9Ry/hZb9BrHtxyAyJQnEx9OhBEzRQ9iqIV4PmmaCi09YPjBCsm0PvWpzq5c/+KHZHZS+/Dy+b7Jq6WQyI+AyE5m1J3snwYOvYTzi5KYtoaKAJtEu9ltN3I= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1572534659325226.31970370825854; Thu, 31 Oct 2019 08:10:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iQC58-0006Xc-Jo; Thu, 31 Oct 2019 15:09:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iQC57-0006Wv-Bt for xen-devel@lists.xenproject.org; Thu, 31 Oct 2019 15:09:49 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 77ea8f2c-fbf0-11e9-bbab-bc764e2007e4; Thu, 31 Oct 2019 15:09:43 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4E3F74F5; Thu, 31 Oct 2019 08:09:43 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (unknown [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6682C3F71E; Thu, 31 Oct 2019 08:09:42 -0700 (PDT) X-Inumbo-ID: 77ea8f2c-fbf0-11e9-bbab-bc764e2007e4 From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 31 Oct 2019 15:09:11 +0000 Message-Id: <20191031150922.22938-9-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191031150922.22938-1-julien.grall@arm.com> References: <20191031150922.22938-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.13 v4 08/19] xen/arm64: entry: Check if an SError is pending when receiving a vSError X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Julien Grall MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the moment, when we receive an SError exception from the guest, we don't check if there are any other pending. For hardening the code, we should ensure any pending SError are accounted to the guest before executing any code with SError unmasked. The recently introduced macro 'guest_vector' could used to generate the two vectors and therefore take advantage of any change required in the future. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Changes in v3: - Add Stefano's reviewed-by Changes in v2: - Title: s/head/entry/ - Use the new short-hands --- xen/arch/arm/arm64/entry.S | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S index 2867c499da..d94c13e7bf 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -381,11 +381,7 @@ guest_fiq_invalid: invalid BAD_FIQ =20 guest_error: - entry hyp=3D0, compat=3D0 - msr daifclr, #IFLAGS__AI_ - mov x0, sp - bl do_trap_guest_serror - exit hyp=3D0, compat=3D0 + guest_vector compat=3D0, iflags=3DIFLAGS__AI_, trap=3Dguest_serror =20 guest_sync_compat: guest_vector compat=3D1, iflags=3DIFLAGS__AI_, trap=3Dguest_sync @@ -398,11 +394,7 @@ guest_fiq_invalid_compat: invalid BAD_FIQ =20 guest_error_compat: - entry hyp=3D0, compat=3D1 - msr daifclr, #IFLAGS__AI_ - mov x0, sp - bl do_trap_guest_serror - exit hyp=3D0, compat=3D1 + guest_vector compat=3D1, iflags=3DIFLAGS__AI_, trap=3Dguest_serror =20 ENTRY(return_to_new_vcpu32) exit hyp=3D0, compat=3D1 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel