|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 10/12] arm/mem_access: Add long-descriptor based gpt
Hi Sergej, On 06/27/2017 12:52 PM, Sergej Proskurin wrote: No, it makes more confusing because you have the return within the macro. It is not that bad too have an helper checking the base and do if ( check_base_size(....) ) return -EINVAL; [...] See my comment in the changelog about this macro. [...] It really doesn't make sense to call a function vgic_* in guest page table walk code. I wasn't expected that I needed to explicitly say that vgic_access_* should be moved in ARM generic code and be renamed. [...] + /* + * According to to ARM DDI 0487B.a J1-5927, we return an error if the found + * PTE is invalid or holds a reserved entry (PTE<1:0> == x0)) or if the PTE + * maps a memory block at level 3 (PTE<1:0> == 01). + */ + if ( !lpae_valid(pte) || ((level == 3) && !lpae_page(pte, level)) ) NIT: What you want to check here is either the entry is a superpage or a page. So the below check would be easier to parse: if ( !lpae_is_superpage(pte, level) || !lpae_is_page(pte, level) ) Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |