@@ -70,6 +70,13 @@ static void __init cf_check xue_uart_init_postirq(struct serial_port *port)
serial_async_transmit(port);
init_timer(&uart->timer, xue_uart_poll, port, 0);
set_timer(&uart->timer, NOW() + MILLISECS(1));
+
+ if ( pci_ro_device(0, (uart->xue.xhc_cf8 >> 16) & 0xff,
+ (uart->xue.xhc_cf8 >> 8) & 0xff) )
+ printk(XENLOG_INFO "Could not mark config space of %02x:%02x.%u read-only.\n",
+ (uart->xue.xhc_cf8 >> 16) & 0xff,
+ (uart->xue.xhc_cf8 >> 11) & 0x1f,
+ (uart->xue.xhc_cf8 >> 8) & 0x0f);
}
static int cf_check xue_uart_tx_ready(struct serial_port *port)
Mark config space of the device as read-only, to prevent dom0 (or others) re-configuring the USB controller while it's used as a debug console. This isn't strictly necessary, as the xhci and xhci-dbc drivers can co-exists, but that's a simpler option. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> --- xen/drivers/char/xue.c | 7 +++++++ 1 file changed, 7 insertions(+)