ARM: grant table setup
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,
Signature · 3 lines
Jonathan Daugherty Software Engineer Galois, Inc.
Quoted 11 lines · Jonathan Daugherty
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_opsub-opXENMEM_add_to_physmap, passingXENMAPSPACE_grant_tableas space parameter. The memory range specified under the Xen compatible hypervisor node on device tree can be used as target gpfn for the mapping.
Quoted 4 lines
However, I noticed that there is also the
GNTTABOP_setup_tableoperation. 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 andsetup_tableotherwise.
I think Linux uses the physmap interface for x86 HVM and PVH guests too.
Quoted 4 lines
However, early on my implementation called
setup_tableto very strange effect (bogus MFNs in theframe_list). Provided that is indeed inappropriate, would it be reasonable to makesetup_tablereturn 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.