From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 2/9] xen: arm: Implement variable levels in dump_pt_walk Date: Mon, 08 Sep 2014 15:12:52 -0700 Message-ID: <540E29E4.9020900@linaro.org> References: <4427aba8dad3155fca151a0b63bfdf78e3a91033.1409847257.git.ian.campbell@citrix.com> <540E1E7C.6030604@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <540E1E7C.6030604@linaro.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: Ian Campbell , xen-devel@lists.xen.org Cc: tim@xen.org, vijay.kilari@gmail.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 08/09/14 14:24, Julien Grall wrote: > Hi Ian, > > On 04/09/14 09:14, Ian Campbell wrote: >> -void dump_pt_walk(lpae_t *first, paddr_t addr) >> +void dump_pt_walk(lpae_t *root, paddr_t addr, >> + unsigned int root_level) >> { >> - lpae_t *second = NULL, *third = NULL; >> + static const char *level_strs[4] = { "0TH", "1ST", "2ND", "3RD" }; >> + const unsigned int offsets[4] = { >> + zeroeth_table_offset(addr), >> + first_table_offset(addr), >> + second_table_offset(addr), >> + third_table_offset(addr) >> + }; >> + lpae_t pte, *mappings[4] = { 0, }; > > Xen never maps the next level when level == 3, shoudn't mappings[3] enough? After thinking, mappings[4] is fine here. Sorry for the noise. Regards, -- Julien Grall