Message ID | cover.1576154413.git.hongyxia@amazon.com (mailing list archive) |
---|---|
Headers | show |
Series | Refactor super page shattering | expand |
On 12.12.2019 13:46, Hongyan Xia wrote: > map_pages_to_xen and modify_xen_mappings use almost exactly the same > page shattering logic, and the code is mingled with other PTE > manipulations so it is less obvious that the intention is page > shattering. Factor out the functions to make them reusable and to make > the intention more obvious. > > Of course, there is not much difference between the shattering logic of > each level, so we could further turn the per-level functions into a > single macro, although this is not that simple since we have per-level > functions and macros all over the place and there are slight differences > between levels. Keep it per-level for now. FWIW these look okay to me now, and I would give them my R-b without if there wasn't the type safety issue. Andrew? Jan
On 12/12/2019 13:16, Jan Beulich wrote: > On 12.12.2019 13:46, Hongyan Xia wrote: >> map_pages_to_xen and modify_xen_mappings use almost exactly the same >> page shattering logic, and the code is mingled with other PTE >> manipulations so it is less obvious that the intention is page >> shattering. Factor out the functions to make them reusable and to make >> the intention more obvious. >> >> Of course, there is not much difference between the shattering logic of >> each level, so we could further turn the per-level functions into a >> single macro, although this is not that simple since we have per-level >> functions and macros all over the place and there are slight differences >> between levels. Keep it per-level for now. > FWIW these look okay to me now, and I would give them my R-b without > if there wasn't the type safety issue. Andrew? There are correctness issues which I've pointed out, but WRT type safety, these look fine. ~Andrew