Re: [PATCH v7 3/7] Drivers: hv: Move region management to mshv_regions.c

From: Anirudh Rayabharam

Date: Mon Dec 01 2025 - 06:06:40 EST


On Wed, Nov 26, 2025 at 02:09:05AM +0000, Stanislav Kinsburskii wrote:
> Refactor memory region management functions from mshv_root_main.c into
> mshv_regions.c for better modularity and code organization.
>
> Adjust function calls and headers to use the new implementation. Improve
> maintainability and separation of concerns in the mshv_root module.
>
> Signed-off-by: Stanislav Kinsburskii <skinsburskii@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/hv/Makefile | 2
> drivers/hv/mshv_regions.c | 175 +++++++++++++++++++++++++++++++++++++++++++
> drivers/hv/mshv_root.h | 10 ++
> drivers/hv/mshv_root_main.c | 176 +++----------------------------------------
> 4 files changed, 198 insertions(+), 165 deletions(-)
> create mode 100644 drivers/hv/mshv_regions.c
>
> diff --git a/drivers/hv/Makefile b/drivers/hv/Makefile
> index 58b8d07639f3..46d4f4f1b252 100644
> --- a/drivers/hv/Makefile
> +++ b/drivers/hv/Makefile
> @@ -14,7 +14,7 @@ hv_vmbus-y := vmbus_drv.o \
> hv_vmbus-$(CONFIG_HYPERV_TESTING) += hv_debugfs.o
> hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o hv_utils_transport.o
> mshv_root-y := mshv_root_main.o mshv_synic.o mshv_eventfd.o mshv_irq.o \
> - mshv_root_hv_call.o mshv_portid_table.o
> + mshv_root_hv_call.o mshv_portid_table.o mshv_regions.o
> mshv_vtl-y := mshv_vtl_main.o
>
> # Code that must be built-in
> diff --git a/drivers/hv/mshv_regions.c b/drivers/hv/mshv_regions.c
> new file mode 100644
> index 000000000000..35b866670840
> --- /dev/null
> +++ b/drivers/hv/mshv_regions.c

How about mshv_mem_regions.c?

Nevertheless:

Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@xxxxxxxxxxxxx>