Hi Stefano,
On 12 April 2017 at 03:37, Stefano Stabellini wrote:
> On Tue, 11 Apr 2017, Bhupinder Thakur wrote:
>> Hi,
>>
>> Kindly let me know if my understanding is correct.
>>
>> Using a domctl API will allow us to keep the vUART configuration
>> fle
Hi Stefano,
Thanks for your comments.
On 19 April 2017 at 05:45, Stefano Stabellini wrote:
>> +static void vpl011_read_data(struct domain *d, uint8_t *data)
>> +{
>> +unsigned long flags;
>> +struct vpl011_s *vpl011=&d->arch.vpl011;
>
> The code style is:
>
> vpl011 = &d->arch.vpl011
Hi Stefano,
On 19 April 2017 at 05:52, Stefano Stabellini wrote:
>> long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
>> {
>> @@ -61,9 +137,45 @@ long do_hvm_op(unsigned long op,
>> XEN_GUEST_HANDLE_PARAM(void) arg)
>> if ( op == HVMOP_set_param )
>> {
>>
Hi,
On 19 April 2017 at 05:59, Stefano Stabellini wrote:
> I think "console" is confusing an emulated device with xenconsole.
>
> I would use vuart=pl011 to clarify that we are specifying a new
> component for emulation.
Throughout the code, I am using "vconsole" or "vcon" as a prefix for
most o
Hi,
On 19 April 2017 at 16:31, Julien Grall wrote:
> There were some concerns on the first version about using HVM params because
> this is tying the virtual UART to HVM and only allow us to have one virtual
> console.
>
> HVM params are part of the stable ABI, so this would restrict ourselves to
Hi Wei Liu,
Thanks for your comments.
On 12 April 2017 at 22:03, Wei Liu wrote:
> On Mon, Apr 03, 2017 at 03:14:31PM +0530, Bhupinder Thakur wrote:
>> Xenconsole supports only PV console currently. To get access to emulated
>> pl011
>> uart another backend console is requi
On 20 April 2017 at 00:10, Stefano Stabellini wrote:
> We don't have a formal protocol spec for PV console, but if we had, it
> would say that the frontend (Xen in this case) should send notifications
> every time there is new data to write. Thus, once per character in this
> case.
>
> I would sta
Hi Wei,
>> }
>> @@ -3159,6 +3162,13 @@ int libxl__device_console_add(libxl__gc *gc, uint32_t
>> domid,
>> flexarray_append(ro_front, GCSPRINTF("%"PRIu32,
>> state->console_port));
>> flexarray_append(ro_front, "ring-ref");
>> flexarray_append(ro_front, GCSPRINTF(
Hi Stefano,
>> > Regarding the optimization you introduced in this patch, delaying write
>> > notifications until we receive a notification from xenconsoled, how many
>> > notifications from xen to xenconsoled does it actually save? xenconsoled
>> > is going to send a notification for every read:
Hi Julien,
>> tools/console/client/main.c | 6 +
>> tools/console/daemon/io.c| 532
>> +++
>> tools/libxc/include/xc_dom.h | 3 +
>> tools/libxc/xc_dom_arm.c | 7 +-
>> tools/libxc/xc_dom_boot.c| 3 +
>> tools/libxc/xc_
data on guest domain's behalf.
Signed-off-by: Bhupinder Thakur
---
Changes since v1:
- Replaced the hvm interface with domctl interface
tools/libxc/include/xenctrl.h | 26 ++
tools/libxc/xc_domain.c | 39 +++
xen/arc
: Bhupinder Thakur
---
xen/arch/arm/domain.c | 6 ++
xen/common/domctl.c | 3 +++
xen/include/public/domctl.h | 2 ++
xen/include/xen/sched.h | 4
4 files changed, 15 insertions(+)
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 76310ed..23baa81 100644
/Server_Base_System_Architecture_v3_1_ARM_DEN_0029A.pdf
Signed-off-by: Bhupinder Thakur
---
Changes since v1:
- Removed the optimiztion related to sendiing events to xenconsole
- Use local variables as ring buffer indices while using the ring buffer
xen/arch/arm/Kconfig | 5 +
xen/arch/arm
Allocate a new pfn and pass on to Xen using a domctl call.
Signed-off-by: Bhupinder Thakur
---
Changes since v1:
- Replaced the hvm call with the domctl call to set the pfn.
tools/libxc/include/xc_dom.h | 2 ++
tools/libxc/xc_dom_arm.c | 7 ++-
tools/libxc/xc_dom_boot.c| 2 ++
3
the guest
configuration file:
vuart = "pl011"
Signed-off-by: Bhupinder Thakur
---
Changes since v1:
- Modified the syntax for taking the pl011 as a console type in the
configuration file. Now the syntax is vuart = "pl011".
- Replaced the console type VCON with VUART, as it
PV and VUART
events.
5. Add a new log_file for VUART console logs.
Signed-off-by: Bhupinder Thakur
---
Changes since v1:
- Split the domain struture to a separate console structure
- Modified the functions to operate on the console struture
- Replaced repetitive per console code with generic
: Bhupinder Thakur
---
Changes since v1:
- Modified the xenstore key names to /vuart/0/ring-ref and
/vuart/0/port.
- Replaced the hvm call with domctl call to get the event channel.
tools/libxl/libxl_console.c | 10 ++
tools/libxl/libxl_dom.c | 4
2 files changed, 14 insertions
irmware
Signed-off-by: Bhupinder Thakur
Reviewed-by: Stefano Stabellini
---
Changes since v1:
- Modified the code to increment nr_spis based on the SPI value reserved for
vpl011.
- Added a check to verify that physical irq assigment is not conflicting with
vpl011 SPI.
- Fixed minor ind
1. Update documentation for vuart = "pl011" option added.
2. Update documentation about SPI irq reserved for vpl011.
Signed-off-by: Bhupinder Thakur
---
docs/man/xl.cfg.pod.5.in | 8
docs/misc/console.txt| 14 +-
2 files changed, 21 insertions(+), 1 deletio
:
url: ssh://g...@git.linaro.org:/people/bhupinder.thakur/xen.git
branch: vpl011_v2
Bhupinder Thakur (10):
xen/arm: vpl011: Add pl011 uart emulation in Xen
xen/arm: vpl011: Add new vuart domctl interface to setup pfn and
evtchn
xen/arm: vpl011: Enable pl011 emulation for a guest domain in
Add a new console type VUART to connect to guest vuart.
Signed-off-by: Bhupinder Thakur
---
tools/console/client/main.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 99f..ec5c6e1 100644
--- a/tools
Hi Stefano,
>> diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c
>> index 446e766..ef3bd44 100644
>> --- a/tools/libxl/libxl_console.c
>> +++ b/tools/libxl/libxl_console.c
>> @@ -67,6 +67,9 @@ int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int
>> cons_num,
>> cas
Hi Jan,
On 2 May 2017 at 13:09, Jan Beulich wrote:
>>>> On 28.04.17 at 21:23, wrote:
>> On Fri, 28 Apr 2017, Bhupinder Thakur wrote:
>>> --- a/xen/include/public/domctl.h
>>> +++ b/xen/include/public/domctl.h
>>> @@ -1138,6 +1138,15 @@ struct xen
Hi Jan,
>> +case XEN_DOMCTL_vuart_op:
>> +ret = -EOPNOTSUPP;
>> +break;
>
> There should be no need for such an addition.
This check was added to return a failure if user tries to call the
vuart domctl in case of x86 (wrong user configuration). If this check
is not there will
Hi Jan,
>> @@ -631,6 +632,9 @@ int arch_domain_create(struct domain *d, unsigned int
>> domcr_flags,
>> if ( (rc = domain_vtimer_init(d, config)) != 0 )
>> goto fail;
>>
>> +if ( domcr_flags & DOMCRF_vuart )
>> +if ( (rc = domain_vpl011_init(d, config)) != 0 )
>> +
Hi,
>> > It looks like you are reusing the libxl__device_console_add call for the
>> > main PV console for the domain, to also add the vuart nodes to xenstore.
>> >
>> > I don't think it is a good idea to mix the two. I suggest to introduce a
>> > new libxl__device call to introduce the vuart node
Hi,
>> >> > It looks like you are reusing the libxl__device_console_add call for the
>> >> > main PV console for the domain, to also add the vuart nodes to xenstore.
>> >> >
>> >> > I don't think it is a good idea to mix the two. I suggest to introduce a
>> >> > new libxl__device call to introduc
Hi Julien,
>>> Hi Jan,
>>>
> @@ -631,6 +632,9 @@ int arch_domain_create(struct domain *d,
> unsigned int domcr_flags,
> if ( (rc = domain_vtimer_init(d, config)) != 0 )
> goto fail;
>
> +if ( domcr_flags & DOMCRF_vuart )
> +if ( (rc = domain_vp
Hi Stefano,
>> >> >> > It looks like you are reusing the libxl__device_console_add call for
>> >> >> > the
>> >> >> > main PV console for the domain, to also add the vuart nodes to
>> >> >> > xenstore.
>> >> >> >
>> >> >> > I don't think it is a good idea to mix the two. I suggest to
>> >> >> >
Hi Julien,
>> +
>> +unsigned int vpl011_reg_mask[] = {0xff, 0x, 0x};
>
>
> This should be static. But I don't get what you need that. In the first
> version, I suggested to re-purpose vgic_reg*_{extract,update} so we can use
> it here. It would probably need to be renamed to vreg_reg*.
Hi Julien,
+unsigned int vpl011_reg_mask[] = {0xff, 0x, 0x};
>>>
>>>
>>>
>>> This should be static. But I don't get what you need that. In the first
>>> version, I suggested to re-purpose vgic_reg*_{extract,update} so we can
>>> use
>>> it here. It would probably need to be rename
Hi Stefano,
>> >> >> >> > It looks like you are reusing the libxl__device_console_add call
>> >> >> >> > for the
>> >> >> >> > main PV console for the domain, to also add the vuart nodes to
>> >> >> >> > xenstore.
>> >> >> >> >
>> >> >> >> > I don't think it is a good idea to mix the two. I sugg
Hi Stefano,
On 29 April 2017 at 04:40, Stefano Stabellini wrote:
> On Fri, 28 Apr 2017, Bhupinder Thakur wrote:
>> Xenconsole supports only PV console currently. This patch adds support
>> for vuart, which allows emulated pl011 uart to be accessed as a console.
>>
&
Hi,
>>> I was wondering whether it would be better to defer the PL011 creation to
>>> a
>>> domctl. This could be called after the domain is created with all the
>>> information required (MMIO region, Console PFN...).
>>>
>>> This would also make the migration support more trivial as the we will
>
Hi Julien,
> On 28/04/17 17:01, Bhupinder Thakur wrote:
>>
>> The SBSA uart node format is as specified in
>> Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt and given
>> below:
>>
>> ARM SBSA defined generic UART
>> ---
ents.
The vpl011 changes available at the following repo:
url: ssh://g...@git.linaro.org:/people/bhupinder.thakur/xen.git
branch: vpl011_v3
Bhupinder Thakur (12):
xen/arm: vpl011: Move vgic register access functions to vreg.h
xen/arm: vpl011: Define generic vreg_reg* access functions in vreg.h
This patch redefines the vgic_reg* access functions to vreg_reg* functions.
These are generic functions, which will be used by the vgic emulation code
to access the vgic registers.
PL011 emulation code will also use vreg_reg* access functions.
Signed-off-by: Bhupinder Thakur
---
xen/arch/arm
/Server_Base_System_Architecture_v3_1_ARM_DEN_0029A.pdf
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Use generic vreg_reg* for read/write of registers emulating pl011.
- Use generic ring buffer functions defined using DEFINE_XEN_FLEX_RING.
- Renamed the SPI injection function to vpl011_update_spi
These functions are generic in nature and can be reused by other emulation
code in Xen. One recent example is pl011 emulation, which needs similar
funictions to read/write the registers.
This patch moves the register access function definitions from vgic.h to
vreg.h.
Signed-off-by: Bhupinder
the guest
configuration file:
vuart = "pl011"
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Defined vuart option as an enum instead of a string.
- Removed the domain creation flag defined for vuart and the related code
to pass on the information while domain creation. Now
transmit and receive pl011 data on guest domain's behalf.
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Replaced the DOMCTL APIs defined for get/set of event channel and GFN with
a set of DOMCTL APIs for initializing and de-initializing vpl011 emulation.
tools/libxc/include/xenc
Add a new vuart console node to xenstore. This node is added at
/local/domain/$DOMID/vuart/0.
The node contains information such as the ring-ref, event channel,
buffer limit and type of console.
Signed-off-by: Bhupinder Thakur
---
tools/libxl/libxl_console.c | 33
Allocate a new gfn to be used as a ring buffer between xenconsole
and Xen for sending/receiving pl011 data.
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Removed the DOMCTL call to set the GFN as now this information is passed
in the DOMCTL call to initialize vpl011 emulation
channel for each console.
3. Modify domain_create_ring() to use console_create_ring().
4. Modifications in handle_ring_read() to read ring buffer data
from multiple consoles.
5. Add log file support for multiple consoles.
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Defined a new
Xenconsole supports only PV console currently. This patch adds support
for vuart console, which allows emulated pl011 UART to be accessed
as a console.
Signed-off-by: Bhupinder Thakur
---
One review comment was to keep the vuart code under CONFIG_ARM64 && CONFIG_ACPI
flags.
This cod
irmware
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Currently device discovery using ACPI is not supported.
- Dropped the reviewed-by tag by Stefano as there were some IRQ related changes
done later.
tools/libxl/libxl_arm.c | 53 +++--
1 f
1. Update documentation for a new vuart option added.
2. Update documentation about SPI irq reserved for vpl011.
Signed-off-by: Bhupinder Thakur
---
Changes since v2:
- Incorporated the review comments on the documentation.
docs/man/xl.cfg.pod.5.in | 9 +
docs/misc/console.txt
Add a new console type VUART to connect to guest's emualated vuart
console.
Signed-off-by: Bhupinder Thakur
---
tools/console/client/main.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 99f..6f
Hi Julien,
I will resend the series keeping you and Stefano in cc.
Regards,
Bhupinder
On 10 May 2017 at 23:23, Stefano Stabellini wrote:
> On Wed, 10 May 2017, Julien Grall wrote:
>> Hi Bhupinder,
>>
>> I know that Jan requested to only CCed relevant maintainers to each patch.
>> But
>> can yo
Hi Wei,
On 11 May 2017 at 16:40, Wei Liu wrote:
> On Wed, May 10, 2017 at 08:05:12PM +0530, Bhupinder Thakur wrote:
>> libxl__device_console_add(gc, domid, &console, state, &device);
>> @@ -1369,14 +1377,22 @@ static void domcreate_launch_dm(libxl__egc *e
Hi Wei,
>> --- a/tools/libxl/libxl_dom.c
>> +++ b/tools/libxl/libxl_dom.c
>> @@ -688,6 +688,15 @@ static int libxl__build_dom(libxl__gc *gc, uint32_t
>> domid,
>> goto out;
>> }
>>
>> +if ( info->vuart &&
>> + (ret = xc_dom_vpl011_init(CTX->xch,
>> +
Hi Wei,
> [...]
>> >> @@ -151,13 +154,19 @@ retry_transaction:
>> >> if (rc) goto out;
>> >>
>> >> if (!libxl_only) {
>> >> -rc = libxl__xs_write_checked(gc, t,
>> >> GCSPRINTF("%s/frontend",libxl_path),
>> >> - frontend_path);
>> >> -
Hi Julien,
>
>> -static inline void vgic_reg##sz##_clearbits(uint##sz##_t *reg, \
>> -register_t bits,\
>> -const mmio_info_t *info)\
>> -{
Hi Julien,
>>
>> -/*
>> - * 64 bits registers are only supported on platform with 64-bit long.
>> - * This is also allow us to optimize the 32 bit case by using
>> - * unsigned long rather than uint64_t
>> - */
>> -#if BITS_PER_LONG == 64
>> -VGIC_REG_HELPERS(64, 0x7);
>> -#endif
>> -VGIC_REG_HEL
Hi Wei,
>> # Complex libxl types
>> #
>> @@ -470,6 +476,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
>> ("disable_migrate", libxl_defbool),
>> ("cpuid", libxl_cpuid_policy_list),
>> ("blkdev_start",string),
>> +("vuart", libxl_vuart_type)
Hi,
On 17 May 2017 at 05:11, Stefano Stabellini wrote:
> On Wed, 10 May 2017, Bhupinder Thakur wrote:
>> Xenconsole supports only PV console currently. This patch adds support
>> for supporting multiple consoles.
>>
>> This patch modifies different data structures and
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
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
Hi Wei,
Thanks for your explanation.
>> >> >> @@ -151,13 +154,19 @@ retry_transaction:
>> >> >> if (rc) goto out;
>> >> >>
>> >> >> if (!libxl_only) {
>> >> >> -rc = libxl__xs_write_checked(gc, t,
>> >> >> GCSPRINTF("%s/frontend",libxl_path),
>> >> >> -
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
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;
>> ..
default console.
3. ACPI support for pl011 device.
Bhupinder Thakur (14):
xen/arm: vpl011: Move vgic register access functions to vreg.h
xen/arm: vpl011: Define generic vreg_reg* access functions in vreg.h
xen/arm: vpl011: Add pl011 uart emulation in Xen
xen/arm: vpl011: Add support for vuar
This patch redefines the vgic_reg* access functions to vreg_reg* functions.
These are generic functions, which will be used by the vgic emulation code
to access the vgic registers.
PL011 emulation code will also use vreg_reg* access functions.
Signed-off-by: Bhupinder Thakur
---
Changes since
These functions are generic in nature and can be reused by other emulation
code in Xen. One recent example is pl011 emulation, which needs similar
functions to read/write the registers.
This patch moves the register access function definitions from vgic.h to
vreg.h.
Signed-off-by: Bhupinder
/Server_Base_System_Architecture_v3_1_ARM_DEN_0029A.pdf
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- Moved the call to DEFINE_XEN_FLEX_RING from vpl011.h to public/console.h.
This macro defines
standard functions to operate on the ring buffer.
- Lock taken while updating the interrupt mask and
the guest
configuration file:
vuart = "pl011"
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- Added a new config option CONFIG_VUART_CONSOLE to enable/disable vuart console
support.
- Moved libxl_vuart_type to arch-arm part of libxl_domain_build_info
- Updated xl command help
/receiving vuart data.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- Added a backend node for vpl011.
- Removed libxl__device_vuart_add() for HVM guest. It is called only for PV
guest.
tools/libxl/libxl_console.c | 44
tools/libxl/libxl_create.c
data on the guest domain's
behalf.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- Added a new arch specific function libxl__arch_domain_create_finish(), which
calls the vpl011 initialization function. For x86 this function does not do
anything.
- domain_vpl011_init() takes a po
Allocate a new gfn to be used as a ring buffer between xenconsole
and Xen for sending/receiving pl011 console data.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- Added a new helper function xc_get_vuart_gfn() to return the GFN allocated for
vpl011.
- Since a new function has been
ot;console_" to indicate that these are console specific functions.
This patch is in preparation to support multiple consoles to support vuart
console.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- The changes in xenconsole have been split into four patches. This is the
second pa
This patch adds the support for multiple consoles and introduces the iterator
functions to operate on multiple consoles.
This patch is in preparation to support a new vuart console.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- The changes in xenconsole have been split into four
This patch finally adds the support for vuart console.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- The changes in xenconsole have been split into four patches. This is the
fourth patch.
- The vuart console support is added under CONFIG_VUART_CONSOLE option.
tools/console/Makefile
console tty.
This patch is in preparation to support multiple consoles to support vuart
console.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- The changes in xenconsole have been split into four patches. This is the
first patch
which modifies the xenconsole to use a new console
by the firmware
Currently the baud rate of 115200 has been selected as a default value,
which is one of the valid baud rate setttings. Higher baud rate was
selected since an emulated pl011 can support any valid baud rate without
any limitation of the hardware.
Signed-off-by: Bhupinder Thakur
Revie
Add a new console type VUART to connect to guest's emualated vuart
console.
Signed-off-by: Bhupinder Thakur
---
Changes since v3:
- The vuart console support is under CONFIG_VUART_CONSOLE option.
- Since there is a change from last review, I have not included
reviewed-by tag from Stefan
1. Update documentation for a new vuart option added.
2. Update documentation about SPI irq reserved for vpl011.
Signed-off-by: Bhupinder Thakur
Reviewed-by: Stefano Stabellini
Acked-by: Wei Liu
---
docs/man/xl.cfg.pod.5.in | 9 +
docs/misc/console.txt| 44
This patch redefines the vgic_reg* access functions to vreg_reg* functions.
These are generic functions, which will be used by the vgic emulation code
to access the vgic registers.
PL011 emulation code will also use vreg_reg* access functions.
Signed-off-by: Bhupinder Thakur
---
CC: ss
CC: jg
/Server_Base_System_Architecture_v3_1_ARM_DEN_0029A.pdf
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
CC: kw
Changes since v3:
- Moved the call to DEFINE_XEN_FLEX_RING from vpl011.h to public/console.h.
This macro defines
standard functions to operate on the ring buffer.
- Lock taken while
console tty.
This patch is in preparation to support multiple consoles to support vuart
console.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- The changes in xenconsole have been split into four patches. This is the
first patch
which modifies the
This patch finally adds the support for vuart console.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- The changes in xenconsole have been split into four patches. This is the
fourth patch.
- The vuart console support is added under CONFIG_VUART_CONSOLE
These functions are generic in nature and can be reused by other emulation
code in Xen. One recent example is pl011 emulation, which needs similar
functions to read/write the registers.
This patch moves the register access function definitions from vgic.h to
vreg.h.
Signed-off-by: Bhupinder
the guest
configuration file:
vuart = "pl011"
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- Added a new config option CONFIG_VUART_CONSOLE to enable/disable vuart console
support.
- Moved libxl_vuart_type to arch-arm part of libxl_domain_build_info
data on the guest domain's
behalf.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- Added a new arch specific function libxl__arch_domain_create_finish(), which
calls the vpl011 initialization function. For x86 this function does not do
any
ot;console_" to indicate that these are console specific functions.
This patch is in preparation to support multiple consoles to support vuart
console.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- The changes in xenconsole have been split into four
/receiving vuart data.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- Added a backend node for vpl011.
- Removed libxl__device_vuart_add() for HVM guest. It is called only for PV
guest.
tools/libxl/libxl_console.c | 44
default console.
3. ACPI support for pl011 device.
CC: ij
CC: wl
CC: ss
CC: jg
CC: kw
Bhupinder Thakur (14):
xen/arm: vpl011: Move vgic register access functions to vreg.h
xen/arm: vpl011: Define generic vreg_reg* access functions in vreg.h
xen/arm: vpl011: Add pl011 uart emulation in Xen
Allocate a new gfn to be used as a ring buffer between xenconsole
and Xen for sending/receiving pl011 console data.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- Added a new helper function xc_get_vuart_gfn() to return the GFN allocated for
vpl011
This patch adds the support for multiple consoles and introduces the iterator
functions to operate on multiple consoles.
This patch is in preparation to support a new vuart console.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- The changes in xenconsole
Add a new console type VUART to connect to guest's emualated vuart
console.
Signed-off-by: Bhupinder Thakur
---
CC: ij
CC: wl
CC: ss
CC: jg
Changes since v3:
- The vuart console support is under CONFIG_VUART_CONSOLE option.
- Since there is a change from last review, I have not inc
by the firmware
Currently the baud rate of 115200 has been selected as a default value,
which is one of the valid baud rate setttings. Higher baud rate was
selected since an emulated pl011 can support any valid baud rate without
any limitation of the hardware.
Signed-off-by: Bhupinder Thakur
Revie
1. Update documentation for a new vuart option added.
2. Update documentation about SPI irq reserved for vpl011.
Signed-off-by: Bhupinder Thakur
Reviewed-by: Stefano Stabellini
Acked-by: Wei Liu
---
CC: ij
CC: wl
CC: ss
CC: jg
docs/man/xl.cfg.pod.5.in | 9 +
docs/misc/console.txt
Hi Stefano,
Thanks for your comments.
>> diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
>> index c5dd08d..db73e10 100644
>> --- a/tools/console/daemon/io.c
>> +++ b/tools/console/daemon/io.c
>> @@ -90,12 +90,15 @@ struct buffer {
>> };
>>
>> struct console {
>> + char *x
Hi Julien,
>>> +static uint8_t vpl011_read_data(struct domain *d)
>>> +{
>>> +unsigned long flags;
>>> +uint8_t data = 0;
>>> +struct vpl011 *vpl011 = &d->arch.vpl011;
>>> +struct xencons_interface *intf = vpl011->ring_buf;
>>> +XENCONS_RING_IDX in_cons = intf->in_cons;
>>> +
Hi Julien,
>>
>> tools/console/daemon/io.c| 2 +-
>> xen/arch/arm/Kconfig | 5 +
>> xen/arch/arm/Makefile| 1 +
>> xen/arch/arm/vpl011.c| 418
>> +++
>> xen/include/asm-arm/domain.h | 6 +
>> xen/include/
Hi Julien,
+}
+
+static void vpl011_update(struct domain *d)
+{
+struct vpl011 *vpl011 = &d->arch.vpl011;
+
+/*
+ * TODO: PL011 interrupts are level triggered which means
+ * that interrupt needs to be set/clear instead of being
+
Hi Stefano,
On 7 June 2017 at 04:56, Stefano Stabellini wrote:
>> static int set_vnuma_info(libxl__gc *gc, uint32_t domid,
>> @@ -788,6 +791,7 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
>> if (xc_dom_translated(dom)) {
>> state->console_mfn = dom->console_pfn;
>>
On 14 June 2017 at 13:05, Bhupinder Thakur wrote:
> Hi Stefano,
>
> On 7 June 2017 at 04:56, Stefano Stabellini wrote:
>>> static int set_vnuma_info(libxl__gc *gc, uint32_t domid,
>>> @@ -788,6 +791,7 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
>>
Hi Julien,
>> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
>> index 1629f41..77425dd 100644
>> --- a/tools/libxc/include/xenctrl.h
>> +++ b/tools/libxc/include/xenctrl.h
>> @@ -884,6 +884,23 @@ int xc_vcpu_getcontext(xc_interface *xch,
>> uint
Hi Julien,
diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
index 5e1fc60..d1ca9c6 100644
--- a/tools/libxl/libxl_arch.h
+++ b/tools/libxl/libxl_arch.h
@@ -32,6 +32,13 @@ _hidden
int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config
required by the emulation code for reading/writing data. By
that time, the page would have been physically mapped.
Regards,
Bhupinder
On 15 June 2017 at 12:03, Bhupinder Thakur wrote:
> Hi Julien,
>
>
>>>>> diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
>
1 - 100 of 448 matches
Mail list logo