xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
	"Julien Grall" <jgrall@amazon.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>, "Wei Liu" <wl@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Paul Durrant" <paul@xen.org>,
	"Jun Nakajima" <jun.nakajima@intel.com>,
	"Kevin Tian" <kevin.tian@intel.com>
Subject: Re: [RESEND][PATCH v2 5/7] xen: include xen/guest_access.h rather than asm/guest_access.h
Date: Tue, 18 Aug 2020 17:34:56 +0100	[thread overview]
Message-ID: <24005b88-ac1d-926d-ba86-67641375f610@xen.org> (raw)
In-Reply-To: <bd328401-e825-900e-5945-a5fc7cc519cd@suse.com>

Hi Jan,

On 18/08/2020 17:23, Jan Beulich wrote:
> On 18.08.2020 18:20, Julien Grall wrote:
>>
>>
>> On 18/08/2020 17:04, Jan Beulich wrote:
>>> On 18.08.2020 15:14, Julien Grall wrote:
>>>>
>>>>
>>>> On 18/08/2020 12:32, Jan Beulich wrote:
>>>>> On 18.08.2020 10:58, Julien Grall wrote:
>>>>>>> One option. Personally I'd prefer to avoid introduction of yet another
>>>>>>> constant, by leveraging __XEN_GUEST_ACCESS_H__ instead.
>>>>>>
>>>>>> I thought about it but it doesn't prevent new inclusions of asm/guest_access.h. For instance, the following would still compile:
>>>>>>
>>>>>> #include <xen/guest_access.h>
>>>>>>
>>>>>> [...]
>>>>>>
>>>>>> #include <asm/guest_access.h>
>>>>>
>>>>> But where's the problem with this? The first #include will already
>>>>> have resulted in the inclusion of asm/guest_access.h, so the second
>>>>> #include is simply a no-op.
>>>>
>>>> A couple of reasons:
>>>>      1) I don't consider this solving completely your original request [1]
>>>>      2) I don't see how this is more important to prevent including <asm/guest_access.h> before and not after. Both will still compile fine, we just want to avoid it.
>>>>
>>>>
>>>> [1] "Is there any chance you could take measures to avoid new inclusions of asm/guest_access.h to appear?"
>>>
>>> Is
>>>
>>> #include <xen/guest_access.h>
>>> [...]
>>> #include <asm/guest_access.h>
>>>
>>> actually a problem (as opposed to an asm/ include without any include
>>> of the xen/ one at all)?
>>
>> Neither of them are really a problem today. So it is not entirely clear why we would want to prevent one and not the other.
> 
> If neither is a problem, why the conversion?

As I wrote in the commit message, some of the helpers will be moved from 
asm/guest_access.h. So existing users of asm/guest_access.h may not 
compiled anymore.

If you are not using any helpers from xen/guest_access.h, then you could 
theoritically only include asm/guest_access.h. But they are quite 
limited or maybe don't even exist.

Actually xen/guest_access.h was included from asm/guest_access.h. But 
there are compilation issues if you try to include xen/guest_access.h 
from asm/guest_access.h.

Therefore it is better to request everyone to include 
<xen/guest_access.h>. With that you get all the guest access helpers 
rather than just the arch specific one.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2020-08-18 16:35 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 18:18 [RESEND][PATCH v2 0/7] xen: Consolidate asm-*/guest_access.h in xen/guest_access.h Julien Grall
2020-07-30 18:18 ` [RESEND][PATCH v2 1/7] xen/guest_access: Add emacs magics Julien Grall
2020-07-31 13:04   ` Bertrand Marquis
2020-08-14 18:36     ` Julien Grall
2020-09-22 10:05   ` Volodymyr Babchuk
2020-07-30 18:18 ` [RESEND][PATCH v2 2/7] xen/arm: kernel: Re-order the includes Julien Grall
2020-07-30 19:36   ` Stefano Stabellini
2020-07-31 12:58   ` Bertrand Marquis
2020-07-30 18:18 ` [RESEND][PATCH v2 3/7] xen/arm: decode: " Julien Grall
2020-07-30 19:37   ` Stefano Stabellini
2020-08-14 18:40     ` Julien Grall
2020-07-30 18:18 ` [RESEND][PATCH v2 4/7] xen/arm: guestcopy: " Julien Grall
2020-07-30 19:37   ` Stefano Stabellini
2020-07-31 12:53   ` Bertrand Marquis
2020-07-31 12:56     ` Bertrand Marquis
2020-08-14 18:50     ` Julien Grall
2020-07-30 18:18 ` [RESEND][PATCH v2 5/7] xen: include xen/guest_access.h rather than asm/guest_access.h Julien Grall
2020-07-30 19:37   ` Stefano Stabellini
2020-07-31 11:36   ` Jan Beulich
2020-08-14 19:07     ` Julien Grall
2020-08-18  8:50       ` Jan Beulich
2020-08-18  8:58         ` Julien Grall
2020-08-18  9:05           ` Bertrand Marquis
2020-08-18  9:23             ` Julien Grall
2020-08-18  9:29               ` Bertrand Marquis
2020-08-18 11:32           ` Jan Beulich
2020-08-18 13:14             ` Julien Grall
2020-08-18 16:04               ` Jan Beulich
2020-08-18 16:20                 ` Julien Grall
2020-08-18 16:23                   ` Jan Beulich
2020-08-18 16:34                     ` Julien Grall [this message]
2020-07-31 12:45   ` Bertrand Marquis
2020-07-31 12:45   ` Bertrand Marquis
2020-09-18 18:39   ` Julien Grall
2020-09-21 15:32   ` Paul Durrant
2020-07-30 18:18 ` [RESEND][PATCH v2 6/7] xen/guest_access: Consolidate guest access helpers in xen/guest_access.h Julien Grall
2020-07-30 19:37   ` Stefano Stabellini
2020-08-14 19:10     ` Julien Grall
2020-07-31 11:45   ` Jan Beulich
2020-08-14 19:14     ` Julien Grall
2020-07-30 18:18 ` [RESEND][PATCH v2 7/7] xen/guest_access: Fix coding style " Julien Grall
2020-07-30 19:38   ` Stefano Stabellini
2020-07-31 11:41   ` Jan Beulich
2020-08-14 19:18     ` Julien Grall
2020-08-18  8:52       ` Jan Beulich
2020-08-18  9:03         ` Julien Grall
2020-07-31 12:46   ` Bertrand Marquis

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=24005b88-ac1d-926d-ba86-67641375f610@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgrall@amazon.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@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 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).