[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 02/29] xen/arm: don't allow dom0 to access to vpl011 UART0 memory range



On Mon, 2013-04-29 at 00:01 +0100, Julien Grall wrote:
> As vpl011 UART is not initialized for dom 0, when the domain tries to access 
> to
> this range, a segfault will occur in Xen. The right behaviour should be a data
> abort for the guest.
> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

However I wonder if the provision of a vpl011 UART isn't something which
should be made platform specific.

It's really a workaround for DEBUG_LL in a kernel which is configured
for vexpress, I expect Arndale has different serial ports?

> ---
>  xen/arch/arm/vpl011.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c
> index 9472d0a..13ba623 100644
> --- a/xen/arch/arm/vpl011.c
> +++ b/xen/arch/arm/vpl011.c
> @@ -85,7 +85,9 @@ static void uart0_print_char(char c)
>  
>  static int uart0_mmio_check(struct vcpu *v, paddr_t addr)
>  {
> -    return addr >= UART0_START && addr < UART0_END;
> +    struct domain *d = v->domain;
> +
> +    return d->domain_id != 0 && addr >= UART0_START && addr < UART0_END;
>  }
>  
>  static int uart0_mmio_read(struct vcpu *v, mmio_info_t *info)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.