mbox series

[Xen-devel,0/1] xen/arm: Add pl011 uart support in Xen for guest domains

Message ID 1486404548-15062-1-git-send-email-bhupinder.thakur@linaro.org
Headers show
Series xen/arm: Add pl011 uart support in Xen for guest domains | expand

Message

Bhupinder Thakur Feb. 6, 2017, 6:09 p.m. UTC
As per "VM System Specification for  ARM Processors", there is a requirement for Xen to support guest console
over pl011 UART, which is SBSA compliant. The changes in this patch implement the pl011 emulation in Xen
and a new pl011 console support in xenconsoled.

The following changes are still pending:

1. Xenconsoled is modified to handle only pl011 console. Changes are required to support another console 
   type "pl011" like "pv" and "serial" so that user can select any of the three (pv/serial/pl011) consoles.

2. The SPI VIRQ for pl011 is getting allocated dynamically currently instead of reserving a specific VIRQ. 
   Changes are required to reserve a range for SPI VIRQs.

3. Currently there is no validation that the hvm APIs for getting the SPI VIRQ, passing the pl011 PFN to Xen 
   are allowed from dom0 only. Those validation checks need to be added so the guests cannot use those APIs.

4. For receiving events from xenconsole, Xen uses the Xen events which are consumed by Xen itself. However, 
   such events (whose consumer is Xen) is not allowed to send events out. Since we need  the Xen to send the 
   events to xenconsoled, a check was added to bypass this restriction. This needs to be looked into more 
   detail in terms of whether it is better to introduce a customized evtchn_send() API, which will be used 
   only by Xen core.

5. There are some debug prints still left out in the code, which need to be cleaned up.


Bhupinder Thakur (1):
  xen/arm: Add pl011 uart support in Xen for guest domains

 tools/console/daemon/io.c       | 170 ++++++++++++++---
 tools/console/daemon/main.c     |  10 +
 tools/libxc/include/xc_dom.h    |   3 +
 tools/libxc/xc_dom_arm.c        |   7 +-
 tools/libxc/xc_dom_boot.c       |   3 +
 tools/libxc/xc_domain.c         |   3 -
 tools/libxl/libxl.c             |   4 +
 tools/libxl/libxl_arm.c         |  50 ++++-
 tools/libxl/libxl_dom.c         |   9 +-
 tools/libxl/libxl_internal.h    |   2 +
 xen/arch/arm/Makefile           |   1 +
 xen/arch/arm/domain.c           |   7 +
 xen/arch/arm/hvm.c              |  22 ++-
 xen/arch/arm/setup.c            |   1 +
 xen/arch/arm/vgic.c             |   7 +
 xen/arch/arm/vpl011.c           | 391 ++++++++++++++++++++++++++++++++++++++++
 xen/common/event_channel.c      |  11 +-
 xen/include/asm-arm/domain.h    |  14 ++
 xen/include/public/arch-arm.h   |   5 +
 xen/include/public/hvm/params.h |  10 +-
 xen/include/xen/vpl011.h        | 146 +++++++++++++++
 21 files changed, 832 insertions(+), 44 deletions(-)
 create mode 100644 xen/arch/arm/vpl011.c
 create mode 100644 xen/include/xen/vpl011.h