From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: julien.grall@linaro.org, tim@xen.org,
stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: Enable 1:1 workaround by default
Date: Wed, 27 Nov 2013 12:20:59 +0000 [thread overview]
Message-ID: <5295E3AB.8090309@citrix.com> (raw)
In-Reply-To: <1385554746-21990-1-git-send-email-ian.campbell@citrix.com>
On 27/11/13 12:19, Ian Campbell wrote:
> I was just about to send out patches adding the 1:1 workaround to vexpress (the
> foundation model is a vexpress platfrom with DMA) and sunxi.
>
> That would have meant that all platforms now implement the quirk. Instead lets
> just make it the default and remove the quirk.
>
> In the future this will likely be set based on the presence absence of an
> IOMMU, perhaps with additional overrides by the platform.
>
> A command line option no-dom0_11_mapping is provided.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Can you patch docs/misc/xen-command-line.markdown as well please
~Andrew
> ---
> xen/arch/arm/domain_build.c | 5 ++++-
> xen/arch/arm/platforms/exynos5.c | 6 ------
> xen/arch/arm/platforms/midway.c | 6 ------
> xen/arch/arm/platforms/omap5.c | 6 ------
> xen/include/asm-arm/platform.h | 6 ------
> 5 files changed, 4 insertions(+), 25 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index e9bb01f..ed22613 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -22,6 +22,9 @@
> static unsigned int __initdata opt_dom0_max_vcpus;
> integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
>
> +static int opt_dom0_11_mapping = 1;
> +boolean_param("dom0_11_mapping", opt_dom0_11_mapping);
> +
> #define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
> static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
>
> @@ -110,7 +113,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
> u32 reg_len, reg_size;
> unsigned int bank = 0;
>
> - if ( platform_has_quirk(PLATFORM_QUIRK_DOM0_MAPPING_11) )
> + if ( opt_dom0_11_mapping )
> return allocate_memory_11(d, kinfo);
>
> while ( (memory = dt_find_node_by_type(memory, "memory")) )
> diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
> index 0e76cac..fa6b465 100644
> --- a/xen/arch/arm/platforms/exynos5.c
> +++ b/xen/arch/arm/platforms/exynos5.c
> @@ -111,11 +111,6 @@ static void exynos5_reset(void)
> iounmap(pmu);
> }
>
> -static uint32_t exynos5_quirks(void)
> -{
> - return PLATFORM_QUIRK_DOM0_MAPPING_11;
> -}
> -
> static const char * const exynos5_dt_compat[] __initconst =
> {
> "samsung,exynos5250",
> @@ -139,7 +134,6 @@ PLATFORM_START(exynos5, "SAMSUNG EXYNOS5")
> .smp_init = exynos5_smp_init,
> .cpu_up = exynos5_cpu_up,
> .reset = exynos5_reset,
> - .quirks = exynos5_quirks,
> .blacklist_dev = exynos5_blacklist_dev,
> PLATFORM_END
>
> diff --git a/xen/arch/arm/platforms/midway.c b/xen/arch/arm/platforms/midway.c
> index 399056b..b221279 100644
> --- a/xen/arch/arm/platforms/midway.c
> +++ b/xen/arch/arm/platforms/midway.c
> @@ -42,11 +42,6 @@ static void midway_reset(void)
> iounmap(pmu);
> }
>
> -static uint32_t midway_quirks(void)
> -{
> - return PLATFORM_QUIRK_DOM0_MAPPING_11;
> -}
> -
> static const char * const midway_dt_compat[] __initconst =
> {
> "calxeda,ecx-2000",
> @@ -56,7 +51,6 @@ static const char * const midway_dt_compat[] __initconst =
> PLATFORM_START(midway, "CALXEDA MIDWAY")
> .compatible = midway_dt_compat,
> .reset = midway_reset,
> - .quirks = midway_quirks,
> PLATFORM_END
>
> /*
> diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c
> index 54fa5ff..3a3b16b 100644
> --- a/xen/arch/arm/platforms/omap5.c
> +++ b/xen/arch/arm/platforms/omap5.c
> @@ -153,11 +153,6 @@ static int __init omap5_cpu_up(int cpu)
> return 0;
> }
>
> -static uint32_t omap5_quirks(void)
> -{
> - return PLATFORM_QUIRK_DOM0_MAPPING_11;
> -}
> -
> static const char const *omap5_dt_compat[] __initconst =
> {
> "ti,omap5",
> @@ -170,7 +165,6 @@ PLATFORM_START(omap5, "TI OMAP5")
> .specific_mapping = omap5_specific_mapping,
> .smp_init = omap5_smp_init,
> .cpu_up = omap5_cpu_up,
> - .quirks = omap5_quirks,
> PLATFORM_END
>
> /*
> diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
> index c282b30..6d108e7 100644
> --- a/xen/include/asm-arm/platform.h
> +++ b/xen/include/asm-arm/platform.h
> @@ -39,12 +39,6 @@ struct platform_desc {
> const struct dt_device_match *blacklist_dev;
> };
>
> -/*
> - * Quirk to map dom0 memory in 1:1
> - * Useful on platform where System MMU is not yet implemented
> - */
> -#define PLATFORM_QUIRK_DOM0_MAPPING_11 (1 << 0)
> -
> void __init platform_init(void);
> int __init platform_init_time(void);
> int __init platform_specific_mapping(struct domain *d);
next prev parent reply other threads:[~2013-11-27 12:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 12:19 [PATCH] xen: arm: Enable 1:1 workaround by default Ian Campbell
2013-11-27 12:20 ` Andrew Cooper [this message]
2013-11-27 12:23 ` Ian Campbell
2013-11-27 12:24 ` Andrew Cooper
2013-11-29 12:50 ` Stefano Stabellini
2013-11-27 13:23 ` Julien Grall
2013-11-27 13:26 ` Ian Campbell
2013-11-27 13:43 ` 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=5295E3AB.8090309@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--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).