From nobody Tue Nov 11 08:48:48 2025 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=1569523171; cv=none; d=zoho.com; s=zohoarc; b=JFOfytfSWmZADV0/pIJq6FFcdgf//1l5RY+rTAcGDC9axlX5vDNLHf6JsrR++AHRNCupJLf8OVN9/Sgkriv82LqQeKxu5TXM2o28P5bRVBV/ffGqAVuV9NpwLK1dKiR3mfibqApH83nTruZujXhUzXNbbKDoY0PGZEz4w150UaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569523171; 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:ARC-Authentication-Results; bh=12Gpp2LuYCSKfYI8cf4cC7TmJMqRitLQTVo4r62EI8Q=; b=N/Ta5RdT7/WhVmkad0xdhiifeyBgoq01kY0cwVAIkyeT0MTBpQ+FvuyRmBnW8d3/pW/jUo6x5mN0faptjp3Zb1MrhyZBv0IlYqIPIzC4c/wtQi4Ra3eBn1A025cU3x2D9EbOTx9xOTkWwlrJyL0lId8ZJZljJQk7mDVDFKaxiKc= 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 1569523171682653.1068371532994; Thu, 26 Sep 2019 11:39:31 -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 1iDYek-0002OS-Gz; Thu, 26 Sep 2019 18:38:22 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDYei-0002OC-Qo for xen-devel@lists.xenproject.org; Thu, 26 Sep 2019 18:38:20 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id cd4a7fb0-e08c-11e9-97fb-bc764e2007e4; Thu, 26 Sep 2019 18:38:15 +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 50DD81596; Thu, 26 Sep 2019 11:38:15 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8487C3F67D; Thu, 26 Sep 2019 11:38:14 -0700 (PDT) X-Inumbo-ID: cd4a7fb0-e08c-11e9-97fb-bc764e2007e4 From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 26 Sep 2019 19:38:00 +0100 Message-Id: <20190926183808.11630-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190926183808.11630-1-julien.grall@arm.com> References: <20190926183808.11630-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH RFC for-4.13 02/10] xen/arm64: head: 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: Julien Grall , Stefano Stabellini , Volodymyr Babchuk , andrii.anisov@gmail.com 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 --- 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 8665d2844a..40d9f3ec8c 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -324,11 +324,7 @@ guest_fiq_invalid: invalid BAD_FIQ =20 guest_error: - entry hyp=3D0, compat=3D0 - msr daifclr, #6 - mov x0, sp - bl do_trap_guest_serror - exit hyp=3D0, compat=3D0 + guest_vector compat=3D0, iflags=3D6, trap=3Dguest_serror =20 guest_sync_compat: guest_vector compat=3D1, iflags=3D6, trap=3Dguest_sync @@ -341,11 +337,7 @@ guest_fiq_invalid_compat: invalid BAD_FIQ =20 guest_error_compat: - entry hyp=3D0, compat=3D1 - msr daifclr, #6 - mov x0, sp - bl do_trap_guest_serror - exit hyp=3D0, compat=3D1 + guest_vector compat=3D1, iflags=3D6, 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