Linux-HyperV List
 help / color / mirror / Atom feed
From: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
To: Anirudh Rayabharam <anirudh@anirudhrb.com>
Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, longli@microsoft.com,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mshv: handle gpa intercepts for arm64
Date: Mon, 5 Jan 2026 09:04:02 -0800	[thread overview]
Message-ID: <aVvvAlsohGEdC6Wv@skinsburskii.localdomain> (raw)
In-Reply-To: <20260105122837.1083896-3-anirudh@anirudhrb.com>

On Mon, Jan 05, 2026 at 12:28:37PM +0000, Anirudh Rayabharam wrote:
> From: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
> 
> 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.

Thanks,
Stanislav

> Signed-off-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
> ---
>  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
> 

  reply	other threads:[~2026-01-05 17:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 12:28 [PATCH v2 0/2] Fixes for movable pages Anirudh Rayabharam
2026-01-05 12:28 ` [PATCH v2 1/2] hyperv: add definitions for arm64 gpa intercepts Anirudh Rayabharam
2026-01-05 16:06   ` vdso
2026-01-05 19:27     ` Anirudh Rayabharam
2026-01-05 19:44       ` mrathor
2026-01-05 17:01   ` Stanislav Kinsburskii
2026-01-05 12:28 ` [PATCH v2 2/2] mshv: handle gpa intercepts for arm64 Anirudh Rayabharam
2026-01-05 17:04   ` Stanislav Kinsburskii [this message]
2026-01-06  7:21     ` Anirudh Rayabharam
2026-01-06 16:36       ` Stanislav Kinsburskii
2026-01-06 18:59         ` Nuno Das Neves
2026-01-07  7:35         ` Anirudh Rayabharam
2026-01-15  7:31 ` [PATCH v2 0/2] Fixes for movable pages Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aVvvAlsohGEdC6Wv@skinsburskii.localdomain \
    --to=skinsburskii@linux.microsoft.com \
    --cc=anirudh@anirudhrb.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox