From: Wei Liu
Defer the call to clear_page to the point when we're sure the page is
going to become a page table.
This is a minor optimisation. No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch
From: Wei Liu
We will need to have a variable named pl3e when we rewrite
virt_to_xen_l3e. Change pl3e to l3t to reflect better its purpose.
This will make reviewing later patch easier.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 14 +++---
1 file changed, 7 in
From: Wei Liu
We will need to have a variable named pl2e when we rewrite
virt_to_xen_l2e. Change pl2e to l2t to reflect better its purpose.
This will make reviewing later patch easier.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 14 +++---
1 file changed, 7 in
From: Wei Liu
Page tables allocated in that function should be mapped and unmapped
now.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v1:
* remove redundant lines
---
xen/arch/x86/mm.c | 33 ++---
1 file changed, 22 insertions(+), 11
From: Wei Liu
Rewrite that function to use the new APIs. Modify its callers to unmap
the pointer returned.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 61 +--
1 file changed, 48 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/
From: Wei Liu
We will soon rewrite the function to handle dynamically mapping and
unmapping of page tables.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 34 +++---
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/m
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the l
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop is
ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/x
From: Wei Liu
We will soon need to handle dynamically mapping / unmapping page
tables in the said function.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x
From: Wei Liu
We will need to have a variable named pl1e when we rewrite
virt_to_xen_l1e. Change pl1e to l1t to reflect better its purpose.
This will make reviewing later patch easier.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 14 +++---
1 file changed, 7 in
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/common/efi/boot.c | 39 +++
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 64a287690a..1d1420f02c 100644
--- a/xen/common/efi/boot.c
+++ b/xen/co
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index f31bd4ffde..d452ed3966 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/m
From: Wei Liu
We will soon switch efi_l4_table to use ephemeral mapping. Make
copy_mapping take a pointer to the mapping instead of using the global
variable.
No functional change intended.
Signed-off-by: Wei Liu
---
xen/common/efi/boot.c | 11 ++-
1 file changed, 6 insertions(+), 5 d
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/common/efi/boot.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 1d1420f02c..3868293d06 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1705,3 +1705,13 @@ void __
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 5b3be25f8a..55b99644af 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -1378,3 +1378,13 @@ vo
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 956e1bdbcc..c55aaa65a2 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/pv/shim.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 324ca27f93..cf638fa965 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v1:
* use a global mapping for compat_idle_pg_table_l2, otherwise
l2_ro_mpt will unmap it.
---
xen/arch/x86/x86_64/mm.c | 50 +---
1 file changed, 37 insertions(+), 13
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index ca8fc6d485..9fe0ef18a1 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -949,
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 6fb8c92543..8706dc0174 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -353,19 +353,22 @@ void __i
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index c8c71564ba..c1daa04cf5 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -
From: Wei Liu
We will soon need to clean up page table mappings in the exit path.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 35 ---
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 103932720b..f31bd4ffde 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@
From: Wei Liu
Introduce pl2e so that we can use l2_ro_mpt to point to the page table
itself.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x8
From: Wei Liu
This requires storing the MFN instead of linear address of the L4
table. Adjust code accordingly.
Signed-off-by: Wei Liu
---
xen/arch/x86/efi/runtime.h | 12 +---
xen/common/efi/boot.c | 8 ++--
xen/common/efi/efi.h | 3 ++-
xen/common/efi/runtime.c |
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index d452ed3966..c41715cd56 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_6
From: Wei Liu
Page tables allocated in that function should be mapped and unmapped
now.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v1:
* remove redundant lines
---
xen/arch/x86/mm.c | 34 +++---
1 file changed, 23 insertions(+), 11
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 31 +++
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 8d13c994af..7a02fcee18 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen
From: Wei Liu
Rewrite this function to use new APIs. Modify its callers to unmap the
pointer returned.
Signed-off-by: Wei Liu
---
xen/arch/x86/domain_page.c | 10 ++
xen/arch/x86/mm.c | 30 +-
2 files changed, 31 insertions(+), 9 deletions(-)
diff
From: Wei Liu
Modify all the _new APIs to handle domheap pages.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index c9be239d53..a2d2d01660 100644
--- a/xen/arch/x86/mm.c
+++ b
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index e0d2190be1..2fff5f9306 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index d327c062b1..956e1bdbcc 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 716dc1512d..db39f5cbb2 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 24 +---
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index e8ed04006f..8d13c994af 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 7a02fcee18..a1c69d7f0e 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64
This series is mostly Wei's effort to switch from xenheap to domheap for
Xen page tables. In addition, I have also merged several bug fixes from
my "Remove direct map from Xen" series [1]. As the title suggests, this
series switches from xenheap to domheap for Xen PTEs.
This is needed to achieve t
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the li
From: Wei Liu
We are going to switch to using domheap page for page tables.
A new set of APIs is introduced to allocate, map, unmap and free pages
for page tables.
The allocation and deallocation work on mfn_t but not page_info,
because they are required to work even before frame table is set up
From: Wei Liu
After inspection ARM doesn't have alloc_xen_pagetable so this function
is x86 only, which means it is safe for us to change.
Signed-off-by: Wei Liu
---
XXX test this in gitlab ci to be sure.
---
xen/common/efi/boot.c | 16 +++-
1 file changed, 11 insertions(+), 5 dele
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 2fff5f9306..1d2ebd642f 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86
From: Wei Liu
Rewrite that function to use the new APIs. Modify its callers to unmap
the pointer returned.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 46 +-
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/ar
From: Wei Liu
They were put into page.h but mm.h is more appropriate.
The real reason is that I will be adding some new functions which
takes mfn_t. It turns out it is a bit difficult to do in page.h.
No functional change.
Signed-off-by: Wei Liu
---
xen/include/asm-x86/mm.h | 5 +
xen/
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/pv/dom0_build.c | 35 +++
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 1bd53e9c08..d7d42568fb 100644
--- a/xen/arch/x86/pv/d
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop
is ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --
From: Wei Liu
This then requires moving declaration of root page table mfn into mm.h
and modify setup_cpu_root_pgt to have a single exit path.
We also need to force map_domain_page to use direct map when switching
per-domain mappings. This is contrary to our end goal of removing
direct map, but
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 31 +++
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 5c5b91b785..e0d2190be1 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen
From: Wei Liu
Map and unmap page tables where necessary.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 40 +---
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 5bb86935f4..08af71a261 100644
--- a/x
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 22 +++---
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index c41715cd56..5c5b91b785 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86
From: Wei Liu
Now that we've switched all users to the new APIs, the old ones aren't
needed anymore.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 16
xen/include/asm-x86/mm.h | 2 --
xen/include/asm-x86/page.h | 5 -
3 files changed, 23 deletions(-)
diff --
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/smpboot.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index db39f5cbb2..d327c062b1 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v1:
- Fix rebase conflicts against new master and other changes since v1.
---
xen/arch/x86/domain.c| 4 +-
xen/arch/x86/domain_page.c | 2 +-
xen/arch/x86/efi/runtime.h | 4 +-
xen/arch/x86
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index c1daa04cf5..103932720b 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -480,8 +480,6 @@ static
From: Wei Liu
Properly map and unmap page tables where necessary.
Signed-off-by: Wei Liu
---
xen/arch/x86/setup.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index dec60d0301..d27bcf1724 100644
--- a/xen/arch/x86/se
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 28 +++-
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index a812ef0244..6fb8c92543 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5532,8 +5532
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/pv/dom0_build.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index d7d42568fb..39cb68f7da 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv
From: Wei Liu
Signed-off-by: Wei Liu
---
xen/arch/x86/x86_64/mm.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 1d2ebd642f..e8ed04006f 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@
tched to use domheap and dynamic mappings when usage of old APIs
is eliminated.
No functional change intended in this patch.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v3:
- const qualify unmap_xen_pagetable_new().
- remove redundant parentheses.
---
xen/arch/x86
From: Wei Liu
We will soon rewrite the function to handle dynamically mapping and
unmapping of page tables.
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v3:
- remove asserts on rc since rc never gets changed to anything else
- reword commit
From: Wei Liu
We will soon need to handle dynamically mapping / unmapping page
tables in the said function.
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v3:
- remove asserts on rc since it never gets changed to anything else.
---
xen/arch/x86
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop
is ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --
From: Wei Liu
They were put into page.h but mm.h is more appropriate.
The real reason is that I will be adding some new functions which
takes mfn_t. It turns out it is a bit difficult to do in page.h.
No functional change.
Signed-off-by: Wei Liu
Acked-by: Jan Beulich
---
Changed since v3:
-
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop is
ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/x
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the l
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the li
From: Wei Liu
We will need to have a variable named pl*e when we rewrite
virt_to_xen_l*e. Change pl*e to l*t to reflect better its purpose.
This will make reviewing later patch easier.
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
xen
NOTE: My email address has changed due to some HR management. I have
lost all my previous emails and I could only salvage some of the
comments to v3 from the mailing list archive. I will reply to the
comments from v3 in this v4 series.
This batch adds an alternative alloc-map-unmap-free Xen PTE AP
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l2 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c | 81 ++-
1 file changed, 38
it per-level for now.
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 | 166 ++
1 file changed, 78 insertions(+), 88 deletions(-)
--
2.17.1
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l3 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c | 85 ++-
1 file changed, 40
it per-level for now.
tree:
https://xenbits.xen.org/git-http/people/hx242/xen.git int_review
---
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
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l2 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v2:
- improve asm.
- re-read pl2e from memory when taking the lock.
- move the
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l3 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v2:
- improve asm.
- re-read pl3e from memory when taking the lock.
- move the
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l2 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v3:
- style and indentation changes.
- return -ENOMEM instead of -1.
Changes in v2
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l3 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v3:
- style and indentation changes.
- return -ENOMEM instead of -1.
Changes in v2
.
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
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l2 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v4:
- use false/true instead of -1/0 to indicate failure/success.
- remove
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
map_pages_to_xen and modify_xen_mappings are performing almost exactly
the same operations when shattering an l3 PTE, the only difference
being whether we want to flush.
Signed-off-by: Hongyan Xia
---
Changes in v4:
- use false/true instead of -1/0 to indicate failure/success.
- remove
The existing code assumes that the first mfn passed to the boot
allocator is mapped, which creates problems when, e.g., we do not have
a direct map, and may create other bootstrapping problems in the
future. Make it static. The size is kept the same as before (1 page).
Signed-off-by: Hongyan Xia
On 01/10/2019 12:51, Wei Liu wrote:
On Mon, Sep 30, 2019 at 11:33:14AM +0100, Hongyan Xia wrote:
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since v1:
* use a global mapping for compat_idle_pg_table_l2, otherwise
l2_ro_mpt will unmap it.
Hmmm... I
On 30/09/2019 11:33, Hongyan Xia wrote:
From: Wei Liu
This then requires moving declaration of root page table mfn into mm.h
and modify setup_cpu_root_pgt to have a single exit path.
We also need to force map_domain_page to use direct map when switching
per-domain mappings. This is contrary
On 01/10/2019 16:20, Wei Liu wrote:
On Tue, Oct 01, 2019 at 02:54:19PM +0100, Hongyan Xia wrote:
On 30/09/2019 11:33, Hongyan Xia wrote:
From: Wei Liu
This then requires moving declaration of root page table mfn into mm.h
and modify setup_cpu_root_pgt to have a single exit path.
We also
From: Wei Liu
They were put into page.h but mm.h is more appropriate.
The real reason is that I will be adding some new functions which
takes mfn_t. It turns out it is a bit difficult to do in page.h.
No functional change.
Signed-off-by: Wei Liu
---
xen/include/asm-x86/mm.h | 5 +
xen/
This batch adds an alternative alloc-map-unmap-free Xen PTE API to the
normal alloc-free on the xenheap, in preparation of switching to domheap
for Xen page tables. Since map and unmap are basically no-ops now, and
other changes are cosmetic to ease future patches, this batch does not
introduce any
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the li
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop is
ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/x
From: Wei Liu
The pl2e and pl1e variables are heavily (ab)used in that function. It
is fine at the moment because all page tables are always mapped so
there is no need to track the life time of each variable.
We will soon have the requirement to map and unmap page tables. We
need to track the l
From: Wei Liu
We will need to have a variable named pl*e when we rewrite
virt_to_xen_l*e. Change pl*e to l*t to reflect better its purpose.
This will make reviewing later patch easier.
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c | 42
From: Wei Liu
We will soon need to handle dynamically mapping / unmapping page
tables in the said function.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x
From: Wei Liu
We are going to switch to using domheap page for page tables.
A new set of APIs is introduced to allocate, map, unmap and free pages
for page tables.
The allocation and deallocation work on mfn_t but not page_info,
because they are required to work even before frame table is set up
From: Wei Liu
We will soon rewrite the function to handle dynamically mapping and
unmapping of page tables.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 34 +++---
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/m
From: Wei Liu
We will soon need to clean up mappings whenever the out most loop
is ended. Add a new label and turn relevant continue's into goto's.
No functional change.
Signed-off-by: Wei Liu
---
xen/arch/x86/mm.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --
On Wed, 2020-03-25 at 08:11 +0100, Jan Beulich wrote:
> On 24.03.2020 19:39, Julien Grall wrote:
> > On 24/03/2020 16:13, Jan Beulich wrote:
> > > On 24.03.2020 16:21, Hongyan Xia wrote:
> > > > From: Hongyan Xia
> > > > In contrast,
> >
On Sun, 2020-03-29 at 16:06 +0100, Wei Liu wrote:
> On Mon, Mar 23, 2020 at 09:41:37AM +0000, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > This small series is basically just rewriting functions using the
> > new
> > API to map and unmap PTEs. Each patch is
Ping.
On Mon, 2020-03-23 at 09:41 +, Hongyan Xia wrote:
> From: Hongyan Xia
>
> This small series is basically just rewriting functions using the new
> API to map and unmap PTEs. Each patch is independent.
>
> Apart from mapping and unmapping page tables, no other f
On Mon, 2020-04-06 at 13:03 +0200, Jan Beulich wrote:
> On 06.04.2020 10:27, Hongyan Xia wrote:
> > Ping.
>
> Does this somehow imply you didn't get my replies sent on the 1st?
>
> Jan
Apologies. Somehow your replies ended up in a separate thread. There is
a pr
On Wed, 2020-04-01 at 14:29 +0200, Jan Beulich wrote:
> On 23.03.2020 10:41, Hongyan Xia wrote:
> > --- a/xen/include/asm-x86/page.h
> > +++ b/xen/include/asm-x86/page.h
> > @@ -196,6 +196,24 @@ static inline l4_pgentry_t
> > l4e_from_paddr(paddr_t pa, unsig
On Wed, 2020-04-01 at 14:40 +0200, Jan Beulich wrote:
> On 23.03.2020 10:41, Hongyan Xia wrote:
> > @@ -297,26 +298,33 @@ static void destroy_m2p_mapping(struct
> > mem_hotadd_info *info)
> > continue;
> > }
> >
> > -l2_ro_mpt
On Wed, 2020-04-01 at 14:29 +0200, Jan Beulich wrote:
> On 23.03.2020 10:41, Hongyan Xia wrote:
> > --- a/xen/include/asm-x86/page.h
> > +++ b/xen/include/asm-x86/page.h
> > @@ -196,6 +196,24 @@ static inline l4_pgentry_t
> > l4e_from_paddr(paddr_t pa, unsig
-by: Hongyan Xia
---
Changed in v2:
- unmap as early as possible instead of unmapping all at the end.
- use lYe_from_lXe() macros and lift them from a later patch to this
patch.
- const qualify pointers in new macros.
---
xen/arch/x86/pv/shim.c | 9 +
xen/include/asm-x86/page.h
1 - 100 of 292 matches
Mail list logo