public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben-Ami Yassour <benami@il.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: amit.shah@qumranet.com, weidong.han@intel.com,
	Muli Ben-Yehuda <MULI@il.ibm.com>,
	raharper@us.ibm.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: PCIPT: VT-d: fix guest unmap
Date: Wed, 18 Jun 2008 15:06:51 +0300	[thread overview]
Message-ID: <1213790811.9177.19.camel@lnx-benami> (raw)
In-Reply-To: <48582CD0.5060109@codemonkey.ws>

On Tue, 2008-06-17 at 16:29 -0500, Anthony Liguori wrote:
> I think the current VT-d code needs some reworking.
> 
> We should build the table as the shadow page table gets built.  We 
> should suppress iotlb flushes unless the table is actually being updated.
> 

I'm not sure what you mean.
The current implementation of vtd for passthrough is a direct map, which
means that we map the entire guest memory (and pin it).
In this case there are no iotlb flushes after the first initialization.

Obviously, pinning the entire guest is not desirable since we waste a
lot of memory resources, but this is the approach that we currently
have. Do you find it good enough for a merge with the main KVM tree, and
optimize later?

When you mentioned building a table as the shadow page table, did you
mean that we should map the IOMMU on demand?
I'm not sure how we can do that... the guest can send a guest physical
address to the device for DMA, even without generating a page-fault on
the host for that address... which implies that the host must pin the
entire guest memory in advance. agree?

The only way I can think of avoiding that is PVDMA with VT-d, which
means that there is a hyper call for each DMA request, but this is a
different solution, cause it only applies to PV guests.

Do you see a way to avoid mapping (and pinning) the entire guest memory
for fully virtual guests (and without parsing every transaction between
the guest and the device to figure out the DMA addresses)?

Regards,
Ben

> Regards,
> 
> Anthony Liguori
> 



  reply	other threads:[~2008-06-18 12:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 19:05 Patches for vtd pci passthrough benami
2008-06-17 19:05 ` [PATCH] KVM: PCIPT: fix compilation errors benami
2008-06-17 19:05   ` [PATCH] KVM: PCIPT: VT-d: fix guest unmap benami
2008-06-17 19:05     ` [PATCH] KVM: PCIPT: free device structure on vm destroy benami
2008-06-17 19:05       ` [PATCH] KVM: PCIPT: VT-d: fix context mapping benami
2008-06-17 19:25         ` KVM: PCIPT: temporary fix for pio (userspace part) benami
2008-06-17 19:25           ` [PATCH] " benami
2008-06-18 20:30         ` [PATCH] KVM: PCIPT: VT-d: fix context mapping Muli Ben-Yehuda
2008-06-19  8:59         ` Han, Weidong
2008-06-19 12:28           ` Ben-Ami Yassour
2008-06-19 14:18             ` Han, Weidong
2008-06-19 17:44               ` Ben-Ami Yassour1
2008-06-20  6:23                 ` Han, Weidong
2008-06-30 15:32                   ` Ben-Ami Yassour
2008-07-01  2:22                     ` Han, Weidong
2008-06-17 21:29     ` [PATCH] KVM: PCIPT: VT-d: fix guest unmap Anthony Liguori
2008-06-18 12:06       ` Ben-Ami Yassour [this message]
2008-06-18 20:48         ` Anthony Liguori
2008-06-18 21:23           ` Muli Ben-Yehuda
2008-06-18 21:41             ` Anthony Liguori
2008-06-20 18:59       ` Avi Kivity
2008-06-20 19:28         ` Anthony Liguori

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=1213790811.9177.19.camel@lnx-benami \
    --to=benami@il.ibm.com \
    --cc=MULI@il.ibm.com \
    --cc=amit.shah@qumranet.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    --cc=raharper@us.ibm.com \
    --cc=weidong.han@intel.com \
    /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