On 16.07.2022 16:56, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com> > > Rework Arm implementation to store grant table frame GFN > in struct page_info directly instead of keeping it in > standalone status/shared arrays. This patch is based on > the assumption that a grant table page is a xenheap page. > > To cover 64-bit/40-bit IPA on Arm64/Arm32 we need the space > to hold 52-bit/28-bit + extra bit value respectively. In order > to not grow the size of struct page_info borrow the required > amount of bits from type_info's count portion which current > context won't suffer (currently only 1 bit is used on Arm).
I'm afraid this isn't true: There's no requirement for a guest to pass all different GFNs to VCPUOP_register_vcpu_info, yet map_vcpu_info() tries to obtain a reference for every vCPU. With my adding of GFN (really gaddr) based registration of the runstate area (already looking towards 4.18) the maximum possible count is to further grow. I guess this went unnoticed because Linux presumably uses different GFNs for every vCPU, so the issue doesn't surface. But I'm afraid this is a regression (unless I'm overlooking something, perhaps a mitigating factor) which wants fixing for 4.17. Jan