From: Julien Grall <julien.grall@linaro.org>
To: Jan Beulich <JBeulich@suse.com>,
Volodymyr Babchuk <volodymyr_babchuk@epam.com>,
Stefano Stabellini <sstabellini@kernel.org>
Cc: "Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
Wei Liu <wei.liu2@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>,
xen-devel@lists.xen.org, Julien Grall <julien.grall@arm.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH v9 04/11] public: xen.h: add definitions for UUID handling
Date: Wed, 11 Oct 2017 10:29:55 +0100 [thread overview]
Message-ID: <e7d9be14-f601-110b-df07-f96edce2ad83@linaro.org> (raw)
In-Reply-To: <59DDF8730200007800184C18@prv-mh.provo.novell.com>
Hi Jan,
On 11/10/17 09:54, Jan Beulich wrote:
>>>> On 11.10.17 at 01:24, <sstabellini@kernel.org> wrote:
>> On Tue, 10 Oct 2017, Volodymyr Babchuk wrote:
>>> --- a/xen/include/public/xen.h
>>> +++ b/xen/include/public/xen.h
>>> @@ -930,6 +930,39 @@ __DEFINE_XEN_GUEST_HANDLE(uint16, uint16_t);
>>> __DEFINE_XEN_GUEST_HANDLE(uint32, uint32_t);
>>> __DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
>>>
>>> +typedef struct {
>>> + uint8_t a[16];
>>> +} xen_uuid_t;
>>> +
>>> +/*
>>> + * XEN_DEFINE_UUID(0x00112233, 0x4455, 0x6677, 0x8899,
>>> + * 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff)
>>> + * will construct UUID 00112233-4455-6677-8899-aabbccddeeff presented as
>>> + * {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88,
>>> + * 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
>>> + *
>>> + * NB: This is compatible with Linux kernel and with libuuid, but it is not
>>> + * compatible with Microsoft, as they use mixed-endian encoding (some
>>> + * components are little-endian, some are big-endian).
>>> + */
>>> +#define XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6) \
>>> + {{((a) >> 24) & 0xFF, ((a) >> 16) & 0xFF, \
>>> + ((a) >> 8) & 0xFF, ((a) >> 0) & 0xFF, \
>>> + ((b) >> 8) & 0xFF, ((b) >> 0) & 0xFF, \
>>> + ((c) >> 8) & 0xFF, ((c) >> 0) & 0xFF, \
>>> + ((d) >> 8) & 0xFF, ((d) >> 0) & 0xFF, \
>>> + e1, e2, e3, e4, e5, e6}}
>>> +
>>> +/* Compound literals are supported in C99 and later. */
>>> +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
>>> +#define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \
>>> + ((xen_uuid_t)XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6))
>>> +#else
>>> +#define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \
>>> + XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6)
>>> +
>>> +#endif /* defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
>>> +
>>> #endif /* !__ASSEMBLY__ */
>>>
>>> /* Default definitions for macros used by domctl/sysctl. */
>>
>> This looks good to me, but I would like to get Jan's opinion on this.
>> Ideally we would commit the series tomorrow before the code freeze.
>
> While I can live with it being the way it is now, I've already
> indicated that I'd prefer __GNUC__ to also be checked for
> here. As that's a relaxation, it wouldn't be a problem to add
> later, I think (but I can't exclude I'm overlooking something,
> so it would feel better if it was done the intended final way
> from the beginning).
To be clear, you ask to do:
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && __STDC_VERSION__
>= 199901L)
am I correct?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-10-11 9:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 15:52 [PATCH v8 00/11] Handle SMCs and HVCs in conformance with SMCCC Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 01/11] arm: traps: use only least 32 bits of fid in PSCI handler Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 02/11] arm: traps: use generic register accessors in the PSCI code Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 03/11] arm: traps: check if SMC was conditional before handling it Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 04/11] public: xen.h: add definitions for UUID handling Volodymyr Babchuk
2017-10-10 16:12 ` Jan Beulich
2017-10-10 17:03 ` Volodymyr Babchuk
2017-10-11 8:07 ` Jan Beulich
2017-10-11 12:12 ` Volodymyr Babchuk
2017-10-11 12:23 ` Jan Beulich
2017-10-10 19:05 ` [PATCH v9 " Volodymyr Babchuk
2017-10-10 23:24 ` Stefano Stabellini
2017-10-11 8:54 ` Jan Beulich
2017-10-11 9:29 ` Julien Grall [this message]
2017-10-11 9:37 ` Jan Beulich
2017-10-11 11:57 ` [PATCH v10 " Volodymyr Babchuk
2017-10-11 12:31 ` Jan Beulich
2017-10-11 15:37 ` Konrad Rzeszutek Wilk
2017-10-10 15:52 ` [PATCH v8 05/11] arm: processor.h: add definition for immediate value mask Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 06/11] arm: add SMCCC protocol definitions Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 07/11] arm: smccc: handle SMCs according to SMCCC Volodymyr Babchuk
2017-10-11 20:38 ` Stefano Stabellini
2017-10-10 15:52 ` [PATCH v8 08/11] arm: traps: handle PSCI calls inside `vsmc.c` Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 09/11] arm: PSCI: use definitions provided by asm/smccc.h Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 10/11] arm: vsmc: remove 64 bit mode check in PSCI handler Volodymyr Babchuk
2017-10-10 15:52 ` [PATCH v8 11/11] public: add and enable XENFEAT_ARM_SMCCC_supported feature Volodymyr Babchuk
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=e7d9be14-f601-110b-df07-f96edce2ad83@linaro.org \
--to=julien.grall@linaro.org \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=edgar.iglesias@xilinx.com \
--cc=ian.jackson@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=volodymyr_babchuk@epam.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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).