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:17:16 +0100 Message-ID: <546F577C.6080207@suse.com> References: <546F4E86.8060801@suse.com> <546F60470200007800049D06@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrpxW-0006ze-Sr for xen-devel@lists.xenproject.org; Fri, 21 Nov 2014 15:17:18 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 66282ABE2 for ; Fri, 21 Nov 2014 15:17:17 +0000 (UTC) In-Reply-To: <546F60470200007800049D06@suse.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: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 11/21/2014 03:54 PM, Jan Beulich wrote: >>>> On 21.11.14 at 15:39, wrote: >> 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's wrong with this large an address? 32-bit PV uses PAE, i.e. > can map them. If the kernel isn't capable of that that's not > something to make Xen (or the tools) refuse such assignments. I > would only see an issue if a hypercall interface involved here isn't > using wide enough fields (but these addresses should be read > from the BARs, i.e. no hypercall involved). The MFN format is part of the pv-ABI. And a MFN of a 32-bit pv-guest is only 32 bits (even if don't take the invalid bit into account). Should a pv-guest really be capable to map an address outside it's accessible MFN-range? Are the tools capable of processing such a mapping in case of saving the domain? Juergen