From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH 7/7] xen/arm: Blacklist some sun7i UARTs Date: Fri, 20 Sep 2013 17:18:38 +0100 Message-ID: <1379693918-24067-7-git-send-email-ian.campbell@citrix.com> References: <1379693872.8994.37.camel@hastur.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379693872.8994.37.camel@hastur.hellion.org.uk> 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: 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. Signed-off-by: Ian Campbell --- v3: Use blacklist dev hook --- xen/arch/arm/platforms/sunxi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c index ee0f39b..3a0ed68 100644 --- a/xen/arch/arm/platforms/sunxi.c +++ b/xen/arch/arm/platforms/sunxi.c @@ -28,8 +28,22 @@ static const char const *sunxi_dt_compat[] __initdata = NULL }; +static const struct dt_device_match sunxi_blacklist_dev[] __initconst = +{ + /* + * These UARTs share a page with the Xen console UART, so we don't + * want to map them through. + */ + DT_MATCH_PATH("/soc@01c00000/serial@01c28000"), + DT_MATCH_PATH("/soc@01c00000/serial@01c28400"), + DT_MATCH_PATH("/soc@01c00000/serial@01c28800"), + DT_MATCH_PATH("/soc@01c00000/serial@01c28c00"), + { /* sentinel */ }, +}; + PLATFORM_START(sunxi, "Allwinner A20") .compatible = sunxi_dt_compat, + .blacklist_dev = sunxi_blacklist_dev, PLATFORM_END /* -- 1.7.10.4