From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 17/17] PVH xen: PVH dom0 creation.... Date: Tue, 14 May 2013 18:18:37 -0700 Message-ID: <20130514181837.0c3a8753@mantra.us.oracle.com> References: <1366752366-16594-1-git-send-email-mukesh.rathor@oracle.com> <1366752366-16594-18-git-send-email-mukesh.rathor@oracle.com> <5177C1E302000078000D042D@nat28.tlf.novell.com> <20130425181857.4a9c0d56@mantra.us.oracle.com> <517A474002000078000D0F87@nat28.tlf.novell.com> <20130509185315.28ce6070@mantra.us.oracle.com> <518CBA8F02000078000D4FA2@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <518CBA8F02000078000D4FA2@nat28.tlf.novell.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 Fri, 10 May 2013 08:14:55 +0100 "Jan Beulich" wrote: > >>> On 10.05.13 at 03:53, Mukesh Rathor > >>> wrote: > > On Fri, 26 Apr 2013 08:22:08 +0100 > >> >> > + /* If the e820 ended under 4GB, we must map the remaining > >> >> > space upto 4GB */ > >> >> > + if ( end < GB(4) ) > >> >> > + { > >> >> > + start_pfn = PFN_UP(end); > >> >> > + end_pfn = (GB(4)) >> PAGE_SHIFT; > >> >> > + nump = end_pfn - start_pfn; > >> >> > + rc = domctl_memory_mapping(d, start_pfn, start_pfn, > >> >> > nump, 1); > >> >> > + BUG_ON(rc); > >> >> > + } > >> >> > >> >> That's necessary, but not sufficient. Or did I overlook MMIO > >> >> ranges getting added somewhere else for Dom0, when they sit > >> >> above the highest E820 covered address? > >> > > >> > construct_dom0() adds the entire range: > >> > > >> > /* DOM0 is permitted full I/O capabilities. */ > >> > rc |= ioports_permit_access(dom0, 0, 0xFFFF); > >> > rc |= iomem_permit_access(dom0, 0UL, ~0UL); > >> > >> Which does not create any mappings at all - these are just > >> permissions being granted. > > > > Right. I'm not sure where its happening for dom0. > > So if you don't know where you do this, I have to guess you don't > do this at all. But you obviously need to. Your main problem is that > you likely don't want to waste memory on page tables to cover the > whole (up to 52 bit wide) address space, so I assume you will need > to add these tables on demand. Yet then again iirc IOMMU faults Hmm... well, I originally had it where the tables were updated "on demand" initiated by guest, but then suggestions were to make that transparent to the guest. I don't really know what the best solution is, let me investigate/think some more. thanks, Mukesh