From: Ajay Garg <ajaygargnsit@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
iommu@lists.linux-foundation.org, kvm@vger.kernel.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: Queries regarding consolidated picture of virtualization and SPT/EPT/IOMMU/DMAR/PT
Date: Wed, 20 Nov 2024 21:50:18 +0530 [thread overview]
Message-ID: <CAHP4M8WMELcT8G1p7o5khEn5B9X+0UBkEMiScu9eD89qdpUbrw@mail.gmail.com> (raw)
In-Reply-To: <CAHP4M8VxL3GJx0Ofhk4_AToD-J0X+_20QmfZpq06DuN4CKc15w@mail.gmail.com>
Hi everyone.
Will be grateful for some insight if I am on the right path :)
On Mon, Nov 18, 2024 at 11:30 PM Ajay Garg <ajaygargnsit@gmail.com> wrote:
>
> 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
prev parent reply other threads:[~2024-11-20 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 18:00 Ajay Garg
2024-11-20 16:20 ` Ajay Garg [this message]
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=CAHP4M8WMELcT8G1p7o5khEn5B9X+0UBkEMiScu9eD89qdpUbrw@mail.gmail.com \
--to=ajaygargnsit@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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