All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, Chris Wright <chrisw@redhat.com>,
	"Kay,  Allen M" <allen.m.kay@intel.com>,
	Ben-Ami Yassour1 <benami@il.ibm.com>,
	Andrea Arcangeli <andrea@qumranet.com>
Subject: Re: [RFC] [VTD][patch 1/3] vt-d support for pci passthrough: kvm-vtd--kernel.patch
Date: Wed, 07 May 2008 14:22:16 -0500	[thread overview]
Message-ID: <48220168.3050907@codemonkey.ws> (raw)
In-Reply-To: <4821434E.20504@qumranet.com>

Avi Kivity wrote:
> Anthony Liguori wrote:
>
>   
>>> What should be done for unmodified guest where there is no PV driver in
>>> the guest?  Would a call to mlock() from
>>> qemu/hw/pci-passthrough.c/add_pci_passthrough_device() a reasonable
>>> thing to do?
>>>       
>>
>> Yup.  The idea is to ensure that the memory is always present, 
>> without necessarily taking a reference to it.  This allows for memory 
>> reclaiming which should allow for things like NUMA page migration.  
>> We can't swap of course but that doesn't mean reclaimation isn't useful.
>>   
>
> I don't think we can do page migration with VT-d.  You need to be able 
> to detect whether the page has been changed by dma after you've copied 
> it but before you changed the pte, but VT-d doesn't allow that AFAICT.

Hrm, I would have to look at the VT-d but I suspect you're right.  
That's unfortunate.

That means mlock() isn't sufficient.  It also means that the VMAs can't 
be updated while the guest is running.  Is there any way to lock a vma 
region such that things like madvise/mmap(MAP_FIXED) will always fail?

Regards,

Anthony Liguori



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-05-07 19:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 21:36 [RFC] [VTD][patch 1/3] vt-d support for pci passthrough: kvm-vtd--kernel.patch Kay, Allen M
2008-05-06  7:37 ` Amit Shah
2008-05-06 22:01   ` Kay, Allen M
2008-05-06 10:34 ` Avi Kivity
2008-05-07  0:31 ` Anthony Liguori
2008-05-07  0:47   ` Kay, Allen M
2008-05-07  1:56     ` Anthony Liguori
2008-05-07  5:51       ` Avi Kivity
2008-05-07 19:22         ` Anthony Liguori [this message]
2008-05-11 15:31           ` Avi Kivity
2008-05-11  8:53 ` Muli Ben-Yehuda

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=48220168.3050907@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=allen.m.kay@intel.com \
    --cc=andrea@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=benami@il.ibm.com \
    --cc=chrisw@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.