From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [RFC PATCH 14/16]: PVH xen: add xenmem_add_foreign_to_pmap() Date: Mon, 11 Feb 2013 18:18:24 -0800 Message-ID: <20130211181824.169b9d05@mantra.us.oracle.com> References: <20130111181103.5bfeed98@mantra.us.oracle.com> <20130124173118.GN20551@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130124173118.GN20551@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, 24 Jan 2013 17:31:18 +0000 Tim Deegan wrote: > At 18:11 -0800 on 11 Jan (1357927863), Mukesh Rathor wrote: > > > + /* qemu, running on PVH dom0, mapping hvm domain's io pages > > during domain > > + * creation, doesn't have mfns in the HAP table */ > > + if ( !mfn_valid(mfn) && p2m_is_mmio(p2mt) ) { > > This test should be for == p2m_mmio_direct; we don't want to try > mapping p2m_mmio_dm areas. Yup. Done. > > + if (!is_hvm_domain(fdom)) { > > + printk("mmio type for non-hvm domain. fd:%d fgmfn:%lx > > gpfn:%lx\n", > > + foreign_domid, fgmfn, gpfn); > > + return -EINVAL; > > + } > > + mfn = fgmfn; /* map 1 to 1 */ > > Surely not -- you want to map the _actual_ MMIO range, right, not just > whatever GFN-address the foreigh domain mapped it at? Actually, fgmfn here is the machine address of the mmio page. Removed the "map 1 to 1" comment. thanks, Mukesh