mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>
To: Mukesh R <mrathor@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux.dev, linux-arch@vger.kernel.org,
	easwar.hariharan@linux.microsoft.com, jgg@nvidia.com,
	jacob.pan@linux.microsoft.com, haiyangz@microsoft.com,
	wei.liu@kernel.org, decui@microsoft.com, tglx@kernel.org,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	x86@kernel.org, hpa@zytor.com, joro@8bytes.org, will@kernel.org,
	robin.murphy@arm.com, arnd@arndb.de
Subject: Re: [PATCH V4 4/5] iommu/hyperv: Only call pviommu init on non-root VMs
Date: Wed, 4 Nov 2026 20:34:32 -0800	[thread overview]
Message-ID: <9558730f-42d5-4d90-8fe8-f6d1c150164f@linux.microsoft.com> (raw)
In-Reply-To: <20261105020106.3496339-5-mrathor@linux.microsoft.com>

On 11/4/2026 18:01, Mukesh R wrote:
> Next patch introduces root iommu init. Since both can co-exist, set
> x86 iommu_init to pviommu init only on non-root VMs. Also, rename
> hv_iommu_init() to hv_pviommu_init().

[...]Lastly, check for null iommu_init
> before assignement as suggested by one of the pviommu authors.

You no longer do this below. Also, please wait a week or so before spinning
a new revision to collect additional comments.

With that fixed,

Reviewed-by: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>

> 
> Signed-off-by: Mukesh R <mrathor@linux.microsoft.com>
> ---
>  arch/x86/hyperv/hv_init.c             | 3 ++-
>  arch/x86/include/asm/mshyperv.h       | 2 +-
>  drivers/iommu/hyperv/hv-iommu-guest.c | 2 +-
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> index b90e6f487533..ea50708c3ae6 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -580,7 +580,8 @@ void __init hyperv_init(void)
>  	x86_init.timers.setup_percpu_clockev = hv_stimer_setup_percpu_clockev;
>  
>  #ifdef CONFIG_HYPERV_PVIOMMU
> -	x86_init.iommu.iommu_init = hv_iommu_init;
> +	if (!hv_root_partition())
> +		x86_init.iommu.iommu_init = hv_pviommu_init;
>  #endif
>  
>  	hv_apic_init();
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 24b19cd28a05..c95d75ae645e 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -320,7 +320,7 @@ static inline void __mshv_vtl_return_call(struct mshv_vtl_cpu_context *vtl0) {}
>  #endif
>  
>  #ifdef CONFIG_HYPERV_PVIOMMU
> -int __init hv_iommu_init(void);
> +int __init hv_pviommu_init(void);
>  #endif
>  
>  #include <asm-generic/mshyperv.h>
> diff --git a/drivers/iommu/hyperv/hv-iommu-guest.c b/drivers/iommu/hyperv/hv-iommu-guest.c
> index 876a22f21f1e..a40a8ceb3261 100644
> --- a/drivers/iommu/hyperv/hv-iommu-guest.c
> +++ b/drivers/iommu/hyperv/hv-iommu-guest.c
> @@ -601,7 +601,7 @@ hv_init_iommu_device(struct hv_iommu_dev *hv_iommu,
>  	hv_iommu_device = hv_iommu;
>  }
>  
> -int __init hv_iommu_init(void)
> +int __init hv_pviommu_init(void)
>  {
>  	u64 status;
>  	int ret = 0;


  reply	other threads:[~2026-11-05  4:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  2:01 [PATCH V4 0/5] Hyper-V: root VM iommu kernel only driver Mukesh R
2026-11-05  2:01 ` [PATCH V4 1/5] mshv: Add gfp flags to deposit memory logic Mukesh R
2026-11-05  4:51   ` Easwar Hariharan
2026-11-05  2:01 ` [PATCH V4 2/5] PCI: hv: Export hv_build_devid_type_pci() and change return type Mukesh R
2026-11-05  2:01 ` [PATCH V4 3/5] mshv: Import data structs around device domains from hyperv headers Mukesh R
2026-11-05  2:01 ` [PATCH V4 4/5] iommu/hyperv: Only call pviommu init on non-root VMs Mukesh R
2026-11-05  4:34   ` Easwar Hariharan [this message]
2026-11-05  2:01 ` [PATCH V4 5/5] x86/hyperv: Implement root partition IOMMU kernel only driver Mukesh R

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=9558730f-42d5-4d90-8fe8-f6d1c150164f@linux.microsoft.com \
    --to=easwar.hariharan@linux.microsoft.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.pan@linux.microsoft.com \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mrathor@linux.microsoft.com \
    --cc=robin.murphy@arm.com \
    --cc=tglx@kernel.org \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    --cc=x86@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

all inboxes | Powered by JetHome®