[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1] xen/riscv: add initialization support for virtual SBI UART (vSBI UART)
- To: dmkhn@xxxxxxxxx
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Wed, 21 May 2025 13:36:40 +0200
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Wed, 21 May 2025 11:36:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Denis,
Hi Oleksii,
On Mon, May 12, 2025 at 05:55:21PM +0200, Oleksii Kurochko wrote:
This is the first step toward supporting a vSBI UART.
The implementation checks for the presence of the "vsbi_uart" property
in the device tree. If present, the vSBI UART is initialized by:
- Allocating a structure that holds Xen console rings and character
buffers.
- Initializing the vSBI UART spinlock.
This commit introduces the following:
- domain_vsbi_uart_init() and domain_vsbi_uart_deinit() functions.
- A new arch_kernel_info structure with a vsbi_uart member.
- A vsbi_uart structure to hold information related to the vSBI
driver, including:
- Whether the vSBI UART backend is in the domain or in Xen.
- If the backend is in Xen: details such as ring buffer, ring page,
Xen console ring indexes, and character buffers.
- A spinlock for synchronization.
Also, introduce init_vuart() which is going to be called by dom0less
generic code during guest domain construction.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
JFYI, I started to move all virtual UARTs under drivers/vuart directory
and introducing a framework for hooking vUARTs into console driver.
pl011 emulator cleanup
https://gitlab.com/xen-project/people/dmukhin/xen/-/commit/3c635962a349afed75f47cd2559a4160ffa41106
original 'vuart' for hwdom cleanup
https://gitlab.com/xen-project/people/dmukhin/xen/-/commit/405c86cbd6d55f5737dc9ccf9b8a8f370767e3f0
move pl011 to drivers/vuart
https://gitlab.com/xen-project/people/dmukhin/xen/-/commit/4b5cdff118a2795278dfcc2c1b60423b46e85f27
move 'vuart' for hwdom cleanup to drivers/vuart
https://gitlab.com/xen-project/people/dmukhin/xen/-/commit/d76c17b8056c1d500afd854a513403fc3774da51
which is followed by vUART driver framework introduction (not posted):
https://gitlab.com/xen-project/people/dmukhin/xen/-/commit/ebc7e83650e5e3f68e5d734e5c475c6bcde626fa
These patches ^^ are not posted, since I do already have enough patches on
the mailing list which are in progress.
I did this work along w/ NS16550 emulator on x86.
IMO, it is worth delivering those patches first and then integrate SBI UART.
Agree, it makes sense. But If it will take a lot of time to upstream/merge then I prefer this patch
go first to not block RISC-V upstreaming.
Anyway, I will look at your changes tomorrow.
Thanks.
~ Oleksii
|