From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH V13 1/7] xen/arm: p2m changes for mem_access support Date: Thu, 12 Mar 2015 14:10:42 +0000 Message-ID: <55019E62.2000506@citrix.com> References: <1425677073-13729-1-git-send-email-tklengyel@sec.in.tum.de> <1425677073-13729-2-git-send-email-tklengyel@sec.in.tum.de> <55018D24.9030603@linaro.org> <1426168561.32572.5.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426168561.32572.5.camel@citrix.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 , Julien Grall Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, keir@xen.org, Tamas K Lengyel List-Id: xen-devel@lists.xenproject.org On 12/03/15 13:56, Ian Campbell wrote: > On Thu, 2015-03-12 at 12:57 +0000, Julien Grall wrote: >> Hi Tamas, >> >> On 06/03/15 21:24, Tamas K Lengyel wrote: >>> @@ -1090,6 +1098,8 @@ void p2m_teardown(struct domain *d) >>> >>> p2m_free_vmid(d); >>> >>> + radix_tree_destroy(&p2m->mem_access_settings, NULL); >>> + >>> spin_unlock(&p2m->lock); >>> } >>> >>> @@ -1115,6 +1125,10 @@ int p2m_init(struct domain *d) >>> p2m->max_mapped_gfn = 0; >>> p2m->lowest_mapped_gfn = ULONG_MAX; >>> >>> + p2m->default_access = p2m_access_rwx; >>> + p2m->mem_access_enabled = false; >> false is defined for bool not bool_t. >> Please use 0 here. > I'm not convinced, false is false whatever you assign it to. C specified that false expands to the constant 0, and true to the constant 1. They are fine for use with any integral type. ~Andrew