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

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM



Hi Julien,

On 2020/1/21 19:25, Julien Grall wrote:
> Hi Jan,
> 
> On 21/01/2020 11:02, Jan Beulich wrote:
>> On 21.01.2020 10:49, Wei Xu wrote:
>>> Add __acpi_unmap_table function for ARM and invoke it at 
>>> acpi_os_unmap_memory
>>> to make sure the related fixmap has been cleared before using it for a
>>> different mapping.
>>
>> How can it possibly be that this is needed for Arm only?
> 
> Let me give some background (I will let Wei dealing with the rest of the 
> patches). On Arm, I made the decision to forbid a mapping replacement in the 
> page-tables code. This means that if you want to re-use the same fixmap, then 
> you need to clear it first.
> 
> The reason for the requirement is quite simple. On Arm, you need to use a 
> break-before-make sequence any time you replace a valid entry by another 
> valid entry (there is a couple of case where it is not needed).
> 
> As the sequence name suggests it, we will have a small window where the 
> virtual address will point to nothing. This may result to an abort if another 
> CPU is accessing the address at the same time.
> 
> In the fixmap case below, this should never happen. But now imagine 
> shattering a superpage...
> 
> So rather than trying to allow in some cases the modification of a mapping, 
> we just forbid for everything but permission changes. This is much simpler to 
> reason and a much saner interface.
> 
> Similarly, I think this is much saner to call have a clear_fixmap() for each 
> set_fixmap().

Thanks to explain!

Best Regards,
Wei

> 
> Cheers,
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.