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

Re: [Xen-devel] [PATCH RFC for-4.13 08/10] xen/arm: alternative: add auto-nop infrastructure


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Fri, 27 Sep 2019 15:34:44 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=cc1K7PvVaakiog/+ssz6pIa48uAPTbxWsoa8AMjzl6o=; b=Trvf1ViW80cGieoORCGKxS+0BViUtdVjpH5DOoo8ApHtoLkMlQMYZ5EXNhEE/aMcrP/KvcfCdhWSfgDxrqnjDssmhFSLXYbHf2cxwqJBXdN7KHMS/y+VipJK+BoDAqGd/B5MTgB0Gy+fMGWBicE17OjF5A2Ef2ZYhpgi0pKwiRBFzlkyat6hBP/EHKLwpAnN1NBcBql12zFq+4iTc0KvxRRKKY54HmGyQVo+lfKfuyS+LxHudhNFD7g9vnZ1zTSz0ADuyk3kkQZWf/3Uwg8rFnzI8RZFTvs5cxISW0bFS/7ZQXGYicy8rJgluQwsQDobYjMBnkP3DQtWOoD7INX23A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lUUtOlpylyL13DpQ6ugE7OUR+itIV+rnxd8lbSyU4YvZV3hnI2S7iSjH2hEpjHcFAc+Fdl2FrIhNGJ9akxzyvYrCb9WcpdRyevtUj7tiGfOpoEoCM5PO7S6mnOfFzO75MsQyTcC8r6gEHzQFXQlZPZMjh5WZZFw/jruHWFiUmfTOtds7cWhSc7P70A/jjzQFTMvLhDq9wTyL/X9IcL63r7lUoKxABcVIA0WoShxp80E5VrIo8es9rfBwB2LTYVsS4RgPrUj5dfz8WsRUIgvWXtzswSP0hoZvZLE3FwhF46XzbtRXi76lh+GeFYtC1eOm5VFKgm+BnoNvEPzlS1OS5g==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@xxxxxxxx;
  • Cc: Mark Rutland <mark.rutland@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, "andrii.anisov@xxxxxxxxx" <andrii.anisov@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 27 Sep 2019 15:34:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVdJmVEemrUGDvaUSmkI1ETa3zKqc/qPeA
  • Thread-topic: [PATCH RFC for-4.13 08/10] xen/arm: alternative: add auto-nop infrastructure

Julien Grall writes:

> From: Mark Rutland <mark.rutland@xxxxxxx>
>
> In some cases, one side of an alternative sequence is simply a number of
> NOPs used to balance the other side. Keeping track of this manually is
> tedious, and the presence of large chains of NOPs makes the code more
> painful to read than necessary.
>
> To ameliorate matters, this patch adds a new alternative_else_nop_endif,
> which automatically balances an alternative sequence with a trivial NOP
> sled.
>
> In many cases, we would like a NOP-sled in the default case, and
> instructions patched in in the presence of a feature. To enable the NOPs
> to be generated automatically for this case, this patch also adds a new
> alternative_if, and updates alternative_else and alternative_endif to
> work with either alternative_if or alternative_endif.
>
> The alternative infrastructure was originally ported from Linux. So this
> is pretty much a straight backport from commit 792d47379f4d "arm64:
> alternative: add auto-nop infrastructure". The only difference is the
> nops macro added as not yet existing in Xen.
>
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> [will: use new nops macro to generate nop sequences]
> Signed-off-by: Will Deacon <will.deacon@xxxxxxx>
> [julien: Add nops and port to Xen]
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>


-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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