Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5d15012
drivers: virtio: Separate macros into a common header
soburi Jul 21, 2025
8128d69
xen: Add xen version hypercall
dsemenets May 31, 2023
1605ee8
xen: Add sysctl hypercall
dsemenets May 31, 2023
c7a7907
xen: Added getvcpuinfo function in domctl hypercall
dsemenets May 31, 2023
86698d3
xen: domctl: Fix function parameter name in set_paging_mempool_size
Deedone Apr 29, 2024
2213da2
xen: domctl: Add doxygen comments for domctl functions
Deedone Apr 29, 2024
c499720
xen: sysctl: Add doxygen comments for sysctl functions
Deedone Apr 29, 2024
b67fd4b
xen: domctl: Get back created domain id
Deedone Apr 24, 2024
807f059
drivers: xen: return hypercall results from notify_evtchn
firscity May 24, 2023
93ee9af
[DNM] manifest: add `zephyr-xenlib` module
soburi Jun 13, 2025
e710e84
modules: add and migrate to the `zephyr-xenlib` module
soburi Jun 14, 2025
dfb6a53
drivers: xen: change gnttab_[get|put]_pages for multi-page support
soburi Jul 29, 2025
3282cf1
drivers: xen: memory: add acquire_resource wrapper
soburi Aug 31, 2025
e1b5e9a
drivers: xen: add SCHEDOP hypercall wrapper
soburi Aug 31, 2025
114067d
[DNM] manifest: add `zephyr-xenlib` module
soburi Jun 13, 2025
3301684
drivers: xen: add DMOP hypercall wrappers
soburi May 18, 2025
3ef6d19
arch: arm64: core: xen: hypercall: Add `dm_op` hypercall
soburi May 17, 2025
3ef16fc
drivers: Introduce vhost driver subsystem
soburi Jul 21, 2025
625f73a
drivers: vhost: add Xen MMIO VirtIO backend
soburi Jun 13, 2025
de7c012
samples: drivers: virtualization: add vhost sample application
soburi May 17, 2025
b47b315
vhost_xen_mmio: reset chunk fields before release
soburi Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5921,6 +5921,19 @@ West:
labels:
- "area: Rust"

"West project: zephyr-xenlib":
status: maintained
maintainers:
- firscity
collaborators:
- lorc
- luca-fancellu
- soburi
files:
- modules/zephyr-xenlib/
labels:
- "area: Xen Platform"

"West project: zscilib":
status: maintained
maintainers:
Expand Down
5 changes: 3 additions & 2 deletions arch/arm64/core/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <xen/public/xen.h>
#include <xen/public/memory.h>

#include <zephyr/arch/arm64/hypercall.h>
#include <zephyr/xen/events.h>
#include <zephyr/xen/generic.h>
#include <zephyr/xen/public/xen.h>
#include <zephyr/xen/public/memory.h>

#include <zephyr/device.h>
#include <zephyr/init.h>
Expand Down
8 changes: 6 additions & 2 deletions arch/arm64/core/xen/hypercall.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
* Copyright (c) 2021-2023 EPAM Systems
*/

#include <xen/public/xen.h>
#include <xen/public/arch-arm.h>

#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/xen/public/arch-arm.h>
#include <zephyr/xen/public/xen.h>

#define HYPERCALL(hypercall) \
GTEXT(HYPERVISOR_##hypercall); \
Expand All @@ -23,7 +24,10 @@ HYPERCALL(sched_op);
HYPERCALL(event_channel_op);
HYPERCALL(hvm_op);
HYPERCALL(memory_op);
HYPERCALL(dm_op);
HYPERCALL(xen_version);

#ifdef CONFIG_XEN_DOM0
HYPERCALL(domctl);
HYPERCALL(sysctl);
#endif
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ add_subdirectory_ifdef(CONFIG_STEPPER stepper)
add_subdirectory_ifdef(CONFIG_SYSCON syscon)
add_subdirectory_ifdef(CONFIG_SYS_CLOCK_EXISTS timer)
add_subdirectory_ifdef(CONFIG_TEE tee)
add_subdirectory_ifdef(CONFIG_VHOST vhost)
add_subdirectory_ifdef(CONFIG_VIDEO video)
add_subdirectory_ifdef(CONFIG_VIRTIO virtio)
add_subdirectory_ifdef(CONFIG_VIRTUALIZATION virtualization)
Expand Down
1 change: 1 addition & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ source "drivers/syscon/Kconfig"
source "drivers/timer/Kconfig"
source "drivers/usb/Kconfig"
source "drivers/usb_c/Kconfig"
source "drivers/vhost/Kconfig"
source "drivers/video/Kconfig"
source "drivers/virtio/Kconfig"
source "drivers/virtualization/Kconfig"
Expand Down
7 changes: 4 additions & 3 deletions drivers/serial/uart_hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <xen/public/xen.h>
#include <xen/public/io/console.h>
#include <xen/public/sched.h>

#include <zephyr/arch/arm64/hypercall.h>
#include <zephyr/xen/console.h>
#include <zephyr/xen/events.h>
#include <zephyr/xen/generic.h>
#include <zephyr/xen/hvm.h>
#include <zephyr/xen/public/io/console.h>
#include <zephyr/xen/public/sched.h>
#include <zephyr/xen/public/xen.h>

#include <zephyr/device.h>
#include <zephyr/init.h>
Expand Down
3 changes: 2 additions & 1 deletion drivers/serial/uart_hvc_xen_consoleio.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* should be used (uart_hvc_xen.c), this console will not be available.
*/

#include <xen/public/xen.h>

#include <zephyr/arch/arm64/hypercall.h>
#include <zephyr/xen/public/xen.h>

#include <zephyr/device.h>
#include <zephyr/drivers/uart.h>
Expand Down
7 changes: 7 additions & 0 deletions drivers/vhost/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2025 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources_ifdef(CONFIG_VHOST vringh.c)
zephyr_library_sources_ifdef(CONFIG_VHOST_XEN_MMIO vhost_xen_mmio.c)
22 changes: 22 additions & 0 deletions drivers/vhost/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2025 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0

config VHOST
bool "support for VIRTIO"
help
Enable options for VIRTIO

if VHOST

config VHOST_XEN_MMIO
bool "support for MMIO-based VIRTIO backend on Xen hypervisor"
default y
depends on DT_HAS_XEN_VHOST_MMIO_ENABLED
help
Enable VIRTIO-MMIO backend on Xen hypervisor

endif # VIRTIO

module = VHOST
module-str = VHOST
source "subsys/logging/Kconfig.template.log_config"
Loading
Loading