[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Arm32: MSR to SPSR needs qualification


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 11 Jun 2021 09:55:10 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3yP0rvJv+Nzvyw8VKF6zz1e403fV6kW3ee23UwS+wE4=; b=oT/FVskDScveZc98vg02ufDYbt0f3DBk0bcC4b7wwFHZKbCEqUPwNIeXZrHAdyc1wphOmqHtp+GR1Gz9tqqd3GWNsd5/Y1VsXXky10Pemd89NjaWB9Onhm26DtFwg8+DKptXoHDmlAtuQtuWw3v28czNP6rrb5RtBR9jhPdu4axWSR4J32BWDa2lgtJALyC8oi6n9oZbTmaXf1P1zHaEjLg0PGBV3c52Yw/ioN1xK7AlfV5GuOm35I69WDQm0fAoeJREv6OKQDhbNXpD9MWGFouOHaSjk3VpX0Gm4Xw8UTahngV2595RAmwKwbvFVKzpPI1VSw2aGbqD/DIPgIkGCw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fcAPQnLESlCO0VkmGp3KPMEuDyvHFFdPCWqmkMFMk0mZnnfnVx/teHZaKj7c7OeB6Qf8GCVQUhoAwf/9yMZG9/9ECQMBAgqM5P/e96UUNV6gFkl5suotz0pQ8+XkupNmE90HUT5RPjeToaSyWfaP2JaLXlEtoq+pDlL79PJErUvxCBk3/ib8TxRTbHA/r0SztrcryEf0LHz8OhCFpHDaGkv/qGI4skc7xjzzkzZWbNkfyB3X35Tl4BLwOTVWgxCeSWvPKSbub46RR7AUAsk2p2c3UEB2oy7+SiGIFcUBZyuJGHJStq+RgfSBqXG6G+B4NOX75erJ72FbfVh4wzGpBw==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Fri, 11 Jun 2021 07:55:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The Arm ARM's description of MSR doesn't even allow for plain "SPSR"
here, and while gas accepts this, it takes it to mean SPSR_cf. Yet
surely all of SPSR wants updating on this path, not just the lowest and
highest 8 bits.

Fixes: dfcffb128be4 ("xen/arm32: SPSR_hyp/SPSR")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/arm/arm32/entry.S
+++ b/xen/arch/arm/arm32/entry.S
@@ -395,7 +395,7 @@ return_to_hypervisor:
         ldr r11, [sp, #UREGS_pc]
         msr ELR_hyp, r11
         ldr r11, [sp, #UREGS_cpsr]
-        msr SPSR, r11
+        msr SPSR_cxsf, r11
 #ifdef CONFIG_ARM32_HARDEN_BRANCH_PREDICTOR
         /*
          * Hardening branch predictor may require to setup a different




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.