[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 23/24] xen/arm: Add a hypercall for device mmio mapping
>>> On 28.02.16 at 12:19, <zhaoshenglong@xxxxxxxxxx> wrote: > It needs to map platform or amba device mmio to Dom0 on ARM. But when > booting with ACPI, it can't get the mmio region in Xen due to lack of > AML interpreter to parse DSDT table. Therefore, let Dom0 call a > hypercall to map mmio region when it adds the devices. Leaving aside the fact that XEN_DOMCTL_memory_mapping is not meant to be called by other than the tools - is there anything here which that hypercall wouldn't provide? If not, I think the commit message should reference that hypercall too while rationalizing the need for this new map space. > --- > xen/arch/arm/mm.c | 4 ++++ > xen/arch/arm/p2m.c | 23 +++++++++++++++++++++++ > xen/common/memory.c | 14 ++++++++++++++ > xen/include/asm-arm/p2m.h | 5 +++++ > xen/include/public/memory.h | 1 + > 5 files changed, 47 insertions(+) This touches code with no maintainers Cc-ed. > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -1138,6 +1138,10 @@ int xenmem_add_to_physmap_one( > rcu_unlock_domain(od); > break; > } > + case XENMAPSPACE_dev_mmio: > + rc = map_dev_mmio_region(d, gpfn, 1, idx); > + return rc; > + break; Dead code. > --- a/xen/common/memory.c > +++ b/xen/common/memory.c > @@ -980,6 +980,13 @@ long do_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > if ( d == NULL ) > return -ESRCH; > > + /* XENMAPSPACE_dev_mmio mapping is only supported for hardware Domain > + * to map this kind of space to itself. > + */ Coding style. > + if ( (xatp.space == XENMAPSPACE_dev_mmio) && > + (!is_hardware_domain(current->domain) || (d != > current->domain)) ) > + return -EOPNOTSUPP; More like -EPERM or -EACCES. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |