RE: [PATCH v4 1/3] mshv: limit SynIC management to MSHV-owned resources

Jork Loeser
2026-05-05T11:35:48Z

On Mon, 4 May 2026, Michael Kelley wrote:

> From: Jork Loeser <jloeser@linux.microsoft.com> Sent: Monday, April 27, 2026 2:39 PM
>>
>> While here, fix the SIEFP and SIRBP memremap() and virt_to_phys()
>> calls to use HV_HYP_PAGE_SHIFT/HV_HYP_PAGE_SIZE instead of
>> PAGE_SHIFT/PAGE_SIZE. The hypervisor always uses 4K pages for SynIC
>> register GPAs regardless of the kernel page size, so using PAGE_SHIFT
>> produces wrong addresses on ARM64 with 64K pages.
>
> I agree that this is a good change. But any kernel image built with
> CONFIG_MSHV_ROOT set must use only 4KiB pages, as enforced
> by the dependency in drivers/hv/Kconfig. The change makes the
> code explicitly match the SynIC register layout, which is good,
> but it doesn't actually fix a problem since root MSHV code can't
> run on ARM64 with 64KiB pages. My only concern is that this
> commit message should not imply that an ARM64/64KiB
> configuration is possible for the root.

Agree for root. For L1VH, I think it theoretically could (likely with
other changes needing to happen elsewhere).

Best,
Jork