From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: xentrace, arm, hvm Date: Sat, 08 Feb 2014 16:53:30 +0000 Message-ID: <52F6610A.1060401@linaro.org> References: <52EFFCF5.5070108@linaro.org> <52F0EBA8.3000206@linaro.org> <1391522239.10515.79.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Pavlo Suikov , Ian Campbell Cc: Stefano Stabellini , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 08/02/14 15:51, Pavlo Suikov wrote: > Hi, Hi Pavlo, >> >> > > To support xentrace on ARM, we will need at least: >> > >> > I would readily do that if you give me some directions on where to look >> > at, or a high-level explanation of: >> > >> > > - to replace rcu_lock_domain_by_any_id() by a a similar function >> > >> > What semantics should this function have? >> >> I would copy in part get_pg_owner (arch/x86/mm/mm.c) in the ARM code. >> The check "unlikely(paging_mode_translate(curr))" will always fail on ARM. > >> Probably best just todig in and ask questions as issues arise. > > After making a quick workaround to rcu_lock DOMAIN_XEN on arm (in the > quite same manner it is done in x86) I've faced different problem. > Specifically, p2m_lookup for an address in the xen restricted heap fails > on the very first map call: p2m_map_first returns zero page due to both > p2m->first_level and p2m_first_level_index(addr) equal to zero. As far > as I understand xen simply does not know how to make p2m translation for > it's own restricted heap on arm. Am I right? For DOMID_XEN, the p2m is not initialized. When xentrace requests to map a page by directly giving the mfn (machine frame number), so there is no need of translation. I would either add a specific case for DOMID_XEN in get_page_from_gfn or p2m_lookup. Regards, -- Julien Grall