|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry
Hi Razvan, On 28/07/16 16:04, Razvan Cojocaru wrote: On 07/28/2016 05:51 PM, Julien Grall wrote: Actually, it might be possible to remove the TLB for each 4KB entry in the memaccess case. After I read again multiple time the ARM ARM (D4-1732 in ARM DDI 0487A.i) and spoke with various ARM folks, changing the permission (i.e read, write, execute) does not require the break-before-make sequence. However, I noticed a latent bug in the memaccess code when the permission restriction are removed/changed. In the current implementation (i.e without this series), the TLB invalidation is deferred until the p2m is released. Until that time, a vCPU may still run with the previous permission and trap into the hypervisor the permission fault. However, as the permission as changed, p2m_memaccess_check may fail and we will inject an abort to the guest. The problem is very similar to [1]. This will still be true with this series applied if I relaxed the use of the break-before-make sequence. The two ways I can see to fix this are either try again the instruction (we would trap again if the permission was not correct) or keep the break-before-make. The former will be cleaner given than stage-2 permission fault can only happen because of memaccess for now. Any opinions? Regards,[1] https://lists.xenproject.org/archives/html/xen-devel/2016-07/msg03133.html -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |