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

Re: [PATCH 2/4] ARM: Fix register constraints in run_in_exception_handler()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 10 Feb 2025 11:33:13 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kBi1x6k90vos6awpLqkjigd7lq6Q996Sj8RvchqyCms=; b=OqA6+RpcfYgjCAewM6W+9ZavO52B1220nqiVGSgeouUa/5ZbapJQmFYwoZ6l7yu2iFj8jDEQP9JxusarKzP6AG7vVw3+604z9uE20b7prNRj0UNNrUnIaUsw/A46zTaLRvrlG0ruGMBsKwumsAXMj610WTCYpQHfcXaATOkFH7pXo2ZBEB1xF6PV+lT0VDMsAA/DM4jmVtK3wr2WJDLK7SG/smf9wbF3KP3MvmnOyFxqiYKtQYyuGGeLygFLbvH87TjaMyRhw0W1oOkGXWX7aCZj7vL58V3LNiC7OwfK3PyaHsUQMme0wHucd1Uh7dEj8Myju9uzx2qfYuixDWczqg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ttXuo+YzVH4KqovduNm+rrGI4fKedLv+qwtaliAln0YSNlFp4D/lT5zXGTmK1OlofBqayx7moQkcu6Puo7XtS1IAA4T7uv+MnWwe0fbjFRLiKH9XEbadYp96QRpyFN1xiASFRsg3qzRxikPcw6BzGVXfcHNYtx7kd7bfBfNsiGowz2HO3L7mMsoBsOuOj0GqbjryBTqW+sELn0rvKOL1u+B6JQ++zo+y736MuAOMALRqoZ6U4HxABCNc/oMlRHivDBq5W1pFnWSMqEfbgCcQRt14Rp/rkV03WbF8fPVdPKyqsOhUHP6oc1qYy7YvxGqAdIU2GhiURWsoyiAFsBOFrQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Mon, 10 Feb 2025 10:33:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 08/02/2025 01:02, Andrew Cooper wrote:
> 
> 
> Right now, run_in_exception_handler() takes an input in an arbitrary register,
> and clobbers BUG_FN_REG.  This causes the compiler to calculate fn in the
> wrong regsiter.
> 
> Instead, use `register asm()` which is the normal way of tying register
> constraints to exact registers.
> 
> Bloat-o-meter reports:
> 
>   ARM64:
>     Function                                     old     new   delta
>     dump_registers                               356     348      -8
> 
>   ARM32:
>     ns16550_poll                                  52      48      -4
>     dump_registers                               432     428      -4
> 
> The other instruction dropped in ARM64's dump_registers() is an alignment nop.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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