linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Queries regarding consolidated picture of virtualization and SPT/EPT/IOMMU/DMAR/PT
@ 2024-11-18 18:00 Ajay Garg
  2024-11-20 16:20 ` Ajay Garg
  0 siblings, 1 reply; 2+ messages in thread
From: Ajay Garg @ 2024-11-18 18:00 UTC (permalink / raw)
  To: Linux Kernel Mailing List, iommu, kvm, Linux Memory Management List

Hi everyone.

I understand in a para-virtualization environment, VMM maintains a
shadow-page-table (SPT) per process per guest, for GVA => HPA
translation. The hardware/MMU is passed a single pointer to this
shadow-page-table. The guest is aware that it is running in a
virtualization environment, and communicates with VMM to help maintain
the shadow-page-table.

In full-virtualization/HVM virtualization, the guest is unaware that
it is running in a virtualized environment, and all GVA => GPA are
private. The VMM is obviously aware of all HVA => HPA mappings; plus
GPA => HVA is trivial as it's only an offset difference (Extended Page
Table, EPT). The hardware/MMU is passed three things :

        * Pointer to guest page-table, for GVA => GPA.
        * Offset, for GPA => HVA.
        * Pointer to host page-table, for HVA => HPA.

In both the above cases, DMA is a challenge (without IOMMU), as
device-addresses would need to be physically-contiguous. This would in
turn mean that all of  GPA needs to be physically-contiguous, which in
turn means that the host would need to spawn guest-process with all of
memory (HVA) which is physically-contiguous - very hard to meet
generally.

*_Kindly correct me if I have made a mistake so far at conceptual level._*


Now, enters IOMMU, providing the ability to DMA with non-contiguous
device-addresses.
Now, my queries are simple :

*
Is IOMMU DMA-Remapping mode (DMAR) analogous to a para-virtualization
environment (as per previous brief context)?

*
Is IOMMU Pass-through (PT) mode analogous to a HVM environment (as per
previous brief context)?


Many thanks in advance for your time; hopefully I have not been a
complete idiot ..


Thanks and Regards,
Ajay


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-20 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-18 18:00 Queries regarding consolidated picture of virtualization and SPT/EPT/IOMMU/DMAR/PT Ajay Garg
2024-11-20 16:20 ` Ajay Garg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox