From patchwork Mon Feb 5 13:20:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 126870 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1967511ljc; Mon, 5 Feb 2018 05:22:54 -0800 (PST) X-Google-Smtp-Source: AH8x225ymXqYhMK8RfrItuXnR9pcHb0nUDNF8SXKLR5w21fEwCb9Qm0h3Jp2RHVQ8YIuZGFIRpgb X-Received: by 10.107.172.131 with SMTP id v125mr34338763ioe.302.1517836974439; Mon, 05 Feb 2018 05:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517836974; cv=none; d=google.com; s=arc-20160816; b=BV+bPv2VuAbPPZ3rB5q+12QtHi/iTQbXXUQXV9rbXPbs2TdlRoX1Ahw7UOF7YOw1b1 HV8GEpzPAHetJce8CQZCZCUoWkCtnR44DPXcnOzHO27u9HtMKr39rJT2gKb+DO+MREF6 RO8ZrL8cnv6mWDLjIU3tjdk9GA9WQVeuh2OppsAaBLsyr6bcGvNbhJlSdMnMC0m4pqFb ULFt7+gQT9iglGkw21/sdG8MPy1z/dWNUrqJQHczQEcWte2vHEC7ED7EAw/ChiWts5qw uoNkH3xnPHC67A6e0NSZtGMilOQsUqdowa7g2NXszjrHyzXi2kyrvZV7MpRvrPCL2al9 QfXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=sUUCvetFYN+Dxc/Rl3SPYiUARq/7cWYLWosNeG6Ea1o=; b=CQtUMKJoRXYEuEwwDItNYzzRRt1WqLBsZkhzXXK7Y+6i60kWp0qOnvd1iwANAIMRlR gSKvYBo6baRo7hEC/evSHSDPSCx+bzqMeLyu+mxtpvFqEfQJIKJVEL4LsxEnLO9YPt8b 4TPM6SGeskW7BPhjQHcvEw+3ad3Lvosls7x5jvJ61RTU9PSDcg2mGNx9rvmLg15EksFW 1oZVJPlxfQIzbV1l3kDOXAxMEjt6PaNI7a3aEEHCqfrA+80Gai0oK0m3psnKHD+vZhb/ Zb4YxfF60AnrOR/vh3FVXcuaAxEF5Y09t0N7zHfKYx3dSbNxgy+UxE8MRuSl2BSLRcN3 bw4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id u66si767810itd.105.2018.02.05.05.22.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 05:22:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eighI-0007Su-D2; Mon, 05 Feb 2018 13:20:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eighH-0007NB-Ao for xen-devel@lists.xen.org; Mon, 05 Feb 2018 13:20:35 +0000 X-Inumbo-ID: 710551a2-0a77-11e8-b9b1-635ca7ef6cff Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 710551a2-0a77-11e8-b9b1-635ca7ef6cff; Mon, 05 Feb 2018 13:21:14 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 839241596; Mon, 5 Feb 2018 05:20:29 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 980BE3F24D; Mon, 5 Feb 2018 05:20:28 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 5 Feb 2018 13:20:11 +0000 Message-Id: <20180205132011.27996-10-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205132011.27996-1-julien.grall@arm.com> References: <20180205132011.27996-1-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org, andre.przywara@linaro.org Subject: [Xen-devel] [PATCH 9/9] xen/arm: Help to know the hardening provided for a CPU X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" --- xen/arch/arm/cpuerrata.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 9c7458ef06..6704648b26 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -79,7 +79,8 @@ static bool copy_hyp_vect_bpi(unsigned int slot, const char *hyp_vec_start, static bool __maybe_unused install_bp_hardening_vec(const struct arm_cpu_capabilities *entry, const char *hyp_vec_start, - const char *hyp_vec_end) + const char *hyp_vec_end, + const char *desc) { static int last_slot = -1; static DEFINE_SPINLOCK(bp_lock); @@ -94,6 +95,9 @@ install_bp_hardening_vec(const struct arm_cpu_capabilities *entry, if ( !entry->matches(entry) ) return true; + printk(XENLOG_INFO "CPU%u will %s on exception entry\n", + smp_processor_id(), desc); + /* * No need to install hardened vector when the processor has * ID_AA64PRF0_EL1.CSV2 set. @@ -157,7 +161,8 @@ static int enable_psci_bp_hardening(void *data) */ if ( psci_ver >= PSCI_VERSION(0, 2) ) ret = install_bp_hardening_vec(data, __psci_hyp_bp_inval_start, - __psci_hyp_bp_inval_end); + __psci_hyp_bp_inval_end, + "call PSCI get version"); else if ( !warned ) { ASSERT(system_state < SYS_STATE_active);