From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH][VT-d] Dis-allow PCI device assignment if PoD is enabled Date: Fri, 22 Jan 2010 12:17:26 +0000 Message-ID: References: <6CADD16F56BC954D8E28F3836FA7ED711313B899A0@shzsmsx501.ccr.corp.intel.com> <4B585A7D.9000905@eu.citrix.com> <4FA716B1526C7C4DB0375C6DADBC4EA342A82FAB47@LONPMAILBOX01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4FA716B1526C7C4DB0375C6DADBC4EA342A82FAB47@LONPMAILBOX01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: "Xu, Dongxiao" , "xen-devel@lists.xensource.com" , "Han, Weidong" , Fraser , "Cui, Dexuan" List-Id: xen-devel@lists.xenproject.org On Thu, Jan 21, 2010 at 6:02 PM, Ian Pratt wrote: > In many/most cases the device will not be in use that early in boot, so i= t's a bit annoying to have to do maintain the IOMMU pagetables through PoD,= but unavoidable. The key thing is that we only have to do it for domains t= hat actually have devices passed-through. At the moment, I can't imagine how IOMMU/VT-d can interact well with PoD during boot, before the balloon driver gets in and does its thing. It's guaranteed during that time that a high percentage of the memory which the guest thinks it has free will be not-present in the p2m. There's no way we can predict which gfns will be passed to the device; having been zeroed (and thus populated) is no help, since a non-negligible percentage of zeroed pages will need to be reclaimed for the PoD pool again anyway. If it really is true that devices aren't used during boot, then we could simply have the balloon driver / the tools do a final "sync" once the "target" has been reached (and outstanding PoD entries =3D=3D size of PoD memory pool). Doing more than that (say, syncing on every p2m update) doesn't solve the problem (although I suppose it may be necessary to prevent corruption). -George