[PW_SID:1067293] Drivers: hv: Add ARM64 support in mshv_vtl#1622
[PW_SID:1067293] Drivers: hv: Add ARM64 support in mshv_vtl#1622linux-riscv-bot wants to merge 12 commits intoworkflowfrom
Conversation
mshv_vtl_main.c calls smp_send_reschedule() which expands to arch_smp_send_reschedule(). When CONFIG_MSHV_VTL=m, the module cannot access this symbol since it is not exported on arm64. smp_send_reschedule() is used in mshv_vtl_cancel() to interrupt a vCPU thread running on another CPU. When a vCPU is looping in mshv_vtl_ioctl_return_to_lower_vtl(), it checks a per-CPU cancel flag before each VTL0 entry. Setting cancel=1 alone is not enough if the target CPU thread is sleeping - the IPI from smp_send_reschedule() kicks the remote CPU out of idle/sleep so it re-checks the cancel flag and exits the loop promptly. Other architectures (riscv, loongarch, powerpc) already export this symbol. Add the same EXPORT_SYMBOL_GPL for arm64. This is required for adding arm64 support in MSHV_VTL. Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move the logic to initialize and export hv_vp_assist_page from x86 architecture code to Hyper-V common code to allow it to be used for upcoming arm64 support in MSHV_VTL driver. Note: This change also improves error handling - if VP assist page allocation fails, hyperv_init() now returns early instead of continuing with partial initialization. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add a wrapper function - hv_setup_percpu_vmbus_handler(), similar to hv_setup_vmbus_handler() to allow setting up custom per-cpu VMBus interrupt handler. This is required for arm64 support, to be added in MSHV_VTL driver, where per-cpu VMBus interrupt handler will be set to mshv_vtl_vmbus_isr() for VTL2 (Virtual Trust Level 2). Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Refactor MSHV_VTL driver to move some of the x86 specific code to arch specific files, and add corresponding functions for arm64. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
vmbus_interrupt is used in mshv_vtl_main.c to set the SINT vector. When CONFIG_MSHV_VTL=m and CONFIG_HYPERV_VMBUS=y (built-in), the module cannot access vmbus_interrupt at load time since it is not exported. Export it using EXPORT_SYMBOL_FOR_MODULES consistent with the existing pattern used for vmbus_isr. Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Generalize Synthetic interrupt source vector (sint) to use vmbus_interrupt variable instead, which automatically takes care of architectures where HYPERVISOR_CALLBACK_VECTOR is not present (arm64). Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add support for arm64 specific variant of mshv_vtl_return_call function to be able to add support for arm64 in MSHV_VTL driver. This would help enable the transition between Virtual Trust Levels (VTL) in MSHV_VTL when the kernel acts as a paravisor. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move mshv_vtl_configure_reg_page() implementation from drivers/hv/mshv_vtl_main.c to arch-specific files: - arch/x86/hyperv/hv_vtl.c: full implementation with register page setup - arch/arm64/hyperv/hv_vtl.c: stub implementation (unsupported) Move common type definitions to include/asm-generic/mshyperv.h: - struct mshv_vtl_per_cpu - union hv_synic_overlay_page_msr Move hv_call_get_vp_registers() and hv_call_set_vp_registers() declarations to include/asm-generic/mshyperv.h since these functions are used by multiple modules. While at it, remove the unnecessary stub implementations in #else case for mshv_vtl_return* functions in arch/x86/include/asm/mshyperv.h. This is essential for adding support for ARM64 in MSHV_VTL. Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The kernel currently sets the VSM configuration register, thereby imposing certain VSM configuration on the userspace (OpenVMM). The userspace (OpenVMM) has the capability to configure this register, and it is already doing it using the generic hypercall interface. The configuration can vary based on the use case or architectures, so let userspace take care of configuring it and remove this logic in the kernel driver. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add necessary support to make MSHV_VTL work for arm64 architecture. * Add stub implementation for mshv_vtl_return_call_init(): not required for arm64 * Remove fpu/legacy.h header inclusion, as this is not required * handle HV_REGISTER_VSM_CODE_PAGE_OFFSETS register: not supported in arm64 * Configure custom percpu_vmbus_handler by using hv_setup_percpu_vmbus_handler() * Handle hugepage functions by config checks Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Enable ARM64 support in MSHV_VTL Kconfig now that all the necessary support is present. Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Naman Jain <namjain@linux.microsoft.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 1: "[01/11] arch: arm64: Export arch_smp_send_reschedule for mshv_vtl module" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 2: "[02/11] Drivers: hv: Move hv_vp_assist_page to common files" |
|
Patch 9: "[09/11] Drivers: hv: mshv_vtl: Let userspace do VSM configuration" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 10: "[10/11] Drivers: hv: Add support for arm64 in MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
|
Patch 11: "[11/11] Drivers: hv: Kconfig: Add ARM64 support for MSHV_VTL" |
da94c13 to
30bb016
Compare
PR for series 1067293 applied to workflow
Name: Drivers: hv: Add ARM64 support in mshv_vtl
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1067293
Version: 1