All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH v3 0/2] Refactor super page shattering
@ 2019-12-11 10:58 Hongyan Xia
  2019-12-11 10:58 ` [Xen-devel] [PATCH v3 1/2] x86/mm: factor out the code for shattering an l3 PTE Hongyan Xia
  2019-12-11 10:58 ` [Xen-devel] [PATCH v3 2/2] x86/mm: factor out the code for shattering an l2 PTE Hongyan Xia
  0 siblings, 2 replies; 10+ messages in thread
From: Hongyan Xia @ 2019-12-11 10:58 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, jgrall, Wei Liu, Jan Beulich, Roger Pau Monné

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.

tree:
https://xenbits.xen.org/git-http/people/hx242/xen.git shatter-refactor

---
Changes in v3:
- style and indentation fixes.

Changes in v2:
- rebase.
- improve asm code.
- avoid stale values when taking the lock.
- move allocation of PTE tables inside the shatter function.

Hongyan Xia (2):
  x86/mm: factor out the code for shattering an l3 PTE
  x86/mm: factor out the code for shattering an l2 PTE

 xen/arch/x86/mm.c | 194 +++++++++++++++++++++++-----------------------
 1 file changed, 98 insertions(+), 96 deletions(-)

-- 
2.17.1


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-12-11 16:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-11 10:58 [Xen-devel] [PATCH v3 0/2] Refactor super page shattering Hongyan Xia
2019-12-11 10:58 ` [Xen-devel] [PATCH v3 1/2] x86/mm: factor out the code for shattering an l3 PTE Hongyan Xia
2019-12-11 15:29   ` Jan Beulich
2019-12-11 16:34     ` Xia, Hongyan
2019-12-11 17:00       ` Jan Beulich
2019-12-11 15:32   ` Jan Beulich
2019-12-11 16:27     ` Xia, Hongyan
2019-12-11 16:58       ` Jan Beulich
2019-12-11 10:58 ` [Xen-devel] [PATCH v3 2/2] x86/mm: factor out the code for shattering an l2 PTE Hongyan Xia
2019-12-11 15:33   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.