All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>,
	Xiantao Zhang <xiantao.zhang@intel.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 2/7] xen/iommu: Move dom0 setup code to __hwdom_init
Date: Wed, 19 Mar 2014 10:06:20 -0400	[thread overview]
Message-ID: <5329A45C.9000700@tycho.nsa.gov> (raw)
In-Reply-To: <53296B4702000078001258EC@nat28.tlf.novell.com>

On 03/19/2014 05:02 AM, Jan Beulich wrote:
>>>> On 18.03.14 at 22:34, Daniel De Graaf <dgdegra@tycho.nsa.gov> wrote:
>> --- a/xen/Rules.mk
>> +++ b/xen/Rules.mk
>> @@ -41,6 +41,10 @@ ALL_OBJS-y               += $(BASEDIR)/xsm/built_in.o
>>   ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
>>   ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
>>
>> +ifeq ($(x86),y)
>> +LATE_HWDOM_ENABLE ?= $(XSM_ENABLE)
>> +endif
>> +
>>   CFLAGS += -fno-builtin -fno-common
>>   CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
>>   CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
>> @@ -49,6 +53,7 @@ CFLAGS += -nostdinc
>>   CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
>>   CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
>>   CFLAGS-$(FLASK_ENABLE)  += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
>> +CFLAGS-$(LATE_HWDOM_ENABLE) += -DLATE_HWDOM_ENABLE
>
> You don't really need the make level definition, and it would seem
> better to me to set CONFIG_LATE_HWDOM in asm/config.h instead
> (we should really try to avoid adding further -D options here, and
> instead see to remove some of what's there already - only options
> needed at the make level _and_ at the source level are imo valid
> candidates to go here).

OK. I think I can clean up some of the other XSM defines in that case,
especially as it is no longer reasonable to enable XSM without FLASK.
That change will be independent of this patch series, however.

>> --- a/xen/drivers/passthrough/iommu.c
>> +++ b/xen/drivers/passthrough/iommu.c
>> @@ -45,7 +45,7 @@ custom_param("iommu", parse_iommu_param);
>>   bool_t __initdata iommu_enable = 1;
>>   bool_t __read_mostly iommu_enabled;
>>   bool_t __read_mostly force_iommu;
>> -bool_t __initdata iommu_dom0_strict;
>> +bool_t __read_mostly iommu_dom0_strict;
>
> Wouldn't this rather be __hwdom_initdata now?

I was trying to avoid making a __hwdom_initdata_or_read_mostly symbol to
just save two bytes of theoretical memory (with zero actual savings due
to alignment).  I can do that if it's preferred.

>
>> --- a/xen/drivers/passthrough/vtd/x86/vtd.c
>> +++ b/xen/drivers/passthrough/vtd/x86/vtd.c
>> @@ -36,7 +36,7 @@
>>    * iommu_inclusive_mapping: when set, all memory below 4GB is included in dom0
>>    * 1:1 iommu mappings except xen and unusable regions.
>>    */
>> -static bool_t __initdata iommu_inclusive_mapping = 1;
>> +static bool_t __read_mostly iommu_inclusive_mapping = 1;
>
> Same here?
>
> Jan
>
>
>


-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2014-03-19 14:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 21:34 [PATCH v2 0/7] xen: Hardware domain support Daniel De Graaf
2014-03-18 21:34 ` [PATCH 1/7] xen: use domid check in is_hardware_domain Daniel De Graaf
2014-03-19  9:03   ` Jan Beulich
2014-03-18 21:34 ` [PATCH 2/7] xen/iommu: Move dom0 setup code to __hwdom_init Daniel De Graaf
2014-03-19  9:02   ` Jan Beulich
2014-03-19 14:06     ` Daniel De Graaf [this message]
2014-03-19 14:14       ` Jan Beulich
2014-03-18 21:34 ` [PATCH 3/7] xen: prevent 0 from being used as a dynamic domid Daniel De Graaf
2014-03-18 21:34 ` [PATCH 4/7] xen: rename dom0 to hardware_domain Daniel De Graaf
2014-03-19  9:09   ` Jan Beulich
2014-03-18 21:34 ` [PATCH 5/7] xen: rename various functions referencing dom0 Daniel De Graaf
2014-03-19  9:13   ` Jan Beulich
2014-03-19 15:25     ` Daniel De Graaf
2014-03-19 15:32       ` Jan Beulich
2014-03-18 21:34 ` [PATCH 6/7] xen: Allow hardare domain != dom0 Daniel De Graaf
2014-03-19  9:15   ` Jan Beulich
2014-03-18 21:34 ` [PATCH 7/7] tools/libxl: Allow dom0 to be destroyed Daniel De Graaf
2014-03-19 11:02   ` Ian Campbell
2014-03-19 15:12     ` Daniel De Graaf
  -- strict thread matches above, loose matches on Subject: below --
2014-03-27 11:52 [PATCH v3 0/7] xen: Hardware domain support Daniel De Graaf
2014-03-27 11:52 ` [PATCH 2/7] xen/iommu: Move dom0 setup code to __hwdom_init Daniel De Graaf

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=5329A45C.9000700@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xiantao.zhang@intel.com \
    /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.