All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Rafal Wojtczuk <rafal@invisiblethingslab.com>,
	xen-devel@lists.xensource.com,
	Joanna Rutkowska <joanna@invisiblethingslab.com>,
	Jan Beulich <JBeulich@novell.com>,
	Konrad Wilk <konrad.wilk@oracle.com>
Subject: Re: Assigning contiguous memory to a driver domain
Date: Mon, 20 Sep 2010 17:45:49 -0700	[thread overview]
Message-ID: <4C98003D.8050609@goop.org> (raw)
In-Reply-To: <5bdf8acc-99ad-47a9-abe4-467b9a3fd9ca@default>

 On 09/20/2010 04:42 PM, Dan Magenheimer wrote:
>>  On 09/20/2010 02:41 PM, Konrad Rzeszutek Wilk wrote:
>>> On Mon, Sep 20, 2010 at 01:27:24PM -0700, Jeremy Fitzhardinge wrote:
>>>>  On 09/20/2010 12:48 PM, Konrad Rzeszutek Wilk wrote:
>>>>> Let me expand this. During bootup Xen-SWIOTLB  (which for DomU you
>> have
>>>>> to enable via the 'iommu=soft'), allocated 32 2MB chunks of
>> contingous
>>>>> memory under the 4GB limit. Those chunks stay in DomU and are used
>>>>> during the the runtime of the DomU. They don't go back to Xen
>> unless the
>>>>> domain has been terminated. Any of the DMA operations that any
>> driver
>>>>> does go through the SWIOTLB bufer if the physical (mfn) for the DMA
>> is
>>>>> outside the driver capabilities (say, your ping buffer is allocated
>> above
>>>>> the 4GB, and your r8169 can only do 32-bit, then SWIOTLB would be
>> utilized
>>>>> to "bounce" the memory).
>>>> BTW, are there any hooks to make sure these pages are still
>> contiguous
>>>> after migration/restore?
>>> <shudders>I don't really know. We do save the P2M map, so those
>> mappings
>>> are saved in the guest. But for the MFNs that have been exchanged - I
>> don't
>>> believe the hypervior is notified about which MFNs have been
>> transfered
>>> to another domain? Or these MFNs extracted during save/resume
>> On save the toolstack will rewrite all the mfns in the pagetables and
>> the p2m map to canonical pfn form, then rewrite them back to mfns on
>> resume when it has allocated pages for them all.  I don't believe
>> there's any mechanism to remember what regions were mfn-contiguous and
>> restore that on resume.
> I may be too far behind on this thread, but aren't we only talking about
> driver domains with passthrough?   Is it even possible to migrate
> driver domains yet?

Not with devices attached.  But there should be no problem in principle
with detaching all the devices, migrating, the reattaching everything.

    J

  reply	other threads:[~2010-09-21  0:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  9:24 Assigning contiguous memory to a driver domain Rafal Wojtczuk
2010-09-14  9:36 ` Jan Beulich
2010-09-15  9:08   ` Rafal Wojtczuk
2010-09-15  9:39     ` Rafal Wojtczuk
2010-09-15  9:50       ` Jan Beulich
2010-09-15 10:42         ` Joanna Rutkowska
2010-09-15 10:59           ` Jan Beulich
2010-09-15 11:07             ` Joanna Rutkowska
2010-09-15 11:50               ` Jan Beulich
2010-09-15 11:58                 ` Goswin von Brederlow
2010-09-15 12:06                   ` Rafal Wojtczuk
2010-09-15 13:49                     ` Jan Beulich
2010-09-15 14:44                       ` Rafal Wojtczuk
2010-09-15 15:29                         ` Jan Beulich
2010-09-20 19:48                           ` Konrad Rzeszutek Wilk
2010-09-20 20:27                             ` Jeremy Fitzhardinge
2010-09-20 21:41                               ` Konrad Rzeszutek Wilk
2010-09-20 21:55                                 ` Jeremy Fitzhardinge
2010-09-20 23:42                                   ` Dan Magenheimer
2010-09-21  0:45                                     ` Jeremy Fitzhardinge [this message]
2010-09-21  8:04                                       ` Tim Deegan
2010-09-21 11:28                             ` Joanna Rutkowska
2010-09-21 14:34                               ` Konrad Rzeszutek Wilk
2010-09-15 19:25                     ` Goswin von Brederlow

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=4C98003D.8050609@goop.org \
    --to=jeremy@goop.org \
    --cc=JBeulich@novell.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=joanna@invisiblethingslab.com \
    --cc=konrad.wilk@oracle.com \
    --cc=rafal@invisiblethingslab.com \
    --cc=xen-devel@lists.xensource.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 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.