From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH v1 3/8]: PVH startup changes (enlighten.c) Date: Thu, 4 Oct 2012 18:25:18 -0700 Message-ID: <20121004182518.76e9624a@mantra.us.oracle.com> References: <20120921121659.5a723de9@mantra.us.oracle.com> <20120924154335.097d3fb9@mantra.us.oracle.com> <20120925180416.0137d61a@mantra.us.oracle.com> <20121002183619.70734b7a@mantra.us.oracle.com> <20121002190323.2e16f6ff@mantra.us.oracle.com> <20121003153714.4656b7e9@mantra.us.oracle.com> <1349339920.650.220.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1349339920.650.220.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 4 Oct 2012 09:38:40 +0100 Ian Campbell wrote: > On Wed, 2012-10-03 at 23:37 +0100, Mukesh Rathor wrote: > > On Wed, 3 Oct 2012 12:58:22 +0100 > > Ok, finally, focussing on this, the issue with pfn in dom0 is that > > I need pfn allocated in construct_dom0() and be mapped so that the > > guest can just do : > > > > HYPERVISOR_shared_info=(struct shared_info > > *)__va(xen_start_info->shared_info); > > > > How about following I am experimenting with right now: > > > > in construct_dom0(): > > > > vstartinfo_end = (vstartinfo_start + > > sizeof(struct start_info) + > > sizeof(struct dom0_vga_console_info)); > > > > if ( is_hybrid_domain(d) ) { > > start_info_pfn_addr = round_pgup(vstartinfo_end) - v_start; > > vstartinfo_end += PAGE_SIZE; > > } > > > > I can then put (PFN: start_info_pfn_addr)->(MFN: > > virt_to_maddr(d->shared_info)) in the p2m, and dom0 just has to do > > __va(), like domU does now. I wont' need to special case dom0 then. > > > > Do you foresee any problems with this approach? > > Hard to say without all the surrounding context but it seems plausible > to me. Ok, above works. So no dom0 special case in linux now to map shared_page. thanks Mukesh