xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 2/4] x86/page: Remove bifurcated PAGE_HYPERVISOR constant
Date: Wed, 15 Jan 2020 12:53:41 +0000	[thread overview]
Message-ID: <0a3aa710-3172-3133-58b6-c96b828d06cc@citrix.com> (raw)
In-Reply-To: <e3ed87ff-5142-5105-2c6f-97a185d0b8e9@suse.com>

On 14/01/2020 16:25, Jan Beulich wrote:
>> --- a/xen/include/asm-x86/x86_64/page.h
>> +++ b/xen/include/asm-x86/x86_64/page.h
>> @@ -172,18 +172,11 @@ static inline intpte_t put_pte_flags(unsigned int x)
>>  #define PAGE_HYPERVISOR_RX      (__PAGE_HYPERVISOR_RX      | _PAGE_GLOBAL)
>>  #define PAGE_HYPERVISOR_RWX     (__PAGE_HYPERVISOR         | _PAGE_GLOBAL)
>>  
>> -#ifdef __ASSEMBLY__
>> -/* Dependency on NX being available can't be expressed. */
>> -# define PAGE_HYPERVISOR         PAGE_HYPERVISOR_RWX
>> -# define PAGE_HYPERVISOR_UCMINUS (__PAGE_HYPERVISOR_UCMINUS | _PAGE_GLOBAL)
>> -# define PAGE_HYPERVISOR_UC      (__PAGE_HYPERVISOR_UC      | _PAGE_GLOBAL)
>> -#else
>>  # define PAGE_HYPERVISOR         PAGE_HYPERVISOR_RW
>>  # define PAGE_HYPERVISOR_UCMINUS (__PAGE_HYPERVISOR_UCMINUS | \
>>                                    _PAGE_GLOBAL | _PAGE_NX)
>>  # define PAGE_HYPERVISOR_UC      (__PAGE_HYPERVISOR_UC | \
>>                                    _PAGE_GLOBAL | _PAGE_NX)
> ... I'm afraid the assembler error resulting from someone actually
> (and mistakenly) using one of the constants making use of _PAGE_NX
> is going to be rather cryptic. Which in turn may motivate people
> to actually try to make _PAGE_NX "work" in assembly code. Therefore
> I'd like to ask that together with the changes here _PAGE_NX's
> #define be framed by #ifndef __ASSEMBLY__, such that any
> diagnostic, if it mentions a symbol name, would name the actual
> problem, rather than a derived one.

I can do this, but it doesn't make the error any less cryptic.

With _PAGE_NX hidden:

head.S: Assembler messages:
head.S:677: Error: invalid operands (*ABS* and *UND* sections) for `|'

With it visible:

head.S: Assembler messages:
head.S:677: Error: invalid character '?' in operand 1

I'm not aware of any way to get a useful symbol name out of the error.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-01-15 12:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 17:50 [Xen-devel] [PATCH 0/4] x86: Remove 16M total-size restriction Andrew Cooper
2020-01-13 17:50 ` [Xen-devel] [PATCH 1/4] x86/boot: Rename l?_identmap to l?_directmap Andrew Cooper
2020-01-14 16:16   ` Jan Beulich
2020-01-13 17:50 ` [Xen-devel] [PATCH 2/4] x86/page: Remove bifrucated PAGE_HYPERVISOR constant Andrew Cooper
2020-01-13 17:50 ` [Xen-devel] [PATCH 2/4] x86/page: Remove bifurcated " Andrew Cooper
2020-01-14 16:25   ` Jan Beulich
2020-01-15 12:53     ` Andrew Cooper [this message]
2020-01-15 13:07       ` Jan Beulich
2020-01-15 14:08   ` [Xen-devel] [PATCH v2 " Andrew Cooper
2020-01-16  9:46     ` Jan Beulich
2020-01-13 17:50 ` [Xen-devel] [PATCH 3/4] x86/boot: Create the l2_xenmap[] mappings dynamically Andrew Cooper
2020-01-14 16:45   ` Jan Beulich
2020-01-14 19:31     ` Andrew Cooper
2020-01-15  9:23       ` Jan Beulich
2020-01-16 19:41         ` Andrew Cooper
2020-01-13 17:50 ` [Xen-devel] [PATCH 4/4] x86/boot: Size the boot/directmap " Andrew Cooper
2020-01-14 17:02   ` Jan Beulich
2020-01-14 17:27     ` Andrew Cooper
2020-01-15  9:40       ` Jan Beulich
2020-01-15 10:21         ` Jan Beulich
2020-01-14 13:03 ` [Xen-devel] [PATCH 0/4] x86: Remove 16M total-size restriction Andrew Cooper

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=0a3aa710-3172-3133-58b6-c96b828d06cc@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.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).