From: Ian Campbell Date: Fri, 1 Nov 2013 14:03:11 +0000 (+0000) Subject: xen/arm: Blacklist sun7i UARTs X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6070 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=601ac1e216def3167fc208db1c80ddca6928e2c5;p=xen.git xen/arm: Blacklist sun7i UARTs 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 Acked-by: Julien Grall --- diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c index ab3b4a64fa..b466518757 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 /*