Re: [PATCH kvm-unit-tests 4/8] arm/arm64: mmu: Stop mapping an assumed IO region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 14, 2021 at 04:42:17PM +0100, Alexandru Elisei wrote:
> On 4/7/21 7:59 PM, Andrew Jones wrote:
> > +void mmu_set_persistent_maps(pgd_t *pgtable)
> > +{
> > +	struct mmu_persistent_map *map;
> > +
> > +	for (map = &mmu_persistent_maps[0]; map->phys_end; ++map) {
> > +		if (map->sect)
> > +			mmu_set_range_sect(pgtable, map->virt_offset,
> > +					   map->phys_start, map->phys_end,
> > +					   map->prot);
> > +		else
> > +			mmu_set_range_ptes(pgtable, map->virt_offset,
> > +					   map->phys_start, map->phys_end,
> > +					   map->prot);
> > +	}
> > +}
> 
> I assume the purpose of all of this machinery is to add mappings to idmap that
> were created before setup_mmu(). Or are you planning to use it for something else?
> 
> Why not allocate the idmap in __ioremap (if it's NULL) and add entries to it in
> that function? Then setup_mmu() can allocate the idmap only if it's NULL, and the
> mappings added by __ioremap would still be there.
>

Hi Alex,

I like your suggestion and will implement it that way for v2. If we ever
do need these mappings for anything else, then we can revisit this,
possibly stashing the mappings at the same time we add them to the idmap.

Thanks,
drew




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux