On Thu, 2021-05-06 at 11:42 +0100, Julien Grall wrote:
> From: Julien Grall
>
> Administrators often require updating the Xen hypervisor to address
> security vulnerabilities, introduce new features, or fix software
> defects.
> Currently, we offer the following methods to perform the update:
>
r a different purpose.
>
> This patch reserves two IDs:
> * KEXEC_TYPE_LIVEUPDATE: New operation to request Live Update
> * KEXEC_MA_RANGE_LIVEUPDATE: New range to query the Live Update
> area below Xen
>
> Signed-off-by: Julien Grall
Reviewed-by: Hongyan Xia
On Wed, 2021-04-28 at 13:51 +0200, Jan Beulich wrote:
> On 28.04.2021 13:04, Hongyan Xia wrote:
> > On Thu, 2021-04-22 at 14:31 +0200, Jan Beulich wrote:
> > > As I don't think we have many cases where code actually depends
> > > on
> > > being able to apply _
On Thu, 2021-04-22 at 14:31 +0200, Jan Beulich wrote:
> On 30.04.2020 22:44, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > When there is not an always-mapped direct map, xenheap allocations
> > need
> > to be mapped and unmapped on-demand.
> >
> >
On Tue, 2020-06-02 at 09:08 +, Wei Liu wrote:
> On Fri, May 01, 2020 at 02:53:08PM +0100, Hongyan Xia wrote:
[...]
> Not sure about hiding EPT. I will leave this question to Jan and
> Andrew...
Quick update on performance numbers. I have seen noticeable performance
drop if we ne
From: Hongyan Xia
Commit 'x86/mm: switch to new APIs in modify_xen_mappings' applied the
hunk of the unmap call to map_pages_to_xen() which was wrong and clearly
should have been at the end of modify_xen_mappings(). Fix.
Fixes: dd68f2e49bea ("x86/mm: switch to new APIs in modify_xen_map
);
+unmap_domain_page(pl2e);
return rc;
}
Hongyan
On Thu, 2021-04-22 at 17:21 +0100, Andrew Cooper wrote:
> On 21/04/2021 15:15, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > This series rewrites all the remaining functions and finally makes
> > the
> &g
On Wed, 2021-04-21 at 15:15 +0100, Hongyan Xia wrote:
> 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.
>
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: Wei Liu
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Acked-by: Jan Beulich
---
xen/arch/x86/mm.c| 44
xen/arch/x86/smpboot.c | 6 +++---
xen/arch/x86/x86_64/mm.c | 2 +-
xen/include/asm-x86/mm.h | 4
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v10:
- switch to unmap_domain_page() for pl3e in the middle because it is
guaranteed to be overwritten later.
Changed in v7:
- change patch title
- remove initialiser of pl3e.
- combine
From: Hongyan Xia
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- const qualify pg in alloc_xen_pagetable_new().
---
xen/arch/x86/mm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86
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
Acked-by: Jan Beulich
---
Changed in v7:
- edit commit message.
- begin with rc = 0 and set it to -ENOMEM ahead of if().
---
xen/arch
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- remove redundant commit message.
- unmap l3src based on va instead of mfn.
- re-structure if condition around l3dst.
Changed in v7:
- hoist l3 variables out of the loop to avoid
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v7:
- add blank line after declaration.
- rename efi_l4_pgtable into efi_l4t.
- pass the mapped efi_l4t to copy_mapping() instead of map it again.
- use the alloc_map_clear_xen_pt() API
From: Wei Liu
Map and unmap pages instead of relying on the direct map.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v9:
- remove an unnecessary l3mfn variable.
Changed in v8:
- replace l3/2_ro_mpt_mfn with just mfn since their lifetimes do
From: Wei Liu
While doing so, avoid repetitive mapping of l2_ro_mpt by keeping it
across loops, and only unmap and map it when crossing 1G boundaries.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- re-structure if condition around l2_ro_mpt
From: Wei Liu
We will soon map and unmap pages in paging_init(). 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
Acked-by: Jan Beulich
---
Changed in v7:
- reword commit message.
---
xen/arch/x86/x86_64/mm.c | 16
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
Reviewed-by: Jan Beulich
---
Changed in v7
From: Wei Liu
Page tables allocated in that function should be mapped and unmapped
now.
Take the opportunity to avoid a potential double map in
map_pages_to_xen() by initialising pl1e to NULL and only map it if it
was not mapped earlier.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v10:
- remove stale include.
- s/alloc_map_clear_xen_pt/alloc_mapped_pagetable/g.
- fix mis-hunks.
Changed in v9:
- use domain_page_map_to_mfn() around the L3 table locking logic.
- remove vmap_to_mfn() changes since we now use xen_map_to_mfn
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.
---
Changed in v10:
- rebase.
- address
On Tue, 2021-04-20 at 14:32 +0200, Jan Beulich wrote:
> On 06.04.2021 13:05, Hongyan Xia wrote:
> > @@ -742,51 +742,58 @@ static int clone_mapping(const void *ptr,
> > root_pgentry_t *rpt)
> > }
> > }
> >
> > +UNMAP_DOMAIN_PAGE
On Tue, 2021-04-20 at 14:17 +0200, Jan Beulich wrote:
> On 06.04.2021 13:05, Hongyan Xia wrote:
> > From: Wei Liu
> >
> > Rewrite those functions to use the new APIs. Modify its callers to
> > unmap
> > the pointer returned. Since alloc_xen_pagetable_new() is a
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v7:
- change patch title
- remove initialiser of pl3e.
- combine the initialisation of pl3e into a single assignment.
- use the new alloc_map_clear() helper.
- use the normal
From: Hongyan Xia
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- const qualify pg in alloc_xen_pagetable_new().
---
xen/arch/x86/mm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86
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: Wei Liu
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Acked-by: Jan Beulich
---
xen/arch/x86/mm.c| 44
xen/arch/x86/smpboot.c | 6 +++---
xen/arch/x86/x86_64/mm.c | 2 +-
xen/include/asm-x86/mm.h | 4
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
---
Changed in v7:
- edit commit message.
- begin with rc = 0 and set it to -ENOMEM ahead of if().
---
xen/arch/x86/smpboot.c | 16
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- remove redundant commit message.
- unmap l3src based on va instead of mfn.
- re-structure if condition around l3dst.
Changed in v7:
- hoist l3 variables out of the loop to avoid
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v7:
- add blank line after declaration.
- rename efi_l4_pgtable into efi_l4t.
- pass the mapped efi_l4t to copy_mapping() instead of map it again.
- use the alloc_map_clear_xen_pt() API
From: Wei Liu
While doing so, avoid repetitive mapping of l2_ro_mpt by keeping it
across loops, and only unmap and map it when crossing 1G boundaries.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- re-structure if condition around l2_ro_mpt
From: Wei Liu
Map and unmap pages instead of relying on the direct map.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v9:
- remove an unnecessary l3mfn variable.
Changed in v8:
- replace l3/2_ro_mpt_mfn with just mfn since their lifetimes do
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
Reviewed-by: Jan Beulich
---
Changed in v7
From: Wei Liu
We will soon map and unmap pages in paging_init(). 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
Acked-by: Jan Beulich
---
Changed in v7:
- reword commit message.
---
xen/arch/x86/x86_64/mm.c | 16
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
Reviewed-by: Jan Beulich
---
xen/arch/x86/mm.c | 60 ---
1 file changed, 36 insertions(+), 24 deletions
-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v9:
- use domain_page_map_to_mfn() around the L3 table locking logic.
- remove vmap_to_mfn() changes since we now use xen_map_to_mfn().
Changed in v8:
- s/virtual address/linear address/.
- BUG_ON() on NULL return in vmap_to_mfn().
Changed in v7
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.
---
Changed in v9:
- drop first 2 patches
Thank you for the patch. We observed similar issues.
However, would you mind sharing more details on the test setup? We
tested the hypervisor after injecting XSA-336. There were regressions
in some benchmarks but far from being enough to raise a serious alarm.
In particular, we benchmarked CPU,
Thank you for the patch. We observed similar issues.
However, would you mind sharing more details on the test setup? We
tested the hypervisor after injecting XSA-336. There were regressions
in some benchmarks but far from being enough to raise a serious alarm.
In particular, we benchmarked CPU,
On Thu, 2020-12-10 at 14:37 +0100, Jan Beulich wrote:
> On 10.12.2020 14:09, Hongyan Xia wrote:
> > On Mon, 2020-09-28 at 12:44 +0200, Jan Beulich wrote:
> > > Plus finally there's no point sending the request for the local
> > > domain
> > > when the
I came across the same issue when QEMU was holding an extra reference
to a page removed from p2m, via XENMEM_add_to_physmap. Please tell me
if I am talking nonsense since my knowledge around QEMU invalidation is
limited.
On Mon, 2020-09-28 at 12:44 +0200, Jan Beulich wrote:
> For one it was wrong
On Mon, 2020-07-27 at 15:21 +0100, Hongyan Xia wrote:
> From: Wei Liu
>
> Rewrite those functions to use the new APIs. Modify its callers to
> unmap
> the pointer returned. Since alloc_xen_pagetable_new() is almost never
> useful unless accompanied by page clearing and a
From: Hongyan Xia
There is simply no guarantee that vmap won't return superpages to the
caller. It can happen if the list of MFNs are contiguous, or we simply
have a large granularity. Although rare, if such things do happen, we
will simply hit BUG_ON() and crash.
Introduce xen_map_to_mfn
On Mon, 2020-12-07 at 11:11 +0100, Jan Beulich wrote:
> On 03.12.2020 12:21, Hongyan Xia wrote:
> > --- a/xen/arch/x86/mm.c
> > +++ b/xen/arch/x86/mm.c
> > @@ -5194,6 +5194,60 @@ l1_pgentry_t *virt_to_xen_l1
Apologies. Missing v2 in the title.
From: Hongyan Xia
There is simply no guarantee that vmap won't return superpages to the
caller. It can happen if the list of MFNs are contiguous, or we simply
have a large granularity. Although rare, if such things do happen, we
will simply hit BUG_ON() and crash.
Introduce xen_map_to_mfn
On Wed, 2020-12-02 at 11:04 +0100, Jan Beulich wrote:
> On 30.11.2020 17:50, Hongyan Xia wrote:
> > From: Hongyan Xia
> >
> > There is simply no guarantee that vmap won't return superpages to
> > the
> > caller. It can happen if the list of MFNs are contiguous,
On Mon, 2020-11-30 at 11:16 +0100, Jan Beulich wrote:
> On 30.04.2020 22:44, Hongyan Xia wrote:
> > --- a/xen/arch/x86/srat.c
> > +++ b/xen/arch/x86/srat.c
> > @@ -196,7 +196,8 @@ void __init acpi_numa_slit_init(struct
> > acpi_table_slit *slit)
> >
From: Hongyan Xia
There is simply no guarantee that vmap won't return superpages to the
caller. It can happen if the list of MFNs are contiguous, or we simply
have a large granularity. Although rare, if such things do happen, we
will simply hit BUG_ON() and crash. Properly handle such cases
On Mon, 2020-11-30 at 13:50 +0100, Jan Beulich wrote:
> On 30.11.2020 13:13, Hongyan Xia wrote:
> > On Tue, 2020-08-18 at 18:16 +0200, Jan Beulich wrote:
> > [...]
> >
> > Actually I did not propose the BUG_ON() fix. I was just in favor of
> > it
> >
en Grall wrote:
> > > > Hi Jan,
> > > >
> > > > On 18/08/2020 09:49, Jan Beulich wrote:
> > > > > On 13.08.2020 19:22, Julien Grall wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On 13/08/2020 17:08, Hongya
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
(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
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,
On Fri, 2020-08-07 at 16:05 +0200, Jan Beulich wrote:
> On 27.07.2020 16:21, Hongyan Xia wrote:
> > From: Wei Liu
> >
> > Rewrite those functions to use the new APIs. Modify its callers to
> > unmap
> > the pointer returned. Since alloc_xen_pagetable_new() is a
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: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v7:
- add blank line after declaration.
- rename efi_l4_pgtable into efi_l4t.
- pass the mapped efi_l4t to copy_mapping() instead of map it again.
- use the alloc_map_clear_xen_pt() API
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v7:
- change patch title
- remove initialiser of pl3e.
- combine the initialisation of pl3e into a single assignment.
- use the new alloc_map_clear() helper.
- use the normal
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
---
Changed in v7:
- edit commit message.
- begin with rc = 0 and set it to -ENOMEM ahead of if().
---
xen/arch/x86/smpboot.c | 16
From: Wei Liu
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Acked-by: Jan Beulich
---
xen/arch/x86/mm.c| 44 ++--
xen/arch/x86/smpboot.c | 6 +++---
xen/arch/x86/x86_64/mm.c | 2 +-
xen/include/asm-x86/mm.h | 4
From: Hongyan Xia
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- const qualify pg in alloc_xen_pagetable_new().
---
xen/arch/x86/mm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86
From: Wei Liu
We will soon map and unmap pages in paging_init(). 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
Acked-by: Jan Beulich
---
Changed in v7:
- reword commit message.
---
xen/arch/x86/x86_64/mm.c | 16
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v8:
- remove redundant commit message.
- unmap l3src based on va instead of mfn.
- re-structure if condition around l3dst.
Changed in v7:
- hoist l3 variables out of the loop to avoid repetitive mappings.
---
xen
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
Reviewed-by: Jan Beulich
---
Changed in v8:
- s/virtual address/linear address/.
- BUG_ON() on NULL return in vmap_to_mfn
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
Reviewed-by: Jan Beulich
---
xen/arch/x86/mm.c | 60 +--
1 file changed, 36 insertions(+), 24
-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
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
Reviewed-by: Jan Beulich
---
Changed in v7
From: Wei Liu
Map and unmap pages instead of relying on the direct map.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- replace l3/2_ro_mpt_mfn with just mfn since their lifetimes do not
overlap
Changed in v7:
- use the new
From: Wei Liu
While doing so, avoid repetitive mapping of l2_ro_mpt by keeping it
across loops, and only unmap and map it when crossing 1G boundaries.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Reviewed-by: Jan Beulich
---
Changed in v8:
- re-structure if condition around l2_ro_mpt
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: 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 mini
On Mon, 2020-07-27 at 13:45 +0100, Hongyan Xia wrote:
> On Tue, 2020-07-14 at 14:42 +0200, Jan Beulich wrote:
> > On 29.05.2020 13:11, Hongyan Xia wrote:
> > > From: Wei Liu
> > >
> > > After inspection ARM doesn't have alloc_xen_pagetable so this
> >
On Tue, 2020-07-14 at 14:42 +0200, Jan Beulich wrote:
> On 29.05.2020 13:11, Hongyan Xia wrote:
> > 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.
>
On Tue, 2020-07-14 at 12:47 +0200, Jan Beulich wrote:
> On 29.05.2020 13:11, Hongyan Xia wrote:
> > From: Wei Liu
> >
> > Rewrite those functions to use the new APIs. Modify its callers to
> > unmap
> > the pointer returned. Since alloc_xen_pagetable_new() is 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
---
Changed in v7:
- edit commit message.
- begin with rc = 0 and set it to -ENOMEM ahead of if().
---
xen/arch/x86/smpboot.c | 16
From: Wei Liu
No functional change.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
Acked-by: Jan Beulich
---
xen/arch/x86/mm.c| 44
xen/arch/x86/smpboot.c | 6 +++---
xen/arch/x86/x86_64/mm.c | 2 +-
xen/include/asm-x86/mm.h | 4
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 38cfa3ce25..16f1aa3344 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
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: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v7:
- add blank line after declaration.
- rename efi_l4_pgtable into efi_l4t.
- pass the mapped efi_l4t to copy_mapping() instead of map it again.
- use the alloc_map_clear_xen_pt() API.
- unmap pl3e, pl2e, l1t
From: Wei Liu
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v7:
- change patch title
- remove initialiser of pl3e.
- combine the initialisation of pl3e into a single assignment.
- use the new alloc_map_clear() helper.
- use the normal map_domain_page() in the error path
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
---
Changed in v7:
- use normal unmap
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
---
Changed in v7:
- remove a comment.
- use l1e_get_mfn() instead of converting things back and forth.
- add
-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
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 mini
From: Wei Liu
Map and unmap pages instead of relying on the direct map.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v7:
- use the new alloc_map_clear_xen_pt() helper.
- move the unmap of pl3t up a bit.
- remove the unmaps in the nomem path.
---
xen/arch/x86/x86_64/mm.c
From: Wei Liu
Avoid repetitive mapping of l2_ro_mpt by keeping it across loops, and
only unmap and map it when crossing 1G boundaries.
Signed-off-by: Wei Liu
Signed-off-by: Hongyan Xia
---
Changed in v7:
- avoid repetitive mapping of l2_ro_mpt.
- edit commit message.
- switch
From: Wei Liu
We will soon map and unmap pages in paging_init(). 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
---
Changed in v7:
- reword commit message.
---
xen/arch/x86/x86_64/mm.c | 16 +---
1 file
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: 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
Signed-off-by: Hongyan Xia
---
Changed in v7:
- hoist l3 variables out of the loop to avoid repetitive mappings.
---
xen/common
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
On Fri, 2020-05-29 at 08:13 +, Bertrand Marquis wrote:
> Hi Julien,
>
> > On 28 May 2020, at 19:54, Julien Grall wrote:
> >
> > Hi Bertrand,
> >
> > Thank you for the patch.
> >
> > On 28/05/2020 16:25, Bertrand Marquis wrote:
> > > At the moment on Arm, a Linux guest running with KTPI
On Wed, 2020-05-20 at 12:09 +0200, Jan Beulich wrote:
> On 24.04.2020 16:09, Hongyan Xia wrote:
> > --- a/xen/arch/x86/smpboot.c
> > +++ b/xen/arch/x86/smpboot.c
> > @@ -815,7 +815,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)
> > if ( !opt_x
On Wed, 2020-05-20 at 11:46 +0200, Jan Beulich wrote:
> On 24.04.2020 16:08, Hongyan Xia wrote:
> > @@ -493,22 +494,28 @@ void __init paging_init(void)
> > if ( !(l4e_get_flags(idle_pg_table[l4_table_offset(va)]) &
> >
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
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
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 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
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 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)
> &
1 - 100 of 292 matches
Mail list logo