All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Julien Grall <julien@xen.org>
Cc: Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned
Date: Fri, 18 Aug 2023 10:14:30 +0200	[thread overview]
Message-ID: <58ecfdf4-c0ce-be56-8686-d6fcf06f9609@suse.com> (raw)
In-Reply-To: <2b86f83a-6352-4b43-835b-6c56ad8260ba@xen.org>

On 18.08.2023 09:39, Julien Grall wrote:
> On 18/08/2023 07:33, Jan Beulich wrote:
>> As an aside I wonder why they're here: They look like definitions of
>> processor registers, which aren't under our (Xen's) control.
> 
> I agree they are not under Xen's control. However, they are used by the 
> toolstack and IIRC back then they were not available in any other headers.
> 
> Note that they are only available by the tools and the hypervisor (see 
> #ifdef above).

Yes, I did notice that (or else I would have used stronger wording).

>> I ask in
>> part because the presence of such constants may then be taken as
>> justification to add similar things in new ports. Yet such definitions
>> shouldn't be put here.
> 
>  From my understanding we are using the public headers to provide 
> macros/defines that are used by both the toolstack and the hypervisor. 
> If they are not meant to be exposed to the guest, then they will be 
> protected with "#if defined(__XEN__) || defined(__XEN_TOOLS__)".
> 
> I think we are in a similar situation here. So it is not clear where 
> they should be put if we need to share them between the hypervisor and 
> the toolstack.

On x86 we simply arrange for certain hypervisor headers to be re-usable
from the toolstack. See in particular arch/x86/include/asm/x86-*.h. And
of course everything under include/xen/lib/x86/, but those are our own
definitions, not ones meant to solely express relevant hw spec aspects.

Jan


  parent reply	other threads:[~2023-08-18  8:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 21:43 [PATCH 0/3] xen/arm: Some clean-up found with -Wconversion and -Warith-conversion Julien Grall
2023-08-17 21:43 ` [PATCH 1/3] xen/arm: vmmio: The number of entries cannot be negative Julien Grall
2023-08-17 22:57   ` Stefano Stabellini
2023-08-18  1:49   ` Henry Wang
2023-08-17 21:43 ` [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible Julien Grall
2023-08-17 23:04   ` Stefano Stabellini
2023-08-21 16:59     ` Julien Grall
2023-08-18  1:50   ` Henry Wang
2023-08-18  7:02   ` Michal Orzel
2023-08-21 17:00     ` Julien Grall
2023-08-17 21:43 ` [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned Julien Grall
2023-08-17 23:05   ` Stefano Stabellini
2023-08-18  1:50   ` Henry Wang
2023-08-18  6:33   ` Jan Beulich
2023-08-18  7:39     ` Julien Grall
2023-08-18  8:00       ` Juergen Gross
2023-08-18  8:05         ` Julien Grall
2023-08-18  8:25           ` Juergen Gross
2023-08-18  9:15             ` Julien Grall
2023-08-18  8:14       ` Jan Beulich [this message]
2023-08-18  9:21         ` Julien Grall
2023-08-21 17:05 ` [PATCH 0/3] xen/arm: Some clean-up found with -Wconversion and -Warith-conversion Julien Grall

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=58ecfdf4-c0ce-be56-8686-d6fcf06f9609@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.