From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: PCI-passthrough for 32 bit guests and high MMIO addresses Date: Fri, 21 Nov 2014 16:04:57 +0100 Message-ID: <546F5499.5000501@suse.com> References: <546F4E86.8060801@suse.com> <546F4FFF.1080101@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <546F4FFF.1080101@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 11/21/2014 03:45 PM, Andrew Cooper wrote: > On 21/11/14 14:39, Juergen Gross wrote: >> Hi, >> >> again a fallout from my "linear p2m list" tests: >> >> Trying to do PCI-passthrough with a 32-bit pv-domain I passed the >> wrong device to the domain. The MMIO address was too large for a >> MFN of a 32-bit system (it was 380003200000-3800036fffff). >> >> Instead of rejecting the operation Xen tried to perform it resulting >> in a (quite understandable) failure in the domU. >> >> I think either the hypervisor or the tools should refuse to do >> PCI-passthrough in this case. >> > > What actually goes wrong? Does the 32bit guest truncate the MMIO region > to 44 bits and try to map that? I think it is 42 bits (the top 2 bits of the MFN are the "identity" and "foreign" bits). > > I would completely agree that something (libxl?) should refuse this > attempt to do passthrough, but I think pci-front should also kick up a > fuss if it is able to detect this error. Indeed. Juergen