Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Julien Grall
Hi Bhupinder, On 01/06/17 14:34, Bhupinder Thakur wrote: On 26 May 2017 at 19:12, Bhupinder Thakur wrote: + +switch ( vpl011_reg ) +{ +case DR: As mentioned above, you could do: { uint8_t ch; } +vpl011_read_data(v->domain, &ch); +*r = ch; Ple

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Bhupinder Thakur
Hi Julien, On 26 May 2017 at 19:12, Bhupinder Thakur wrote: >>> + >>> +switch ( vpl011_reg ) >>> +{ >>> +case DR: >> >> >> As mentioned above, you could do: >> >> { >> uint8_t ch; >> >> } >> >>> +vpl011_read_data(v->domain, &ch); >>> +*r = ch; >> >> >> P

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Julien Grall
On 01/06/17 11:33, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, On 22 May 2017 at 19:54, Julien Grall wrote: +static const struct mmio_handler_ops vpl011_mmio_handler = { +.read = vpl011_mmio_read, +.write = vpl011_mmio_write, +}; + +int vpl011_map_guest_page(struct domain *d,

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-06-01 Thread Bhupinder Thakur
Hi Julien, On 22 May 2017 at 19:54, Julien Grall wrote: >> +static const struct mmio_handler_ops vpl011_mmio_handler = { >> +.read = vpl011_mmio_read, >> +.write = vpl011_mmio_write, >> +}; >> + >> +int vpl011_map_guest_page(struct domain *d, xen_pfn_t gfn) > > > This function should eith

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-29 Thread Julien Grall
On 05/29/2017 08:13 AM, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, On 26 May 2017 at 19:12, Bhupinder Thakur wrote: +#ifndef _VPL011_H_ + +#define _VPL011_H_ + +#include +#include + +DEFINE_XEN_FLEX_RING(vpl011); I am sure someone already said it in a previous version. The vpl0

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-29 Thread Bhupinder Thakur
Hi Julien, On 26 May 2017 at 19:12, Bhupinder Thakur wrote: >>> +#ifndef _VPL011_H_ >>> + >>> +#define _VPL011_H_ >>> + >>> +#include >>> +#include >>> + >>> +DEFINE_XEN_FLEX_RING(vpl011); >> >> >> I am sure someone already said it in a previous version. The vpl011 is the >> console ring. So wh

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-26 Thread Bhupinder Thakur
Hi Julien, Thanks for your comments. > > >> +static bool vpl011_reg32_check_access(int size) > > > Please pass hsr_dabt in parameter rather than the size directly. Which BTW > should have really be unsigned int. > ok. >> +{ >> +return (size == DABT_DOUBLE_WORD)? false : true; > > > This coul

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-22 Thread Julien Grall
Hi Bhupinder, On 10/05/17 15:24, Bhupinder Thakur wrote: Add emulation code to emulate read/write access to pl011 registers and pl011 interrupts: - Emulate DR read/write by reading and writing from/to the IN and OUT ring buffers and raising an event to the backend when there is

Re: [Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-16 Thread Stefano Stabellini
On Wed, 10 May 2017, Bhupinder Thakur wrote: > Add emulation code to emulate read/write access to pl011 registers > and pl011 interrupts: > > - Emulate DR read/write by reading and writing from/to the IN > and OUT ring buffers and raising an event to the backend when > there is dat

[Xen-devel] [PATCH 03/12 v3] xen/arm: vpl011: Add pl011 uart emulation in Xen

2017-05-10 Thread Bhupinder Thakur
Add emulation code to emulate read/write access to pl011 registers and pl011 interrupts: - Emulate DR read/write by reading and writing from/to the IN and OUT ring buffers and raising an event to the backend when there is data in the OUT ring buffer and injecting an interrupt