From: Ian Campbell Subject: Re: ARM: grant table setup Date: Wed, 23 Apr 2014 16:42:16 +0100 Message-ID: <1398267736.18537.172.camel@kazak.uk.xensource.com> References: <20140422173729.GF81368@galois.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140422173729.GF81368@galois.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: Jonathan Daugherty Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-04-22 at 10:37 -0700, Jonathan Daugherty wrote: > Hi, > > I'm modifying FreeRTOS to run as a Xen guest and I'm working on grant > table setup. The documentation for the Xen ARM ABI states: > > The grant table is mapped using the HYPERVISOR_memory_op sub-op > XENMEM_add_to_physmap, passing XENMAPSPACE_grant_table as space > parameter. The memory range specified under the Xen compatible > hypervisor node on device tree can be used as target gpfn for the > mapping. > > However, I noticed that there is also the GNTTABOP_setup_table > operation. The two seem to overlap in things they do (such as growing > the grant table if the request requires it). Linux appears to use the > physmap operation for ARM ("hvm") guests and setup_table otherwise. I think Linux uses the physmap interface for x86 HVM and PVH guests too. > However, early on my implementation called setup_table to very strange > effect (bogus MFNs in the frame_list). Provided that is indeed > inappropriate, would it be reasonable to make setup_table return a > failure status if called for HVM domains? I think that would make sense, but the correct condition would probably be autotranslated guests rather than hvm. Ian.