From: Yu Zhang <[email protected]> Sent: Monday, July 13, 2026 9:46 AM > > On Sat, Jul 11, 2026 at 06:31:15PM +0000, Michael Kelley wrote: > > From: Yu Zhang <[email protected]> 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. Michael

