From: Ian Campbell Subject: [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Date: Fri, 1 Nov 2013 14:03:11 +0000 Message-ID: <1383314592-30096-2-git-send-email-ian.campbell@citrix.com> References: <1383314565.672.80.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383314565.672.80.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: bamv2005@gmail.com, julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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