From: Yu Zhang <zhangyu1@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"wei.liu@kernel.org" <wei.liu@kernel.org>,
"kys@microsoft.com" <kys@microsoft.com>,
"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
"decui@microsoft.com" <decui@microsoft.com>,
"longli@microsoft.com" <longli@microsoft.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"will@kernel.org" <will@kernel.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"kwilczynski@kernel.org" <kwilczynski@kernel.org>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"mani@kernel.org" <mani@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
"jacob.pan@linux.microsoft.com" <jacob.pan@linux.microsoft.com>,
"tgopinath@linux.microsoft.com" <tgopinath@linux.microsoft.com>,
"easwar.hariharan@linux.microsoft.com"
<easwar.hariharan@linux.microsoft.com>,
"mrathor@linux.microsoft.com" <mrathor@linux.microsoft.com>
Subject: Re: [PATCH v2 3/4] iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest
Date: Tue, 14 Jul 2026 11:34:21 +0800 [thread overview]
Message-ID: <r35cz2l3yz2wyi5d663mxwqoiz2rrl6kzpiw6rsruh7ofk6vu6@temnhcfsp6fa> (raw)
In-Reply-To: <SN6PR02MB41575E067DFEBEACF316CD35D4FA2@SN6PR02MB4157.namprd02.prod.outlook.com>
On Mon, Jul 13, 2026 at 05:37:51PM +0000, Michael Kelley wrote:
> From: Yu Zhang <zhangyu1@linux.microsoft.com> Sent: Monday, July 13, 2026 9:46 AM
> >
> > On Sat, Jul 11, 2026 at 06:31:15PM +0000, Michael Kelley wrote:
> > > From: Yu Zhang <zhangyu1@linux.microsoft.com> Sent: Friday, July 10, 2026 12:34 AM
>
> [snip]
>
> > >
> > > One new thought: Have you considered the hibernate/resume
> > > cycle? Does anything need to be done with the pvIOMMU to
> > > make it functional again after resume? I see that the Intel and
> > > AMD IOMMU drivers have suspend and resume functions. I
> > > don't know enough about the Hyper-V pvIOMMU to know if it
> > > might also need suspend and resume functions.
> > >
> >
> > Thanks for raising this, Michael. We have not considered such support.
> >
> > My understanding is that the Intel and AMD drivers only disable the
> > IOMMU translation, flush the IOTLB during the suspend and re-enable/
> > reload the preserved root tables and other HW state during in the
> > resueme.
> >
> > But for pvIOMMU, I guess such job shall be done by the hypervisor?
> > For a device resumed on the same VM, its logical device ID should
> > also remain unchanged? And the corresponding Hyper-V domain objects,
> > configuration, and device attachments shall be preserved and restored
> > by hypervisor? I don't think the current Hyper-V ABI explicitly defines
> > this. But maybe if we want such feature, it could be done by the
> > hypervisor transparently?
> >
>
> I agree with your and Jacob's comments that the guest doesn't have
> any responsibility for saving/restoring IOMMU hardware state, as the
> Intel and AMD IOMMU drivers do.
>
> But yes, I'm wondering about the Hyper-V domain objects and device
> attachments. I doubt Hyper-V can do anything to save and restore
> them. Hibernation is a Linux concept that the Hyper-V host doesn't
> know anything about.
>
> Hibernation is already complicated, and in a VM it is even worse. :-(
> As a start, see Documentation/virt/hyperv/hibernation.rst, which I
> wrote about 18 months ago. It provides some basics as well as outlines
> the additional complexity in a Hyper-V guest VM. I'll also try to spend
> some time thinking through the implications for a pvIOMMU, and let
> you know if I have any more thoughts.
>
Thank you, Michael, and thanks for pointing us to the documentation. I
need some time to better understand the Linux guest hibernation and resume
flow and its implications for pvIOMMU.
Meanwhile, do you think this limitation should be documented in the
commit message or the cover letter?
B.R.
Yu
> Michael
next prev parent reply other threads:[~2026-07-14 3:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 16:05 [PATCH v2 0/4] Hyper-V: Add para-virtualized IOMMU support for Linux guests Yu Zhang
2026-07-02 16:05 ` [PATCH v2 1/4] hyperv: Introduce new hypercall interfaces used by Hyper-V guest IOMMU Yu Zhang
2026-07-07 21:10 ` Mukesh R
2026-07-09 19:06 ` Michael Kelley
2026-07-10 6:17 ` Yu Zhang
2026-07-02 16:05 ` [PATCH v2 2/4] Drivers: hv: Add logical device ID registry for vPCI devices Yu Zhang
2026-07-08 2:52 ` Michael Kelley
2026-07-08 13:08 ` Yu Zhang
2026-07-08 13:28 ` Michael Kelley
2026-07-09 11:33 ` Yu Zhang
2026-07-02 16:05 ` [PATCH v2 3/4] iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest Yu Zhang
2026-07-03 17:32 ` Jason Gunthorpe
2026-07-08 10:33 ` Yu Zhang
2026-07-06 16:55 ` Jacob Pan
2026-07-08 10:55 ` Yu Zhang
2026-07-07 0:08 ` Mukesh R
2026-07-07 14:48 ` Jacob Pan
2026-07-08 11:05 ` Yu Zhang
2026-07-07 21:17 ` Mukesh R
2026-07-08 11:12 ` Yu Zhang
2026-07-09 19:08 ` Michael Kelley
2026-07-10 7:34 ` Yu Zhang
2026-07-11 18:31 ` Michael Kelley
2026-07-13 16:13 ` Jacob Pan
2026-07-13 16:46 ` Yu Zhang
2026-07-13 17:37 ` Michael Kelley
2026-07-14 3:34 ` Yu Zhang [this message]
2026-07-14 15:29 ` Michael Kelley
2026-07-02 16:05 ` [PATCH v2 4/4] iommu/hyperv: Add page-selective IOTLB flush support Yu Zhang
2026-07-03 17:10 ` Jason Gunthorpe
2026-07-08 12:43 ` Yu Zhang
2026-07-09 19:08 ` Michael Kelley
2026-07-10 6:22 ` Yu Zhang
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=r35cz2l3yz2wyi5d663mxwqoiz2rrl6kzpiw6rsruh7ofk6vu6@temnhcfsp6fa \
--to=zhangyu1@linux.microsoft.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=decui@microsoft.com \
--cc=easwar.hariharan@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=iommu@lists.linux.dev \
--cc=jacob.pan@linux.microsoft.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kwilczynski@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mhklinux@outlook.com \
--cc=mrathor@linux.microsoft.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=tgopinath@linux.microsoft.com \
--cc=wei.liu@kernel.org \
--cc=will@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