]> git.ipfire.org Git - thirdparty/linux.git/commit
mshv: Ignore second stats page map result failure
authorPurna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Wed, 28 Jan 2026 18:11:40 +0000 (10:11 -0800)
committerWei Liu <wei.liu@kernel.org>
Wed, 4 Feb 2026 06:17:05 +0000 (06:17 +0000)
commit7538b80e5a4b473b73428d13b3a47ceaad9a8a7c
treecc4b9ac71665fdb680dc2a9e8addbf8e16d4d6a2
parent8d1294d4b54464a6b826709c871878c80e3c219e
mshv: Ignore second stats page map result failure

Older versions of the hypervisor do not have a concept of separate SELF
and PARENT stats areas. In this case, mapping the HV_STATS_AREA_SELF page
is sufficient - it's the only page and it contains all available stats.

Mapping HV_STATS_AREA_PARENT returns HV_STATUS_INVALID_PARAMETER which
currently causes module init to fail on older hypevisor versions.

Detect this case and gracefully fall back to populating
stats_pages[HV_STATS_AREA_PARENT] with the already-mapped SELF page.

Add comments to clarify the behavior, including a clarification of why
this isn't needed for hv_call_map_stats_page2() which always supports
PARENT and SELF areas.

Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Acked-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_root_hv_call.c
drivers/hv/mshv_root_main.c