xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: bamv2005@gmail.com, julien.grall@linaro.org, tim@xen.org,
	Ian Campbell <ian.campbell@citrix.com>,
	stefano.stabellini@eu.citrix.com
Subject: [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs
Date: Fri, 1 Nov 2013 14:03:11 +0000	[thread overview]
Message-ID: <1383314592-30096-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1383314565.672.80.camel@kazak.uk.xensource.com>

These are in the same page as the UART which is used as the Xen console. We are
not currently smart enough to avoid passing them through to the guest,
accidentally giving the guest access to the Xen console UART.

we blacklist them all, if necessary in the future we can split the list into
two halves and make a per platform decision about which half should be
blacklisted on a given platform depending on which UART is wired up as the
console.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Blacklist all UARTs for the time being.
---
 xen/arch/arm/platforms/sunxi.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c
index ab3b4a6..b466518 100644
--- a/xen/arch/arm/platforms/sunxi.c
+++ b/xen/arch/arm/platforms/sunxi.c
@@ -24,8 +24,19 @@ static const char * const sunxi_dt_compat[] __initconst =
     NULL
 };
 
+static const struct dt_device_match sunxi_blacklist_dev[] __initconst =
+{
+    /*
+     * The UARTs share a page which runs the risk of mapping the Xen console
+     * UART to dom0, so don't map any of them.
+     */
+    DT_MATCH_COMPATIBLE("snps,dw-apb-uart"),
+    { /* sentinel */ },
+};
+
 PLATFORM_START(sunxi, "Allwinner A20")
     .compatible = sunxi_dt_compat,
+    .blacklist_dev = sunxi_blacklist_dev,
 PLATFORM_END
 
 /*
-- 
1.7.10.4

  parent reply	other threads:[~2013-11-01 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
2013-11-01 16:36   ` Julien Grall
2013-11-01 14:03 ` Ian Campbell [this message]
2013-11-01 16:37   ` [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Julien Grall
2013-11-01 14:03 ` [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst Ian Campbell
2013-11-01 16:38   ` Julien Grall
2013-11-05 13:56 ` [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell

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=1383314592-30096-2-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=bamv2005@gmail.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).