From: Julien Grall <julien.grall@arm.com>
To: Juergen Gross <jgross@suse.com>, Ian Jackson <ian.jackson@eu.citrix.com>
Cc: julien.grall@amd.com, sstabellini@kernel.org,
wei.liu2@citrix.com, George.Dunlap@eu.citrix.com,
andrew.cooper3@citrix.com, tim@xen.org, jbeulich@suse.com,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/3] docs: specify endianess of xenstore protocol header
Date: Mon, 8 May 2017 11:59:58 +0100 [thread overview]
Message-ID: <a800c721-6c2a-ba44-7cf9-ecc398b58c4b@arm.com> (raw)
In-Reply-To: <2a155db6-0e3f-a66b-1b6a-14067e95f2af@suse.com>
Hi Juergen,
On 08/05/17 11:17, Juergen Gross wrote:
> On 08/05/17 12:07, Ian Jackson wrote:
>> Juergen Gross writes ("[PATCH 1/3] docs: specify endianess of xenstore protocol header"):
>>> The endianess of the xenstore protocol header should be specified.
>> ...
>>> -followed by xsd_sockmsg.len bytes of payload.
>>> +followed by xsd_sockmsg.len bytes of payload. The header fields are
>>> +all in little endian byte order.
>>
>> Yes, but this is not correct. On a big-endian cpu, they would be in
>> big-endian.
>
> We don't support big-endian cpus, right? Do we want to specify the
> protocol for unsupported cpus?
>
>> On a bytesexual cpu, the endianness should be specified but it will be
>> the same endianness as shared ring fields, etc. So this doc probably
>> ought not to contain a list of endiannesses. Best just to say that
>> the fields are all in host native byte order.
>
> Hmm, this is problematic. How does a guest started e.g. big-endian on a
> cpu capable of both byte orders know which endianess the host has? I
> think specifying one endianess in this case is the better approach.
>
> BTW: I'm quite sure we don't support big-endian guests (or host) on ARM
> either, do we?
At the moment, Xen is always little endian and all the structure between
Xen and the guests are little-endian.
We don't yet support big-end guests but there are nothing to prevent
that. The only change I am aware of is in the MMIO emulation (see [1]).
All the Xen hypercall argument will stay little-endian and the guest
would have to take care of passing the arguments with the correct
endianness.
>
> I could reword the paragraph to:
>
> "The header fields are in the default endianess of the processor, e.g.
> little endian on x86 and ARM."
Whilst instruction fetches are always little-endian, the memory
endianness of data access does not have a particular default in the ARM
ARM. This is left up to the implementor.
Cheers,
[1]
https://xenbits.xen.org/gitweb/?p=people/julieng/xen-unstable.git;a=commit;h=e49cecef96d57622e9dcbc6199be1f018d405fc0
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-05-08 11:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 6:58 [PATCH 0/3] docs: add some missing xenstore documentation Juergen Gross
2017-05-08 6:58 ` [PATCH 1/3] docs: specify endianess of xenstore protocol header Juergen Gross
2017-05-08 10:07 ` Ian Jackson
2017-05-08 10:15 ` Ian Jackson
2017-05-08 10:17 ` Juergen Gross
2017-05-08 10:24 ` Ian Jackson
2017-05-08 10:41 ` Juergen Gross
2017-05-08 10:59 ` Julien Grall [this message]
2017-05-08 18:23 ` Stefano Stabellini
2017-05-08 6:58 ` [PATCH 2/3] docs: add DIRECTORY_PART specification do xenstore protocol doc Juergen Gross
2017-05-08 6:58 ` [PATCH 3/3] docs: document CONTROL command of xenstore protocol Juergen Gross
2017-05-08 7:00 [PATCH 0/3] docs: add some missing xenstore documentation Juergen Gross
2017-05-08 7:00 ` [PATCH 1/3] docs: specify endianess of xenstore protocol header Juergen Gross
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=a800c721-6c2a-ba44-7cf9-ecc398b58c4b@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien.grall@amd.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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.