]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mshv: Centralize guest memory region destruction
authorStanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Wed, 3 Dec 2025 21:40:45 +0000 (21:40 +0000)
committerWei Liu <wei.liu@kernel.org>
Fri, 5 Dec 2025 23:20:16 +0000 (23:20 +0000)
commit6f6aed2c497e8d80d8ed6b5a87c6f65dc7548b8f
tree0f73f911024a4948fda0841e9ccb7f9e0b535e20
parentdf4ff5f6cf7864714d66c65ec7df582240a596a4
mshv: Centralize guest memory region destruction

Centralize guest memory region destruction to prevent resource leaks and
inconsistent cleanup across unmap and partition destruction paths.

Unify region removal, encrypted partition access recovery, and region
invalidation to improve maintainability and reliability. Reduce code
duplication and make future updates less error-prone by encapsulating
cleanup logic in a single helper.

Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_root_main.c