From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v2:
- there is pretty much no point in keeping l3_ro_mpt mapped, just fetch
the l3e instead, which also cleans up the code.
---
xen/arch/x86/x86_64/mm.c | 12
1 file changed, 8 insertions(+), 4
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v2:
- no point in re-mapping l2t because it is exactly the same as
l2_ro_mpt.
- point l2_ro_mpt to the entry instead of doing l2_table_offset() all
the time.
---
xen/arch/x86/x86_64/mm.c | 17
From: Wei Liu
Fetch lYe by mapping and unmapping lXe instead of using the direct map,
which is now done via the lYe_from_lXe() helpers.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v2:
- the introduction of the macros is now lifted to a previous patch.
---
xen/arch/x86
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v2:
- avoid adding goto labels, simply get the PTE and unmap quickly.
- code style fixes.
---
xen/arch/x86/x86_64/mm.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xen/arch
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 functional change
intended.
---
Changed in v2:
- I kept UNMAP_DOMAIN_PAGE() for now in v2, but I
On Thu, 2020-04-09 at 11:42 +0200, Jan Beulich wrote:
> On 08.04.2020 15:36, Hongyan Xia wrote:
> > --- a/xen/arch/x86/pv/shim.c
> > +++ b/xen/arch/x86/pv/shim.c
> > @@ -168,16 +168,17 @@ const struct platform_bad_page *__init
> > pv_shim_reserved_pages(unsigned int *s
OMPAT_MPT_VIRT_START);
> /* Allocate and map the compatibility mode machine-to-phys
> table. */
> mpt_size = (mpt_size >> 1) + (1UL << (L2_PAGETABLE_SHIFT - 1));
The code around here, I am wondering if there is a reason to put it in
this patch. If we bisect, we
On Wed, 2020-04-15 at 12:34 +0200, Jan Beulich wrote:
> On 15.04.2020 11:59, Hongyan Xia wrote:
> > ...
> > I would like to drop relevant map/unmap patches and replace them
> > with
> > the new clean-up ones (and place them at the beginning of the
> > series),
-by: Hongyan Xia
---
Changed in v3:
- use unmap_domain_page() instead of the macro in several places.
- also introduce l1e_from_l2e().
- add _ prefix in macros to avoid aliasing.
Changed in v2:
- instead of map, map, map, read/write, unmap, unmap, unmap, do map,
read PTE, unmap for each level
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 functional change
intended.
---
Changed in v3:
- address all comments in v2.
- drop patch 4
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v3:
- rename l2_ro_mpt into pl2e to avoid confusion.
Changed in v2:
- no point in re-mapping l2t because it is exactly the same as
l2_ro_mpt.
- point l2_ro_mpt to the entry instead of doing l2_table_offset() all
From: Wei Liu
Fetch lYe by mapping and unmapping lXe instead of using the direct map,
which is now done via the lYe_from_lXe() helpers.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v2:
- the introduction of the macros is now lifted to a previous
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v3:
- rename l3e_ro_mpt and l2e_ro_mpt, just call them l3e and l2e.
Changed in v2:
- avoid adding goto labels, simply get the PTE and unmap quickly.
- code style fixes.
---
xen/arch/x86
-by: Hongyan Xia
---
Changed in v4:
- use _ suffixes instead of prefixes.
Changed in v3:
- use unmap_domain_page() instead of the macro in several places.
- also introduce l1e_from_l2e().
- add _ prefix in macros to avoid aliasing.
Changed in v2:
- instead of map, map, map, read/write, unmap
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v3:
- rename l3e_ro_mpt and l2e_ro_mpt, just call them l3e and l2e.
Changed in v2:
- avoid adding goto labels, simply get the PTE and unmap quickly.
- code style fixes.
---
xen/arch/x86
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v4:
- switch to normal unmap_domain_page() for variable right before
end-of-scope.
Changed in v3:
- rename l2_ro_mpt into pl2e to avoid confusion.
Changed in v2:
- no point in re-mapping l2t because it is
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 functional change
intended.
---
Changed in v4:
- use _ suffix instead of prefix in macros.
- use
From: Wei Liu
Fetch lYe by mapping and unmapping lXe instead of using the direct map,
which is now done via the lYe_from_lXe() helpers.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v2:
- the introduction of the macros is now lifted to a previous
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 18210405f4..5714e5ba62 100644
--- a/xen/arch/x86/x86_64/mm.c
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/smpboot.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 09264b02d1..275ce7661d 100644
--- a/xen/arch/x86
From: Hongyan Xia
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 functional change
intended.
Wei Liu (6):
x86_64/mm: map and unmap page tables in cleanup_frame_table
x86_64/mm
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 5714e5ba62..6d52183559 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b
From: Wei Liu
Also fix a weird indentation.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index e85ef449f3..18210405f4
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
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 28a939b68a..a03f0501ab 100644
--- a/xen/arch/x86/pv
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/pv/dom0_build.c | 32
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 5678da782d..28a939b68a
A gentle ping.
On Fri, 2020-04-17 at 10:52 +0100, Hongyan Xia wrote:
> From: Hongyan Xia
>
> 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 functional
&
Hi Julien,
On Fri, 2020-04-24 at 09:59 +0100, Julien Grall wrote:
> (resending)
>
> On 17/04/2020 10:52, Hongyan Xia wrote:
> > From: Wei Liu
> >
> > Also fix a weird indentation.
> >
> > Signed-off-by: Wei Liu
> > Signed-off-by: Hongyan Xia
-by: Hongyan Xia
---
Changed since v4:
- drop the end_of_loop goto label.
Changed since v3:
- remove asserts on rc since rc never gets changed to anything else.
- reword commit message.
---
xen/arch/x86/mm.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a
From: Wei Liu
Map and unmap pages instead of relying on the direct map.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 43
1 file changed, 30 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen
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 | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x
From: Wei Liu
Rewrite those functions to use the new APIs. Modify its callers to unmap
the pointer returned.
Note that the change of virt_to_xen_l1e() also requires vmap_to_mfn() to
unmap the page, which requires domain_page.h header in vmap.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
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
---
xen/arch/x86/mm.c | 60 ---
1 file changed, 36 insertions(+), 24 deletions(-)
diff --git a/xen/arch/x86
From: Hongyan Xia
This series rewrites all the remaining functions and finally makes the
switch from xenheap to domheap for Xen page tables, so that they no
longer need to rely on the direct map, which is a big step towards
removing the direct map.
This series depends on the following two mini
From: Wei Liu
Also reduce the scope of l2_ro_mpt as it is only used inside the loop,
and remove two lines of l2_ro_mpt check which serve no purpose.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 24 +---
1 file changed, 13 insertions
From: Wei Liu
Page tables allocated in that function should be mapped and unmapped
now.
Note that pl2e now maybe mapped and unmapped in different iterations, so
we need to add clean-ups for that.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c | 57
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
---
xen/common/efi/boot.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/xen/common/efi/boot.c b
From: Wei Liu
We will soon need to handle dynamically mapping / unmapping page
tables in the said function. Since dynamic mappings may map and unmap
pl3e in different iterations, lift pl3e out of the loop.
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/smpboot.c | 54 +++---
1 file changed, 35 insertions(+), 19 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 5b0e24f925..0e0ae56c76 100644
--- a
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
Signed-off-by: Hongyan Xia
---
xen/arch/x86/smpboot.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/smpboot.c b
From: Hongyan Xia
Two sets of old APIs, alloc/free_xen_pagetable() and lXe_to_lYe(), are
now dropped to avoid the dependency on direct map.
There are two special cases which still have not been re-written into
the new APIs, thus need special treatment:
rpt in smpboot.c cannot use ephemeral
From: Hongyan Xia
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 749b6f23e5..7e212cc3e0 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/efi/runtime.h | 10 +++--
xen/common/efi/boot.c | 46 ++
xen/common/efi/efi.h | 3 ++-
xen/common/efi/runtime.c | 8 +++
4 files changed, 46 insertions
From: Wei Liu
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/mm.c| 48
xen/arch/x86/smpboot.c | 12 +-
xen/arch/x86/x86_64/mm.c | 10 -
xen/common/efi/boot.c| 10 -
xen
On Tue, 2020-04-28 at 17:33 +0200, Jan Beulich wrote:
> On 17.04.2020 11:52, Hongyan Xia wrote:
> > --- a/xen/arch/x86/pv/dom0_build.c
> > +++ b/xen/arch/x86/pv/dom0_build.c
> > @@ -50,17 +50,17 @@ static __init void
> > mark_pv_pt_pages_rdonly(struct domain *d,
&
On Tue, 2020-04-28 at 16:55 +0100, Hongyan Xia wrote:
> On Tue, 2020-04-28 at 17:33 +0200, Jan Beulich wrote:
> > On 17.04.2020 11:52, Hongyan Xia wrote:
> > > --- a/xen/arch/x86/pv/dom0_build.c
> > > +++ b/xen/arch/x86/pv/dom0_build.c
> > > @@
On Tue, 2020-04-28 at 16:59 +0100, Hongyan Xia wrote:
> On Tue, 2020-04-28 at 16:55 +0100, Hongyan Xia wrote:
> > On Tue, 2020-04-28 at 17:33 +0200, Jan Beulich wrote:
> > > On 17.04.2020 11:52, Hongyan Xia wrote:
> > > > --- a/xen/arch/x86/pv/dom0_build.c
-by: Hongyan Xia
Reviewed-by: Julien Grall
---
xen/arch/x86/pv/dom0_build.c | 32 +---
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/xen/arch/x86/pv/dom0_build.c
b/xen/arch/x86/pv/dom0_build.c
index abfbe5f436..3522eb0114 100644
--- a/xen/arch/x86/pv
From: Wei Liu
Also, clean up the initialisation of plXe.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed since last revision:
- lift this patch out since others in the series have been merged.
- remove lXt variables and reuse plXe for unmapping.
- clean up plXe initialisation
: Wei Wang
Signed-off-by: Hongyan Xia
---
xen/arch/x86/domain.c| 4 ++--
xen/arch/x86/domain_page.c | 22 ++
xen/include/asm-x86/domain.h | 12 ++--
3 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
From: Hongyan Xia
Before, it assumed the pv cr3 could be accessed via a direct map. This
is no longer true.
Note that we do not map and unmap root_pgt for now since it is still a
xenheap page.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/entry.S | 27 ++-
1 file
From: Hongyan Xia
This series depends on Xen page table domheap conversion:
https://lists.xenproject.org/archives/html/xen-devel/2020-04/msg01374.html.
After breaking the reliance on the direct map to manipulate Xen page
tables, we can now finally remove the direct map altogether.
This series
From: Hongyan Xia
Building a PV dom0 is allocating from the domheap but uses it like the
xenheap. This is clearly wrong. Fix.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/pv/dom0_build.c | 58 ++--
1 file changed, 43 insertions(+), 15 deletions(-)
diff --git a
From: Wei Liu
Xen shouldn't use domheap page as if they were xenheap pages. Map and
unmap pages accordingly.
Signed-off-by: Wei Liu
Signed-off-by: Wei Wang
---
xen/arch/x86/pv/dom0_build.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/pv/d
From: Hongyan Xia
Also, introduce a wrapper around vmap that maps a contiguous range for
boot allocations.
Signed-off-by: Hongyan Xia
---
xen/drivers/acpi/osl.c | 9 -
xen/include/xen/vmap.h | 5 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/xen/drivers/acpi
From: Hongyan Xia
This avoids the assumption that boot pages are in the direct map.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/srat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index 506a56d66b..9a84c6c8a8 100644
--- a/xen
what vmap is for. Therefore, we bring vm_init into early boot stage.
To allow vmap to be initialised and used in early boot, we need to
modify vmap to receive pages from the boot allocator during early boot
stage.
Signed-off-by: Wei Liu
Signed-off-by: David Woodhouse
Signed-off-by: Hongyan Xia
infrastructure is not lock-protected therefore can only be used
before smpboot. After smpboot, mapcache has to be used.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/Makefile| 1 +
xen/arch/x86/pmap.c | 87
xen/include
From: Hongyan Xia
This avoids the assumption that there is a direct map and boot pages
fall inside the direct map.
Clean up the variables so that mfn actually stores a type-safe mfn.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/numa.c | 8
1 file changed, 4 insertions(+), 4 deletions
From: Hongyan Xia
When mfn is not in direct map, never use mfn_to_virt for any mappings.
We replace mfn_x(mfn) <= PFN_DOWN(__pa(HYPERVISOR_VIRT_END - 1)) with
arch_mfn_in_direct_map(mfn) because these two are equivalent. The
extra comparison in arch_mfn_in_direct_map() looks different
From: Hongyan Xia
Create empty mappings in the second e820 pass. Also, destroy existing
direct map mappings created in the first pass.
To make xenheap pages visible in guests, it is necessary to create empty
L3 tables in the direct map even when directmap=no, since guest cr3s
copy idle domain
From: Hongyan Xia
Also add a helper function to retrieve it. Change arch_mfn_in_direct_map
to check this option before returning.
This is added as a boot command line option, not a Kconfig. We do not
produce different builds for EC2 so this is not introduced as a
compile-time configuration
From: Hongyan Xia
When there is not an always-mapped direct map, xenheap allocations need
to be mapped and unmapped on-demand.
Signed-off-by: Hongyan Xia
---
xen/common/page_alloc.c | 45 ++---
1 file changed, 42 insertions(+), 3 deletions(-)
diff --git a
From: Hongyan Xia
When we do not have a direct map, arch_mfn_in_direct_map() will always
return false, thus init_node_heap() will allocate xenheap pages from an
existing node for the metadata of a new node. This means that the
metadata of a new node is in a different node, slowing down heap
From: Hongyan Xia
In order to use the mapcache in the idle domain, we also have to
populate its page tables in the PERDOMAIN region, and we need to move
mapcache_domain_init() earlier in arch_domain_create().
Note, commit 'x86: lift mapcache variable to the arch level' has
initi
From: Hongyan Xia
When we do not have a direct map, memory for metadata of heap nodes in
init_node_heap() is allocated from xenheap, which needs to be mapped and
unmapped on demand. However, we cannot just take memory from the boot
allocator to create the PTEs while we are passing memory to the
On Fri, 2020-05-01 at 12:02 +, Wei Liu wrote:
> On Thu, Apr 30, 2020 at 09:44:11PM +0100, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > Also, introduce a wrapper around vmap that maps a contiguous range
> > for
> > boot allocations.
> >
> >
On Fri, 2020-05-01 at 12:11 +, Wei Liu wrote:
> On Thu, Apr 30, 2020 at 09:44:20PM +0100, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > Also add a helper function to retrieve it. Change
> > arch_mfn_in_direct_map
> > to check this option before returning.
On Fri, 2020-05-01 at 12:07 +, Wei Liu wrote:
> On Thu, Apr 30, 2020 at 09:44:09PM +0100, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > This series depends on Xen page table domheap conversion:
> >
https://lists.xenproject.org/archives/html/xen-
On Fri, 2020-05-01 at 22:35 +0100, Julien Grall wrote:
> Hi,
>
> On Thu, 30 Apr 2020 at 21:44, Hongyan Xia wrote:
> >
> > From: Hongyan Xia
> >
> > Also, introduce a wrapper around vmap that maps a contiguous range
> > for
> > boot all
From: Hongyan Xia
stack++ can go into the next page and unmap_domain_page() will unmap the
wrong one, causing mapcache and memory corruption. Fix.
This is found with direct map removal. For now, the idle domain does not
have a mapcache and uses the direct map, so no errors will occur.
Signed
On Tue, 2020-05-05 at 15:38 +0200, Jan Beulich wrote:
> On 05.05.2020 13:06, Hongyan Xia wrote:
> > --- a/xen/arch/x86/traps.c
> > +++ b/xen/arch/x86/traps.c
> > @@ -300,6 +300,7 @@ static void show_guest_stack(struct vcpu *v,
> > const struct cpu_user_regs *regs)
> &
From: Hongyan Xia
stack++ can go into the next page and unmap_domain_page() will unmap the
wrong one, causing mapcache and memory corruption. Fix.
Signed-off-by: Hongyan Xia
---
Changed in v2:
- tweak how the unmap is handled.
- fix the bug in compat as well.
- remove part of the commit
On Thu, 2020-04-30 at 17:15 +0200, Jan Beulich wrote:
> On 24.04.2020 16:09, Hongyan Xia wrote:
> > From: Wei Liu
>
> Nit: Why the emphasis on pl*e in the title? Is there anything left
> unconverted in the function? IOW how about "switch clone_mapping()
> to new pa
From: Hongyan Xia
The macro version UNMAP_DOMAIN_PAGE() does both NULL checking and
variable clearing. Move NULL checking into the function itself so that
the semantics is consistent with other similar constructs like XFREE().
This also eases the use unmap_domain_page() in error handling paths
On Fri, 2020-05-15 at 11:08 +0100, Julien Grall wrote:
> Hi,
>
> On 15/05/2020 10:57, Roger Pau Monné wrote:
> > On Fri, May 15, 2020 at 10:23:16AM +0100, Julien Grall wrote:
> > > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open
> > > attachments unless you have verified the sender a
On Sun, 2020-05-17 at 13:15 +, Jason Long wrote:
> Hello,
> The Xen hypervisor doesn't support the RoCE adapters? The Oracle
> migrates to the KVM because of it.
> Why not add this feature?
I am curious. Aren't RoCE adapters just PCIe devices? If things are set
up correctly and drivers are pre
after unmapping, and ignore NULL in unmap_domain_page.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/domain_page.c| 2 +-
xen/arch/x86/mm.c | 14 --
xen/include/xen/domain_page.h | 5 +
3 files changed, 14 insertions(+), 7 deletions(-)
diff
the UNMAP_DOMAIN_PAGE macro to nullify the
variable after unmapping, and ignore NULL.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v2:
- let UNMAP_DOMAIN_PAGE itself check whether the input is NULL to avoid
adding the check in unmap_domain_page.
- reword the commit message
From: Hongyan Xia
The allocation can just return NULL. Return an error value early instead
of crashing later on.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/tboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 8c232270b4..ce85a710dd
From: Wei Liu
Fetch lYe by mapping and unmapping lXe instead of using the direct map,
which is now done via the new lYe_from_lXe() helpers.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 12 ++--
xen/include/asm-x86/page.h | 18
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 functional change
intended.
Wei Liu (5):
x86/shim: map and unmap page tables in
From: Wei Liu
Signed-off-by: Wei Liu
Reviewed-by: Hongyan Xia
---
xen/arch/x86/x86_64/mm.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index b7ce833ffc..a440dac25e 100644
--- a/xen/arch/x86/x86_64
From: Wei Liu
Signed-off-by: Wei Liu
Reviewed-by: Hongyan Xia
---
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 2680173fab..71c84ac593 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b
From: Wei Liu
Signed-off-by: Wei Liu
Reviewed-by: Hongyan Xia
---
xen/arch/x86/pv/shim.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index ed2ece8a8a..1229d5ffb3 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen
From: Wei Liu
Signed-off-by: Wei Liu
Reviewed-by: Hongyan Xia
---
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 71c84ac593..6a0ffe088b 100644
--- a/xen/arch/x86/x86_64
h
> index a2c6049834..39dae242b0 100644
> --- a/xen/include/asm-x86/p2m.h
> +++ b/xen/include/asm-x86/p2m.h
> @@ -505,7 +505,7 @@ static inline struct page_info
> *get_page_from_gfn(
> static inline gfn_t mfn_to_gfn(const struct domain *d, mfn_t mfn)
> {
> if ( paging_mode_translate(d) )
> -return _gfn(get_gpfn_from_mfn(mfn_x(mfn)));
> +return _gfn(get_pfn_from_mfn(mfn));
> else
> return _gfn(mfn_x(mfn));
> }
Apart from the two comments above, looks good to me.
Reviewed-by: Hongyan Xia
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
From: Hongyan Xia
Unfortunately, even though that commit dropped the domctl lock and
allowed other domctl to continue, it created severe lock contention
within domain destructions themselves. Multiple domain destructions in
parallel now spin for the global heap lock when freeing memory and could
Hi,
A while ago there was a quick chat on IRC about how XSM interacts with
the idle domain. The conversation did not reach any clear conclusions
so it might be a good idea to summarise the questions in an email.
Basically there were two questions in that conversation:
1. In its current state, ar
(also replying to others in this thread.)
On Wed, 2020-10-21 at 12:21 -0400, Jason Andryuk wrote:
> On Wed, Oct 21, 2020 at 10:35 AM Hongyan Xia wrote:
> >
> > Hi,
>
> ...
> >
> > The first question came up during ongoing work in LiveUpdate. After
> > a
On Thu, 2020-10-22 at 13:51 +0100, Andrew Cooper wrote:
> On 21/10/2020 15:34, Hongyan Xia wrote:
> > The first question came up during ongoing work in LiveUpdate. After
> > an
> > LU, the next Xen needs to restore all domains. To do that, some
> > hypercalls need to be
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
Reviewed-by: Julien Grall
---
Changed since v4:
- properly handle INVALID_MFN.
- remove the _new suffix fo
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
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
Reviewed-by: Jan Beulich
---
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
Signed-off-by: Hongyan Xia
---
Changed since v4:
- drop the end_of_loop goto label since this function may be refactored
in the future
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
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 v4:
- drop the end_of_loop goto label since this function may be refactored
in the future
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
Signed-off-by: Hongyan Xia
Reviewed-by: Julien Grall
---
Changed since v5:
- sounds like we are happy to use map_domain_page for Xen PTEs. Remove
map/unmap_xen_pagetable, just use map/unmap_domain_page instead.
- remove redundant logic in free_xen_pagetable.
Changed since v4:
- properly handle
available,
which is not enough for nested page table walks. We need to increase the
number of slots in config.h.
Signed-off-by: Hongyan Xia
---
xen/arch/x86/domain.c| 5 +-
xen/arch/x86/domain_page.c | 229 +++
xen/include/asm-x86/config.h | 2 +-
xen
101 - 200 of 292 matches
Mail list logo