All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: ian.campbell@citrix.com, tim@xen.org,
	Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH for Xen 4.5] xen/arm: Add support for GICv3 for domU
Date: Sat, 01 Nov 2014 18:56:33 +0000	[thread overview]
Message-ID: <54552CE1.4070205@linaro.org> (raw)
In-Reply-To: <5453B5060200007800043F9B@mail.emea.novell.com>

Hi Jan,

On 31/10/2014 15:12, Jan Beulich wrote:
>>>> On 31.10.14 at 14:53, <julien.grall@linaro.org> wrote:
>> On 10/31/2014 01:37 PM, Jan Beulich wrote:
>>>>>> On 31.10.14 at 12:23, <julien.grall@linaro.org> wrote:
>>>> On 31/10/2014 09:02, Jan Beulich wrote:
>>>>>> --- a/xen/include/public/domctl.h
>>>>>> +++ b/xen/include/public/domctl.h
>>>>>> @@ -68,6 +68,19 @@ struct xen_domctl_createdomain {
>>>>>>    typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
>>>>>>    DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t);
>>>>>>
>>>>>> +#if defined(__arm__) || defined(__aarch64__)
>>>>>> +#define XEN_DOMCTL_CONFIG_GIC_DEFAULT   0
>>>>>> +#define XEN_DOMCTL_CONFIG_GIC_V2        1
>>>>>> +#define XEN_DOMCTL_CONFIG_GIC_V3        2
>>>>>> +/* XEN_DOMCTL_configure_domain */
>>>>>> +struct xen_domctl_configuredomain {
>>>>>
>>>>> The naming suggests that the #if really should be around just the
>>>>> gic_version field (with a dummy field in the #else case to be C89
>>>>> compatible, e.g. a zero width unnamed bitfield) and the
>>>>> corresponding #define-s above, ...
>>>>
>>>> It's a bit like xen_domctl_setvcpuextstate which is defined only for x86
>>>> while the name seem pretty common.
>>>
>>> That's a particularly bad example to compare with, as this is about
>>> CPU registers having got added after the ABI was defined. This
>>> (hopefully) shouldn't have many similar cases on other architectures.
>>> Plus, doing things in an odd way just because there's an odd
>>> precedent is always suspicious to me.
>>>
>>>> I think we have to stay consistent in this header and not defining
>>>> DOMCTL which is not used for a specific architecture.
>>>
>>> Yes, I always advocate for consistency - provided what is there is
>>> a reasonable reference and was done properly.
>>
>> Would renaming the structure name with "xen_arm_domctl_configuredomain"
>> would be sufficient for you?
>
> Maybe (better xen_domctl_arm_configure_domain then), if you are
> reasonably certain this can't become useful for another arch.

IIRC, DOMCTL can be modify whenever we want.

I doubt that x86 will use it, so if we plan to add a new architecture 
which require this DOMCTL then we could rename the structure at that time.

-- 
Julien Grall

  reply	other threads:[~2014-11-01 18:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 18:51 [PATCH for Xen 4.5] xen/arm: Add support for GICv3 for domU Julien Grall
2014-10-31  9:02 ` Jan Beulich
2014-10-31 11:23   ` Julien Grall
2014-10-31 13:37     ` Jan Beulich
2014-10-31 13:53       ` Julien Grall
2014-10-31 15:12         ` Jan Beulich
2014-11-01 18:56           ` Julien Grall [this message]
2014-11-18 15:00   ` Julien Grall
2014-11-18 15:10     ` Ian Jackson
2014-11-18 15:26       ` Julien Grall
2014-11-18 15:35         ` Ian Jackson
2014-11-18 15:49           ` Empty struct in public headers Was: " Julien Grall
2014-11-18 16:21             ` Ian Campbell
2014-11-18 16:29               ` Julien Grall
2014-11-18 16:31                 ` Ian Campbell
2014-11-18 16:15     ` Jan Beulich
2014-11-18 16:19       ` Julien Grall
2014-11-18 16:43         ` Jan Beulich
2014-10-31 17:45 ` Stefano Stabellini
2014-10-31 18:15   ` Julien Grall
2014-10-31 18:24     ` Stefano Stabellini

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=54552CE1.4070205@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=JBeulich@suse.com \
    --cc=Vijaya.Kumar@caviumnetworks.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.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.