On 9/10/2025 4:14 PM, Nuno Das Neves wrote: > From: Jinank Jain <[email protected]> > > Introduce HVCALL_MAP_STATS_PAGE2 which provides a map location (GPFN) > to map the stats to. This hypercall is required for L1VH partitions, > depending on the hypervisor version. This uses the same check as the > state page map location; mshv_use_overlay_gpfn(). > > Add mshv_map_vp_state_page() helpers to use this new hypercall or the > old one depending on availability. > > For unmapping, the original HVCALL_UNMAP_STATS_PAGE works for both > cases. > > Signed-off-by: Jinank Jain <[email protected]> > Signed-off-by: Nuno Das Neves <[email protected]> > --- > drivers/hv/mshv_root.h | 10 ++-- > drivers/hv/mshv_root_hv_call.c | 89 ++++++++++++++++++++++++++++++++-- > drivers/hv/mshv_root_main.c | 25 ++++++---- > include/hyperv/hvgdk_mini.h | 1 + > include/hyperv/hvhdk_mini.h | 7 +++ > 5 files changed, 112 insertions(+), 20 deletions(-) > <snip>
> @@ -849,10 +850,13 @@ static void mshv_vp_stats_unmap(u64 partition_id, u32 > vp_index) > }; > > identity.vp.stats_area_type = HV_STATS_AREA_SELF; > - hv_call_unmap_stat_page(HV_STATS_OBJECT_VP, &identity); > + hv_unmap_stats_page(HV_STATS_OBJECT_VP, NULL, &identity); > + > + if (stats_pages[HV_STATS_AREA_PARENT] == > stats_pages[HV_STATS_AREA_SELF]) > + return; Nit, without patch 2, this hunk is a no-op. Despite that, looks good to me. Reviewed-by: Easwar Hariharan <[email protected]> > > identity.vp.stats_area_type = HV_STATS_AREA_PARENT; > - hv_call_unmap_stat_page(HV_STATS_OBJECT_VP, &identity); > + hv_unmap_stats_page(HV_STATS_OBJECT_VP, NULL, &identity); > } <snip>
