RE: [PATCH v10 2/2] Drivers: hv: Introduce mshv_vtl driver

Michael Kelley
2025-11-06T14:54:34Z

From: Naman Jain <namjain@linux.microsoft.com> Sent: Tuesday, October 28, 2025 10:02 PM
>
> Provide an interface for Virtual Machine Monitor like OpenVMM and its
> use as OpenHCL paravisor to control VTL0 (Virtual trust Level).
> Expose devices and support IOCTLs for features like VTL creation,
> VTL0 memory management, context switch, making hypercalls,
> mapping VTL0 address space to VTL2 userspace, getting new VMBus
> messages and channel events in VTL2 etc.
>
> Co-developed-by: Roman Kisel <romank@linux.microsoft.com>
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> Co-developed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
> ---
> arch/x86/hyperv/Makefile | 10 +-
> arch/x86/hyperv/hv_vtl.c | 43 +
> arch/x86/hyperv/mshv-asm-offsets.c | 37 +
> arch/x86/hyperv/mshv_vtl_asm.S | 98 ++
> arch/x86/include/asm/mshyperv.h | 34 +
> drivers/hv/Kconfig | 26 +-
> drivers/hv/Makefile | 7 +-
> drivers/hv/mshv_vtl.h | 25 +
> drivers/hv/mshv_vtl_main.c | 1392 ++++++++++++++++++++++++++++
> include/hyperv/hvgdk_mini.h | 106 +++
> include/uapi/linux/mshv.h | 80 ++
> 11 files changed, 1855 insertions(+), 3 deletions(-)
> create mode 100644 arch/x86/hyperv/mshv-asm-offsets.c
> create mode 100644 arch/x86/hyperv/mshv_vtl_asm.S
> create mode 100644 drivers/hv/mshv_vtl.h
> create mode 100644 drivers/hv/mshv_vtl_main.c
>

I've reviewed and made suggestions on most of this code pretty
carefully over the past few months and through 10 revisions. This
version addresses my suggestions and looks good to me. There
are a few areas, such as the assembly code in mshv_vtl_asm.S and
the details of the hypervisor ABI for doing VTL Return, that are
outside my area of expertise so I'm limited to a surface level
review.

Reviewed-by: Michael Kelley <mhklinux@outlook.com>