On 1/6/2026 8:36 AM, Stanislav Kinsburskii wrote: > On Tue, Jan 06, 2026 at 07:21:41AM +0000, Anirudh Rayabharam wrote: >> On Mon, Jan 05, 2026 at 09:04:02AM -0800, Stanislav Kinsburskii wrote: >>> On Mon, Jan 05, 2026 at 12:28:37PM +0000, Anirudh Rayabharam wrote: >>>> From: Anirudh Rayabharam (Microsoft) <[email protected]> >>>> >>>> The mshv driver now uses movable pages for guests. For arm64 guests >>>> to be functional, handle gpa intercepts for arm64 too (the current >>>> code implements handling only for x86). >>>> >>>> Move some arch-agnostic functions out of #ifdefs so that they can be >>>> re-used. >>>> >>>> Fixes: b9a66cd5ccbb ("mshv: Add support for movable memory regions") >>> >>> I'm not sure that this patch needs "Fixes" tag as it introduced new >>> functionality rather than fixing a bug. >> >> This does fix a bug. The commit mentioned here regressed arm64 guests because >> it didn't have GPA intercept handling for arm64. >> > > Were ARM guests functional before this commit? If yes, then I agree that > this patch fixes a bug. If no, then this is just adding new > functionality. > I had an impression ARM is not yet supported in MSHV, so please clarify. >
Chiming in, I had a similar discussion with Michael regarding correcting the value of VpRootDispatchThreadBlocked for ARM64: https://lore.kernel.org/linux-hyperv/sn6pr02mb41574240f18b87346c659dbfd4...@sn6pr02mb4157.namprd02.prod.outlook.com/T/#u Michael didn't see need for a separate patch for that fix (with "Fixes" tag, I assumed, though we didn't discuss it). This is because the code is currently not doing anything due to ARM64 not yet being supported. Keep in mind adding a "Fixes" tag marks the patch for backporting to LTS kernels (if the original patch is in one of those, of course). There is no need for such backporting as it has no impact for features that do not yet exist. This 'fix' is really a precursor for ARM64 support, and we don't have a special way of tagging those. I can see that "Fixes" may help someone who is backporting entire features to help them identify dependencies (e.g. backporting ARM64 support), but the benefit of that is conjectural so I don't see it as a strong enough reason given the above. Nuno > Thanks, > Stanislav > >> Thanks, >> Anirudh. >> >>> >>> Thanks, >>> Stanislav >>> >>>> Signed-off-by: Anirudh Rayabharam (Microsoft) <[email protected]> >>>> --- >>>> drivers/hv/mshv_root_main.c | 15 ++++++++------- >>>> 1 file changed, 8 insertions(+), 7 deletions(-) >>>> >>>> diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c >>>> index 9cf28a3f12fe..f8c4c2ae2cc9 100644 >>>> --- a/drivers/hv/mshv_root_main.c >>>> +++ b/drivers/hv/mshv_root_main.c >>>> @@ -608,7 +608,6 @@ mshv_partition_region_by_gfn(struct mshv_partition >>>> *partition, u64 gfn) >>>> return NULL; >>>> } >>>> >>>> -#ifdef CONFIG_X86_64 >>>> static struct mshv_mem_region * >>>> mshv_partition_region_by_gfn_get(struct mshv_partition *p, u64 gfn) >>>> { >>>> @@ -640,12 +639,17 @@ static bool mshv_handle_gpa_intercept(struct mshv_vp >>>> *vp) >>>> { >>>> struct mshv_partition *p = vp->vp_partition; >>>> struct mshv_mem_region *region; >>>> - struct hv_x64_memory_intercept_message *msg; >>>> bool ret; >>>> u64 gfn; >>>> - >>>> - msg = (struct hv_x64_memory_intercept_message *) >>>> +#if defined(CONFIG_X86_64) >>>> + struct hv_x64_memory_intercept_message *msg = >>>> + (struct hv_x64_memory_intercept_message *) >>>> + vp->vp_intercept_msg_page->u.payload; >>>> +#elif defined(CONFIG_ARM64) >>>> + struct hv_arm64_memory_intercept_message *msg = >>>> + (struct hv_arm64_memory_intercept_message *) >>>> vp->vp_intercept_msg_page->u.payload; >>>> +#endif >>>> >>>> gfn = HVPFN_DOWN(msg->guest_physical_address); >>>> >>>> @@ -663,9 +667,6 @@ static bool mshv_handle_gpa_intercept(struct mshv_vp >>>> *vp) >>>> >>>> return ret; >>>> } >>>> -#else /* CONFIG_X86_64 */ >>>> -static bool mshv_handle_gpa_intercept(struct mshv_vp *vp) { return false; >>>> } >>>> -#endif /* CONFIG_X86_64 */ >>>> >>>> static bool mshv_vp_handle_intercept(struct mshv_vp *vp) >>>> { >>>> -- >>>> 2.34.1 >>>>
