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

Re: [PATCH 3/3] xen/public: arch-arm: All PSR_* defines should be unsigned



Hi Jan,

On 18/08/2023 09:14, Jan Beulich wrote:
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.

Even if they are defined by the HW, we still need them to easily create some hypercalls field.

If we are planning to have a stable toolstack ABI (as Juergen suggested), then I would find a bit odd that onewould need to include lib/ (or provide their own header) in order to update the fields.

Anyway, I am not planning to do any re-ordering anytime soon for the public. But I would be happy to take part of the discussion if there are a general agreement to split further and someone wants to write patches.

Cheers,

--
Julien Grall



 


Rackspace

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