All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/16] xen: framework for UART emulators
@ 2025-06-24  3:54 dmkhn
  2025-06-24  3:55 ` [PATCH v1 01/16] arm/vpl011: rename virtual PL011 Kconfig option dmkhn
                   ` (15 more replies)
  0 siblings, 16 replies; 59+ messages in thread
From: dmkhn @ 2025-06-24  3:54 UTC (permalink / raw)
  To: xen-devel
  Cc: andrew.cooper3, anthony.perard, jbeulich, julien, michal.orzel,
	oleksii.kurochko, roger.pau, sstabellini, dmukhin

The series introduces a driver framework to abstract UART emulators in the
hypervisor under drivers/vuart.

That allows for architecture-independent handling of virtual UARTs in the
console driver and simplifies enabling new UART emulators.

The framework is gated by CONFIG_HAS_VUART, which is automatically enabled
once the user enables any UART emulator.

Current implementation supports maximum of one vUART of each kind per domain.

All current UART emulators (Arm) are switched to the new framework.

This works origins from [1].

Conceptually, there are 3 parts in the series:
- PL011 emulator cleanup: patches 1-6
- Simple MMIO-based UART emulator cleanup: patches 7-10, depends on the common
  header introduced in vpl011 cleanup
- vUART driver framework: patches 11-16, depends on the cleanup part

[1] https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-0-c5d36b31d66c@ford.com/
[2] CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/1885641957

Denis Mukhin (16):
  arm/vpl011: rename virtual PL011 Kconfig option
  arm/vpl011: move DT node parsing to PL011 emulator code
  arm/vpl011: use vuart_ prefix in vpl011 public calls
  arm/vpl011: use raw spin_lock_{irqrestore,irqsave}
  arm/vpl011: use void pointer in domain struct
  arm/vpl011: remove vpl011 header file
  arm/vuart: rename 'virtual UART' Kconfig option
  arm/vuart: move simple MMIO-based vUART declarations to common header
  arm/vuart: use void pointer in domain struct
  arm/vuart: merge vuart_print_char() with vuart_mmio_write()
  xen/domain: introduce common emulation flags
  xen/domain: introduce domain-emu.h
  drivers/vuart: move PL011 emulator code
  drivers/vuart: move simple MMIO-based UART emulator
  drivers/vuart: introduce framework for UART emulators
  drivers/vuart: hook simple MMIO-based UART to vUART framework

 xen/arch/arm/Kconfig                          |  15 -
 xen/arch/arm/Makefile                         |   2 -
 xen/arch/arm/configs/tiny64_defconfig         |   2 +-
 xen/arch/arm/dom0less-build.c                 |  76 +---
 xen/arch/arm/domain.c                         |  11 +-
 xen/arch/arm/domctl.c                         |  15 +-
 xen/arch/arm/include/asm/domain.h             |  20 +-
 xen/arch/arm/include/asm/kernel.h             |   3 -
 xen/arch/arm/include/asm/vpl011.h             |  91 -----
 xen/arch/arm/vuart.c                          | 139 -------
 xen/arch/arm/vuart.h                          |  54 ---
 xen/arch/arm/xen.lds.S                        |   1 +
 xen/arch/ppc/include/asm/domain.h             |   1 +
 xen/arch/ppc/xen.lds.S                        |   1 +
 xen/arch/riscv/include/asm/domain.h           |   1 +
 xen/arch/riscv/xen.lds.S                      |   1 +
 xen/arch/x86/domain.c                         |   2 +-
 xen/arch/x86/domctl.c                         |   2 +-
 xen/arch/x86/include/asm/domain.h             |  48 ++-
 xen/arch/x86/xen.lds.S                        |   1 +
 xen/common/domain.c                           |  13 +
 xen/common/keyhandler.c                       |   4 +
 xen/drivers/Kconfig                           |   2 +
 xen/drivers/Makefile                          |   1 +
 xen/drivers/char/console.c                    |  11 +-
 xen/drivers/vuart/Kconfig                     |  23 ++
 xen/drivers/vuart/Makefile                    |   3 +
 xen/drivers/vuart/vuart-mmio.c                | 189 ++++++++++
 .../vpl011.c => drivers/vuart/vuart-pl011.c}  | 347 +++++++++++++-----
 xen/drivers/vuart/vuart.c                     |  95 +++++
 xen/include/xen/domain-emu.h                  |  33 ++
 xen/include/xen/domain.h                      |   2 +
 xen/include/xen/sched.h                       |   2 +
 xen/include/xen/vuart.h                       |  72 ++++
 xen/include/xen/xen.lds.h                     |  10 +
 35 files changed, 771 insertions(+), 522 deletions(-)
 delete mode 100644 xen/arch/arm/include/asm/vpl011.h
 delete mode 100644 xen/arch/arm/vuart.c
 delete mode 100644 xen/arch/arm/vuart.h
 create mode 100644 xen/drivers/vuart/Kconfig
 create mode 100644 xen/drivers/vuart/Makefile
 create mode 100644 xen/drivers/vuart/vuart-mmio.c
 rename xen/{arch/arm/vpl011.c => drivers/vuart/vuart-pl011.c} (71%)
 create mode 100644 xen/drivers/vuart/vuart.c
 create mode 100644 xen/include/xen/domain-emu.h
 create mode 100644 xen/include/xen/vuart.h

-- 
2.34.1




^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2025-08-05  0:25 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24  3:54 [PATCH v1 00/16] xen: framework for UART emulators dmkhn
2025-06-24  3:55 ` [PATCH v1 01/16] arm/vpl011: rename virtual PL011 Kconfig option dmkhn
2025-06-24  6:13   ` Orzel, Michal
2025-06-24  7:24     ` dmkhn
2025-07-17 15:43       ` Alejandro Vallejo
2025-07-17 19:58         ` dmkhn
2025-07-18 11:10           ` Alejandro Vallejo
2025-06-24  3:55 ` [PATCH v1 02/16] arm/vpl011: move DT node parsing to PL011 emulator code dmkhn
2025-06-24  7:49   ` Orzel, Michal
2025-06-24 21:56     ` dmkhn
2025-06-25  6:57       ` Orzel, Michal
2025-07-31 21:02         ` dmkhn
2025-06-24  3:55 ` [PATCH v1 03/16] arm/vpl011: use vuart_ prefix in vpl011 public calls dmkhn
2025-06-24 10:11   ` Orzel, Michal
2025-06-24 22:17     ` dmkhn
2025-07-31 21:11     ` dmkhn
2025-06-24  3:55 ` [PATCH v1 04/16] arm/vpl011: use raw spin_lock_{irqrestore,irqsave} dmkhn
2025-06-24  5:46   ` Jan Beulich
2025-06-24  7:50     ` Orzel, Michal
2025-06-24 21:46       ` dmkhn
2025-06-25  6:52         ` Orzel, Michal
2025-07-31 21:03           ` dmkhn
2025-06-24  3:55 ` [PATCH v1 05/16] arm/vpl011: use void pointer in domain struct dmkhn
2025-06-25  7:21   ` Orzel, Michal
2025-06-24  3:55 ` [PATCH v1 06/16] arm/vpl011: remove vpl011 header file dmkhn
2025-06-24  3:55 ` [PATCH v1 07/16] arm/vuart: rename 'virtual UART' Kconfig option dmkhn
2025-06-24  6:37   ` Orzel, Michal
2025-06-24  7:14     ` dmkhn
2025-06-25  7:07       ` Orzel, Michal
2025-07-31 21:02         ` dmkhn
2025-06-24  3:56 ` [PATCH v1 08/16] arm/vuart: move simple MMIO-based vUART declarations to common header dmkhn
2025-06-24  3:56 ` [PATCH v1 09/16] arm/vuart: use void pointer in domain struct dmkhn
2025-06-24  3:56 ` [PATCH v1 10/16] arm/vuart: merge vuart_print_char() with vuart_mmio_write() dmkhn
2025-06-24  3:56 ` [PATCH v1 11/16] xen/domain: introduce common emulation flags dmkhn
2025-06-24  3:56 ` [PATCH v1 12/16] xen/domain: introduce domain-emu.h dmkhn
2025-07-09 14:57   ` Jan Beulich
2025-07-31 20:55     ` dmkhn
2025-08-01  6:02       ` Jan Beulich
2025-08-01 19:30         ` dmkhn
2025-08-04  7:13           ` Jan Beulich
2025-08-05  0:24             ` dmkhn
2025-06-24  3:56 ` [PATCH v1 13/16] drivers/vuart: move PL011 emulator code dmkhn
2025-06-24  5:50   ` Jan Beulich
2025-06-24  7:31     ` dmkhn
2025-06-24  7:33       ` Jan Beulich
2025-07-10  1:59         ` dmkhn
2025-07-10  8:15           ` Jan Beulich
2025-07-10 17:00             ` Stefano Stabellini
2025-07-31 20:47               ` dmkhn
2025-07-10 18:32             ` dmkhn
2025-06-24  3:57 ` [PATCH v1 14/16] drivers/vuart: move simple MMIO-based UART emulator dmkhn
2025-06-24  5:53   ` Jan Beulich
2025-06-24  7:36     ` dmkhn
2025-06-24  7:40       ` Jan Beulich
2025-06-24 22:54         ` dmkhn
2025-06-25  5:25           ` Jan Beulich
2025-07-10  1:52             ` dmkhn
2025-06-24  3:57 ` [PATCH v1 15/16] drivers/vuart: introduce framework for UART emulators dmkhn
2025-06-24  3:57 ` [PATCH v1 16/16] drivers/vuart: hook simple MMIO-based UART to vUART framework dmkhn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.