xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH for-next v2 1/2] xen/arm: Include asm/asm-offsets.h and asm/macros.h on every assembly files
Date: Sat, 20 Mar 2021 12:09:39 +0000	[thread overview]
Message-ID: <311a97f6-e4ad-9f5e-cca5-301c79cae52b@xen.org> (raw)
In-Reply-To: <2B11BB5C-EF9B-4CE0-8477-D94091DA0870@arm.com>



On 17/03/2021 14:38, Bertrand Marquis wrote:
> Hi Julien,

Hi Bertrand,

>> On 13 Mar 2021, at 16:06, Julien Grall <julien@xen.org> wrote:
>>
>> From: Julien Grall <jgrall@amazon.com>
>>
>> In a follow-up patch we may want to automatically replace some
>> mnemonics (such as ret) with a different sequence.
>>
>> To ensure all the assembly files will include asm/macros.h it is best to
>> automatically include it on single assembly. This can be done via
>> config.h.
>>
>> It was necessary to include a few more headers as dependency:
>>   - <asm/asm_defns.h> to define sizeof_*
>>   - <xen/page-size.h> which is already a latent issue given STACK_ORDER
>>   rely on PAGE_SIZE.
>>
>> Unfortunately the build system will use -D__ASSEMBLY__ when generating
>> the linker script. A new option -D__LINKER__ is introduceed and used for
>> the linker script to avoid including headers (such as asm/macros.h) that
>> may not be compatible with the syntax.
>>
>> Lastly, take the opportunity to remove both asm/asm-offsets.h and
>> asm/macros.h from the various assembly files as they are now
>> automagically included.
>>
>> Signed-off-by: Julien Grall <jgrall@amazon.com>
> 
> Everything is now building :-)
> 
> I could not find a better then your define as filtering out or undefining __ASSEMBLY__
> is actually not working.

Yes, unfortunately the linker is also relying on __ASSEMBLY__ for a few 
macros and to also remove the definitions of structure/function from 
headers that can be included either in C or assembly.

-D__LINKER__ was the best option I could come up with.

> 
> So with the fix from offset to defns:
> 
> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Thanks! I will resend a new version with the fix fold in this patch.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2021-03-20 12:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13 16:06 [PATCH for-next v2 0/2] xen/arm: Mitigate straight-line speculation Julien Grall
2021-03-13 16:06 ` [PATCH for-next v2 1/2] xen/arm: Include asm/asm-offsets.h and asm/macros.h on every assembly files Julien Grall
2021-03-17 14:38   ` Bertrand Marquis
2021-03-20 12:09     ` Julien Grall [this message]
2021-03-13 16:06 ` [PATCH for-next v2 2/2] xen/arm64: Place a speculation barrier following an ret instruction Julien Grall
2021-03-17 14:56   ` Bertrand Marquis
2021-03-20 13:13     ` Julien Grall
2021-03-26 11:13       ` Bertrand Marquis
2021-03-26 11:56         ` Julien Grall
2021-03-26 13:07           ` Bertrand Marquis
2021-03-15 13:32 ` [PATCH for-next v2 0/2] xen/arm: Mitigate straight-line speculation Bertrand Marquis
2021-03-16 15:27   ` Julien Grall
2021-03-16 17:16     ` Bertrand Marquis
2021-03-17 11:20       ` Julien Grall
2021-03-17 14:04         ` Bertrand Marquis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=311a97f6-e4ad-9f5e-cca5-301c79cae52b@xen.org \
    --to=julien@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgrall@amazon.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).