[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/6] xen/arm: don't iomem_permit_access for reserved-memory regions
On Tue, 9 Jul 2019, Oleksandr wrote: > > On 22.06.19 02:56, Stefano Stabellini wrote: > > Hi, Stefano > > > Don't allow reserved-memory regions to be remapped into any guests, > > until reserved-memory regions are properly supported in Xen. For now, > > do not call iomem_permit_access for them. > > > > Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> > > --- > > Changes in v4: > > - new patch > > --- > > xen/arch/arm/domain_build.c | 23 +++++++++++++++-------- > > 1 file changed, 15 insertions(+), 8 deletions(-) > > > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > > index d9836779d1..76dd4bf6f9 100644 > > --- a/xen/arch/arm/domain_build.c > > +++ b/xen/arch/arm/domain_build.c > > @@ -1158,15 +1158,22 @@ static int __init map_range_to_domain(const struct > > dt_device_node *dev, > > bool need_mapping = !dt_device_for_passthrough(dev); > > int res; > > - res = iomem_permit_access(d, paddr_to_pfn(addr), > > - paddr_to_pfn(PAGE_ALIGN(addr + len - 1))); > > - if ( res ) > > + /* > > + * Don't give iomem permissions for reserved-memory ranges until > > + * reserved-memory support is complete. > > + */ > > + if ( strcmp(dt_node_name(dev), "reserved-memory") ) > > This filter doesn't catch child nodes if the "reserved-memory" node has ones. > > Here is my "reserved-memory" node: > > reserved-memory { > #address-cells = <2>; > #size-cells = <2>; > ranges; > > /* device specific region for Lossy Decompression */ > lossy_decompress: linux,lossy_decompress@54000000 { > no-map; > reg = <0x00000000 0x54000000 0x0 0x03000000>; > }; > > /* For Audio DSP */ > adsp_reserved: linux,adsp@57000000 { > compatible = "shared-dma-pool"; > reusable; > reg = <0x00000000 0x57000000 0x0 0x01000000>; > }; > > /* global autoconfigured region for contiguous allocations */ > linux,cma@58000000 { > compatible = "shared-dma-pool"; > reusable; > reg = <0x00000000 0x58000000 0x0 0x18000000>; > linux,cma-default; > }; > > /* device specific region for contiguous allocations */ > mmp_reserved: linux,multimedia@70000000 { > compatible = "shared-dma-pool"; > reusable; > reg = <0x00000000 0x70000000 0x0 0x10000000>; > }; > }; > > > So, the dt_node_name(dev) for child nodes are: > > - linux,lossy_decompress > - linux,adsp > - linux,cma > - linux,multimedia > > > Probably, we should check whether the parent node is "reserved-memory" as > well. Yes, that is a mistake, thanks for spotting it. I should check the parent node name instead. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |