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

[PATCH v3 0/5] xen/console: cleanup console input switch logic



The patch series originates from the NS16550 UART emulator series [1] (x86)
which requires ability to switch physical console input to a PVH/HVM domain
with an emulated UART.

Currently, on x86, console input can be rotated in round-robin manner only
between dom0, PV shim, and Xen itself. On Arm the input rotation can include
domUs with vpl011.

The main idea of this series is introducing a per-domain permission flag that
is set during domain initialization and used by the console driver to switch
the input across permitted domains.

Patch 1 performs rename of switch_serial_input() to fit the console driver
notation.

Patch 2 simplifies the existing vUART code by using newly introduced API.

Patch 3 introduces a new domain permission flag to mark ownership of the
console input for the console driver.

Patch 4 cleans up the console input switch logic by removing dependency
on max_init_domid. Depends on patches 1, 3 and [2].

Patch 5 performs rename of console_rx to console_domid to match the usage
of the symbol in the code.

[1] 
https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-0-c5d36b31d66c@xxxxxxxx/
[2] https://lore.kernel.org/xen-devel/20250519192306.1364471-1-dmukhin@xxxxxxxx/
[3] Link to v2: 
https://lore.kernel.org/xen-devel/20250331230508.440198-1-dmukhin@xxxxxxxx/
[4] Link to CI: 
https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/1825448327

Denis Mukhin (5):
  xen/console: rename switch_serial_input() to console_switch_input()
  xen/console: introduce console_get_domid()
  xen/console: introduce console input permission
  xen/console: remove max_init_domid dependency
  xen/console: rename console_rx to console_domid

 xen/arch/arm/include/asm/setup.h        |   2 -
 xen/arch/arm/setup.c                    |   2 -
 xen/arch/arm/vpl011.c                   |   7 +-
 xen/arch/ppc/include/asm/setup.h        |   2 -
 xen/arch/riscv/include/asm/setup.h      |   2 -
 xen/arch/x86/include/asm/setup.h        |   2 -
 xen/arch/x86/pv/shim.c                  |   2 +
 xen/common/device-tree/dom0less-build.c |   2 -
 xen/common/domain.c                     |  31 +++++++
 xen/drivers/char/console.c              | 105 +++++++++++-------------
 xen/include/xen/console.h               |   3 +-
 xen/include/xen/domain.h                |   1 +
 xen/include/xen/sched.h                 |   8 +-
 13 files changed, 94 insertions(+), 75 deletions(-)

-- 
2.34.1





 


Rackspace

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