xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* ARM: grant table setup
@ 2014-04-22 17:37 Jonathan Daugherty
  2014-04-23 15:42 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Daugherty @ 2014-04-22 17:37 UTC (permalink / raw)
  To: xen-devel

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.
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?

Thanks,

-- 
  Jonathan Daugherty
  Software Engineer
  Galois, Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ARM: grant table setup
  2014-04-22 17:37 ARM: grant table setup Jonathan Daugherty
@ 2014-04-23 15:42 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2014-04-23 15:42 UTC (permalink / raw)
  To: Jonathan Daugherty; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-23 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 17:37 ARM: grant table setup Jonathan Daugherty
2014-04-23 15:42 ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).