From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Cc: "Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
Tim Deegan <tim@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 4/7] arm: smccc: handle SMCs according to SMCCC
Date: Thu, 10 Aug 2017 11:48:51 +0100 [thread overview]
Message-ID: <3538d0cb-70dd-14ae-621c-fa746c0bfd8d@arm.com> (raw)
In-Reply-To: <598C27D3020000780016E698@prv-mh.provo.novell.com>
Hi,
On 10/08/17 08:30, Jan Beulich wrote:
>>>> On 09.08.17 at 23:39, <volodymyr_babchuk@epam.com> wrote:
>> On 09.08.17 14:58, Jan Beulich wrote:
>>>>>> On 09.08.17 at 12:10, <julien.grall@arm.com> wrote:
>>>> On 08/08/17 21:08, Volodymyr Babchuk wrote:
>>>>> +#ifndef __XEN_PUBLIC_ARCH_ARM_SMC_H__
>>>>> +#define __XEN_PUBLIC_ARCH_ARM_SMC_H__
>>>>> +
>>>>> +typedef struct {
>>>>> + uint32_t a[4];
>>>>> +} xen_arm_smccc_uid;
>>>
>>> This is not the normal way of encoding a UID type.
>> Just to be clear: you are proposing to store UID in such struct
>> struct uuid_t {
>> unsigned32 time_low;
>> unsigned16 time_mid;
>> unsigned16 time_hi_and_version;
>> unsigned8 clock_seq_hi_and_reserved;
>> unsigned8 clock_seq_low;
>> byte node[6];
>> };
>> right?
>
> Type-wise yes; the names of the fields look uncommon to me.
>
>>>>> +#define XEN_ARM_SMCCC_UID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
>>>>> + ((xen_arm_smccc_uid) {{(a), ((b) << 16 | (c) ), \
>>>
>>> This is not C89 compatible.
>> Oops, sorry. Didn't knew that XEN should be C89 compatible.
>> Is there any guide for novices? I didn't found anything useful in docs/
>> (not even coding style document). On wiki I have found only
>> "Submitting_Xen_Project_Patches" page, which is very helpful, but it
>> does not cover topics like which C standard to use.
>
> The public headers are required to the C89 compatible; Xen
> code in general is fine to use extensions.
>
>>>>> + ((d0) << 24 | (d1) << 16 | (d2) << 8 | (d3) << 0), \
>>>>> + ((d4) << 24 | (d5) << 16 | (d6) << 8 | (d7) << 0)}})
>>>>> +
>>>>> +/*
>>>>> + * Hypervisor Service version.
>>>>> + *
>>>>> + * We can't use XEN version here, because of SMCCC requirements:
>>>>> + * Major revision should change every time SMC/HVC function is removed.
>>>>> + * Minor revision should change every time SMC/HVC function is added.
>>>>> + * So, it is SMCCC protocol revision code, not XEN version.
>>>
>>> I don't understand this explanation - how is the situation here
>>> different from some arbitrary, non-toolstack-only hypercall?
>> Because this is generic interface that should be supported by all
>> hypervisors, including XEN. Think about this as a way for a guest to
>> determine under which hypervisor it operates, and which functions it
>> provides.
>
> In which case - why the XEN_ prefixes?
Because the version depends on the interface implemented which is Xen
specific.
You have to match the UID (Xen Specific) and the version to know what is
actually supported.
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-08-10 10:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 20:08 [PATCH v3 0/7] Handle SMCs and HVCs in conformance with SMCCC Volodymyr Babchuk
2017-08-08 20:08 ` [PATCH 1/7] arm: traps: psci: use generic register accessors Volodymyr Babchuk
2017-08-08 20:37 ` Andrew Cooper
2017-08-08 20:46 ` Volodymyr Babchuk
2017-08-09 9:52 ` Julien Grall
2017-08-09 11:12 ` Andrew Cooper
2017-08-09 11:43 ` Julien Grall
2017-08-08 20:08 ` [PATCH 2/7] arm: make processor-specific functions from traps.c globaly visible Volodymyr Babchuk
2017-08-09 9:53 ` Julien Grall
2017-08-09 19:26 ` Volodymyr Babchuk
2017-08-09 20:13 ` Julien Grall
2017-08-08 20:08 ` [PATCH 3/7] arm: traps: check if SMC was conditional before handling it Volodymyr Babchuk
2017-08-09 9:56 ` Julien Grall
2017-08-08 20:08 ` [PATCH 4/7] arm: smccc: handle SMCs according to SMCCC Volodymyr Babchuk
2017-08-09 10:10 ` Julien Grall
2017-08-09 11:58 ` Jan Beulich
2017-08-09 21:39 ` Volodymyr Babchuk
2017-08-10 7:30 ` Jan Beulich
2017-08-10 10:48 ` Julien Grall [this message]
2017-08-16 21:41 ` Volodymyr Babchuk
2017-08-17 7:45 ` Jan Beulich
2017-08-17 12:35 ` Volodymyr Babchuk
2017-08-17 12:52 ` Julien Grall
2017-08-17 12:56 ` Jan Beulich
2017-08-10 15:33 ` Volodymyr Babchuk
2017-08-10 16:11 ` Julien Grall
2017-08-10 17:40 ` Volodymyr Babchuk
2017-08-10 18:18 ` Julien Grall
2017-08-10 20:09 ` Volodymyr Babchuk
2017-08-10 21:09 ` Julien Grall
2017-08-11 10:47 ` Julien Grall
2017-08-11 13:08 ` Volodymyr Babchuk
2017-08-08 20:08 ` [PATCH 5/7] arm: traps: handle PSCI calls inside `smccc.c` Volodymyr Babchuk
2017-08-09 11:02 ` Julien Grall
2017-08-08 20:08 ` [PATCH 6/7] arm: psci: use definitions provided by vsmc.h Volodymyr Babchuk
2017-08-09 11:36 ` Julien Grall
2017-08-08 20:08 ` [PATCH 7/7] arm: vsmc: remove 64 bit mode check in psci handler Volodymyr Babchuk
2017-08-09 11:38 ` 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=3538d0cb-70dd-14ae-621c-fa746c0bfd8d@arm.com \
--to=julien.grall@arm.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=edgar.iglesias@xilinx.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.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).