From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v2] xsm: add device tree labeling support Date: Fri, 13 Mar 2015 09:23:15 +0000 Message-ID: <5502BA930200007800069A16@mail.emea.novell.com> References: <1426192942-6029-1-git-send-email-dgdegra@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YWLoL-0003fr-Ng for xen-devel@lists.xenproject.org; Fri, 13 Mar 2015 09:23:17 +0000 In-Reply-To: <1426192942-6029-1-git-send-email-dgdegra@tycho.nsa.gov> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel De Graaf Cc: xen-devel@lists.xenproject.org, julien.grall@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 12.03.15 at 21:42, wrote: > @@ -1999,11 +2055,23 @@ int policydb_read(struct policydb *p, void *fp) > "Old xen policy does not support iomemcon"); > goto bad; > } > - rc = next_entry(buf, fp, sizeof(u32) *2); > - if ( rc < 0 ) > - goto bad; > - c->u.iomem.low_iomem = le32_to_cpu(buf[0]); > - c->u.iomem.high_iomem = le32_to_cpu(buf[1]); > + if ( p->policyvers >= POLICYDB_VERSION_XEN_DEVICETREE ) > + { > + u64 b64[2]; > + rc = next_entry(b64, fp, sizeof(u64) *2); > + if ( rc < 0 ) > + goto bad; > + c->u.iomem.low_iomem = le64_to_cpu(b64[0]); > + c->u.iomem.high_iomem = le64_to_cpu(b64[1]); > + } > + else > + { > + rc = next_entry(buf, fp, sizeof(u32) *2); > + if ( rc < 0 ) > + goto bad; > + c->u.iomem.low_iomem = le32_to_cpu(buf[0]); > + c->u.iomem.high_iomem = le32_to_cpu(buf[1]); > + } I might be completely wrong (knowing next to nothing about XSM), but how is the permissible I/O mem range tied to DT (as expressed by POLICYDB_VERSION_XEN_DEVICETREE)? All systems with valid page frame number possibly being wider than 32 bits would need this extension, i.e. namely also x86. Jan