WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel][PATCH][VT-d] Dis-allow PCI device assignment if PoD is e

To: "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>
Subject: Re: [Xen-devel][PATCH][VT-d] Dis-allow PCI device assignment if PoD is enabled
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Thu, 21 Jan 2010 13:45:33 +0000
Cc: Keir, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, Fraser <Keir.Fraser@xxxxxxxxxxxxx>, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Delivery-date: Thu, 21 Jan 2010 05:46:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6CADD16F56BC954D8E28F3836FA7ED711313B899A0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <6CADD16F56BC954D8E28F3836FA7ED711313B899A0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
Seems like a good "seatbelt" for 4.0.

Looking forward, what would it take to make PoD and VT-d coexist? We only need PoD during boot, until the balloon driver comes up and balloons down the guest's memory. Three solutions come to mind, but as I don't know the constraints of VT-d, I don't know which is feasible (if any):
* Redo the VT-d mapping every time the p2m map changes as a result of PoD.
* While PoD pages exist, intercept device commands, and redo the VT-d map if the page was marked PoD the last time we updated the VT-d map * Detect DMA faults, instantiate the page if necessary, update the VT-d map, and re-start the transaction.

How expensive is it to change the VT-d pagetable? Is a DMA fault re-startable? i.e., could we take a fault, redo the VT-d map, and re-issue the DMA request?

-George

Xu, Dongxiao wrote:
It seems that currently we don't have any code to handle
the coexistence of VT-d and PoD. VT-d engine needs to set up
the entire page table for the domain. However if PoD is enabled,
un-populated memory is marked as populate_on_demand, and
VT-d engine won't set up page tables for them. Therefore any
DMA towards those memory may cause DMA fault.
        So for safety concern, its better to dis-allow PCI device
assignment if PoD is enabled.

Best Regards, -- Dongxiao


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel