From: Jan Beulich <jbeulich@suse.com>
To: Connor Davis <connojdavis@gmail.com>
Cc: Bobby Eshleman <bobbyeshleman@gmail.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-next 2/6] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH
Date: Fri, 26 Feb 2021 08:41:25 +0100 [thread overview]
Message-ID: <34bb915a-be60-1cc7-c802-e0491b6741df@suse.com> (raw)
In-Reply-To: <20210226025402.ryuxpicaqujmfxbu@thewall>
On 26.02.2021 03:54, Connor Davis wrote:
> On Thu, Feb 25, 2021 at 04:45:15PM +0100, Jan Beulich wrote:
>> On 25.02.2021 16:24, Connor Davis wrote:
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -501,7 +501,9 @@ static int sanitise_domain_config(struct xen_domctl_createdomain *config)
>>> return -EINVAL;
>>> }
>>>
>>> +#ifdef CONFIG_HAS_PASSTHROUGH
>>> if ( !iommu_enabled )
>>> +#endif
>>> {
>>> dprintk(XENLOG_INFO, "IOMMU requested but not available\n");
>>> return -EINVAL;
>>
>> Where possible - to avoid such #ifdef-ary - the symbol instead should
>> get #define-d to a sensible value ("false" in this case) in the header.
>> The other cases here may indeed need to remain as you have them.
>>
> Do you prefer the #define in the same function near the if or
> somwhere near the top of the file?
Neither, if I understand you correctly. It should be in the same header
where the extern declaration lives, for the whole code base to consume.
Jan
next prev parent reply other threads:[~2021-02-26 7:41 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 15:23 [PATCH for-next 0/6] Minimal build for RISCV Connor Davis
2021-02-25 15:24 ` [PATCH for-next 1/6] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
2021-02-25 15:24 ` [PATCH for-next 2/6] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
2021-02-25 15:45 ` Jan Beulich
2021-02-26 2:54 ` Connor Davis
2021-02-26 7:41 ` Jan Beulich [this message]
2021-02-25 15:24 ` [PATCH for-next 3/6] xen/sched: Fix build when NR_CPUS == 1 Connor Davis
2021-02-25 15:50 ` Jan Beulich
2021-02-26 3:08 ` Connor Davis
2021-02-26 8:31 ` Jan Beulich
2021-02-26 16:49 ` Dario Faggioli
2021-02-27 4:17 ` Connor Davis
2021-02-25 22:55 ` Bob Eshleman
2021-02-26 3:01 ` Connor Davis
2021-02-26 15:21 ` Bob Eshleman
2021-02-25 15:24 ` [PATCH for-next 4/6] xen: Fix build when !CONFIG_GRANT_TABLE Connor Davis
2021-02-25 15:53 ` Jan Beulich
2021-02-26 3:36 ` Connor Davis
2021-02-25 15:24 ` [PATCH for-next 5/6] xen: Add files needed for minimal riscv build Connor Davis
2021-02-25 23:14 ` Andrew Cooper
2021-02-26 1:06 ` Stefano Stabellini
2021-02-27 4:05 ` Connor Davis
2021-02-26 3:29 ` Connor Davis
2021-02-26 15:30 ` Bob Eshleman
2021-02-26 15:55 ` Andrew Cooper
2021-02-26 16:21 ` Bob Eshleman
2021-02-26 16:56 ` Andrew Cooper
2021-03-12 17:01 ` Jan Beulich
2021-03-12 17:09 ` Jan Beulich
2021-05-14 3:25 ` Connor Davis
2021-02-25 15:24 ` [PATCH for-next 6/6] automation: add container for riscv64 builds Connor Davis
2021-02-26 0:31 ` Stefano Stabellini
2021-02-26 6:15 ` Connor Davis
2021-02-26 15:54 ` [PATCH for-next 0/6] Minimal build for RISCV Bob Eshleman
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=34bb915a-be60-1cc7-c802-e0491b6741df@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=bobbyeshleman@gmail.com \
--cc=connojdavis@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=iwj@xenproject.org \
--cc=julien@xen.org \
--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).