. This will change in a
follow-up patch.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
There are a few TODOs:
- It is becoming more critical to fix the mapcache
implementation (this is not compliant with the Arm Arm)
- Evaluate the performance
diff
Hi all,
A few years ago, Wei Liu implemented a PoC to remove the directmap
from Xen. The last version was sent by Hongyan Xia [1].
I will start with thanking both Wei and Hongyan for the initial work
to upstream the feature. A lot of patches already went in and this is
the last few patches missin
ified.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changelog since v1:
* Rebase
* Fix typoes
diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index 671eaadbc1d5..c1c6450ca2e3 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/
From: Hongyan Xia
Building a PV dom0 is allocating from the domheap but uses it like the
xenheap. Use the pages as they should be.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V4:
* Reduce the scope of l{1,2,4}start_mfn
From: Julien Grall
The arm32 version of init_secondary_pagetables() will soon be re-used
for arm64 as well where the root table starts at level 0 rather than level 1.
So rename 'first' to 'root'.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
From: Julien Grall
Implement the same command line option as x86 to enable/disable the
directmap. By default this is kept enabled.
Also modify setup_directmap_mappings() to populate the L0 entries
related to the directmap area.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
allocation.
Since we now have early vmap, vmap the metadata locally in the new node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v4:
* Change type of the parameters to paddr_t
* Use clear_domain_page() instead of
From: Wei Liu
Replace the manual copying logic with a call to `copy_domain_page()`
while relocating intird which map and unmap pages accordingly.
Signed-off-by: Wei Liu
Signed-off-by: Wei Wang
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V4
, we
already have enough memory in the heap allocator in the 1st node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v4:
* Fix indentation
* Refactor the code to reduce code duplication
diff --git a/xen/arch/x86
ongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4e258419ac34..1633ed0302b1 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1022,6 +1022,56 @@ static struct domain *__init create_dom0(cons
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V4:
* Reword the commit message
* Rebase it on top of staging
* The logic for the creation of the domain has been reworked
so introduced
.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V4:
* Fix over-allocation issue
* Update the mappings when switching from kernel to user-mode
Changes in V3:
* Rename SHADOW_ROOT
* Haven't addresse
Signed-off-by: Elias El Yandouzi
The PMAP infrastructure was upstream separately for Arm since
Hongyan sent the secret-free hypervisor series. So this is a new
patch to plumb the feature on x86.
Changes in v4:
* Select PMAP KConfig option iff ONDEMAND_DIRECTMAP is used
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
I have left the call to map_pages_to_xen() and
-up patches.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V4:
* Rename the Kconfig options
* Set opt_directmap to true if CONFIG_HAS_ONDEMAND_DIRECTMAP is not
enabled
Changes in V2:
* Introduce a
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_mfns_in_direct_map(mfn, 1) because these two are equivalent. The
extra comparison in arch_mfns_in_direct_map() looks different but b
Hi Jan,
On 14/05/2024 16:03, Jan Beulich wrote:
On 13.05.2024 15:40, Elias El Yandouzi wrote:
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -382,6 +382,10 @@ int __init dom0_construct_pv(struct domain *d,
l3_pgentry_t *l3tab = NULL, *l3start = NULL
Hi Jan,
On 16/05/2024 08:17, Jan Beulich wrote:
On 15.05.2024 20:25, Elias El Yandouzi wrote:
However, I noticed quite a weird bug while doing some testing. I may
need your expertise to find the root cause.
Looks like you've overflowed the dom0 kernel stack, most likely because
of recu
Hi Jan,
On 14/05/2024 15:51, Jan Beulich wrote:
On 13.05.2024 15:40, Elias El Yandouzi wrote:
From: Hongyan Xia
Create a per-domain mapping of PV guest_root_pt as direct map is being
removed.
Note that we do not map and unmap root_pgt for now since it is still a
xenheap page.
Signed-off-by
Hi Roger,
On 13/05/2024 16:27, Roger Pau Monné wrote:
diff --git a/xen/arch/x86/pv/domain.c b/xen/arch/x86/pv/domain.c
index 2a445bb17b..1b025986f7 100644
--- a/xen/arch/x86/pv/domain.c
+++ b/xen/arch/x86/pv/domain.c
@@ -288,6 +288,21 @@ static void pv_destroy_gdt_ldt_l1tab(struct vcpu *v)
ified.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changelog since v1:
* Rebase
* Fix typoes
diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index 293acb67e0..2ec1ffe1dc 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/arm6
Until directmap gets completely removed, we'd still need to
keep some calls to mfn_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to mfn_to_directmap_virt() to flag them and
prevent further use of mfn_to_virt().
Signed-off-by: Elias El Yandouzi
diff --git
. This will change in a
follow-up patch.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
There are a few TODOs:
- It is becoming more critical to fix the mapcache
implementation (this is not compliant with the Arm Arm)
- Evaluate the performance
diff
From: Julien Grall
The arm32 version of init_secondary_pagetables() will soon be re-used
for arm64 as well where the root table starts at level 0 rather than level 1.
So rename 'first' to 'root'.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
From: Julien Grall
Implement the same command line option as x86 to enable/disable the
directmap. By default this is kept enabled.
Also modify setup_directmap_mappings() to populate the L0 entries
related to the directmap area.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Until directmap gets completely removed, we'd still need to
keep some calls to mmaddr_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to maddr_to_directmap_virt() to flag them and
prevent further use of maddr_to_virt().
Signed-off-by: Elias El Yandouzi
diff
ongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index f26c9799e4..919347d8c2 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -978,6 +978,57 @@ static struct domain *__init create_dom0(const module
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
I have left the call to map_pages_to_xen() and
The early fixed addresses must all fit into the static L1 table.
Introduce a build assertion to this end.
Signed-off-by: Elias El Yandouzi
Changes in v2:
* New patch
diff --git a/xen/arch/x86/include/asm/fixmap.h
b/xen/arch/x86/include/asm/fixmap.h
index a7ac365fc6
allocation.
Since we now have early vmap, vmap the metadata locally in the new node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
* vmap_contig_pages() was renamed to vmap_contig()
* Fix indentation and coding
From: Hongyan Xia
Create a per-domain mapping of PV guest_root_pt as direct map is being
removed.
Note that we do not map and unmap root_pgt for now since it is still a
xenheap page.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in
, we
already have enough memory in the heap allocator in the 1st node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index bd6b1184f5..f26c9799e4 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86
there remains some users of the directmap at this point. The option
is introduced now as it will be needed in follow-up patches.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Introduce a Kconfig option
* Reword
alised the mapcache for HVM domains. With this patch, PV, HVM,
idle domains now all initialise the mapcache.
Signed-off-by: Wei Wang
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Free resources if mapcache initialisa
Signed-off-by: Elias El Yandouzi
The PMAP infrastructure was upstream separately for Arm since
Hongyan sent the secret-free hypervisor series. So this is a new
patch to plumb the feature on x86.
Changes in v2:
* Declare PMAP entries earlier in fixed_addresses
From: Wei Liu
It is going to be needed by HVM and idle domain as well, because without
the direct map, both need a mapcache to map pages.
This commit lifts the mapcache variable up and initialise it a bit earlier
for PV and HVM domains.
Signed-off-by: Wei Liu
Signed-off-by: Wei Wang
Signed-of
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_mfns_in_direct_map(mfn, 1) because these two are equivalent. The
extra comparison in arch_mfns_in_direct_map() looks different but b
From: Hongyan Xia
Building a PV dom0 is allocating from the domheap but uses it like the
xenheap. Use the pages as they should be.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V3:
* Fold following patch 'x86/pv: M
ic?).
=== Future of secret-free hypervisor ===
There are some information in an e-mail from Andrew a few years ago:
https://lore.kernel.org/xen-devel/e3219697-0759-39fc-2486-715cdec1c...@citrix.com/
Cheers,
[1] https://lore.kernel.org/xen-devel/cover.1588278317.git.hongy...@amazon.com/
*** BLUR
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V3:
* Rename commit title
* R
From: Julien Grall
Implement the same command line option as x86 to enable/disable the
directmap. By default this is kept enabled.
Also modify setup_directmap_mappings() to populate the L0 entries
related to the directmap area.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
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_mfns_in_direct_map(mfn, 1) because these two are equivalent. The
extra comparison in arch_mfns_in_direct_map() looks different but b
The early fixed addresses must all fit into the static L1 table.
Introduce a build assertion to this end.
Signed-off-by: Elias El Yandouzi
Changes in v2:
* New patch
diff --git a/xen/arch/x86/include/asm/fixmap.h
b/xen/arch/x86/include/asm/fixmap.h
index a7ac365fc6
Until directmap gets completely removed, we'd still need to
keep some calls to mfn_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to mfn_to_directmap_virt() to flag them and
prevent further use of mfn_to_virt().
Signed-off-by: Elias El Yandouzi
diff --git
ified.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changelog since v1:
* Rebase
* Fix typoes
diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index 293acb67e0..2ec1ffe1dc 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/arm6
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
I have left the call to map_pages_to_xen() and
From: Julien Grall
The arm32 version of init_secondary_pagetables() will soon be re-used
for arm64 as well where the root table starts at level 0 rather than level 1.
So rename 'first' to 'root'.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
ongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index f26c9799e4..919347d8c2 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -978,6 +978,57 @@ static struct domain *__init create_dom0(const module
. This will change in a
follow-up patch.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
There are a few TODOs:
- It is becoming more critical to fix the mapcache
implementation (this is not compliant with the Arm Arm)
- Evaluate the performance
diff
allocation.
Since we now have early vmap, vmap the metadata locally in the new node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
* vmap_contig_pages() was renamed to vmap_contig()
* Fix indentation and coding
Until directmap gets completely removed, we'd still need to
keep some calls to mmaddr_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to maddr_to_directmap_virt() to flag them and
prevent further use of maddr_to_virt().
Signed-off-by: Elias El Yandouzi
diff
From: Hongyan Xia
Building a PV dom0 is allocating from the domheap but uses it like the
xenheap. Use the pages as they should be.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V3:
* Fold following patch 'x86/pv: M
there remains some users of the directmap at this point. The option
is introduced now as it will be needed in follow-up patches.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Introduce a Kconfig option
* Reword
alised the mapcache for HVM domains. With this patch, PV, HVM,
idle domains now all initialise the mapcache.
Signed-off-by: Wei Wang
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Free resources if mapcache initialisa
, we
already have enough memory in the heap allocator in the 1st node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index bd6b1184f5..f26c9799e4 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86
From: Wei Liu
It is going to be needed by HVM and idle domain as well, because without
the direct map, both need a mapcache to map pages.
This commit lifts the mapcache variable up and initialise it a bit earlier
for PV and HVM domains.
Signed-off-by: Wei Liu
Signed-off-by: Wei Wang
Signed-of
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V3:
* Rename commit title
* R
Signed-off-by: Elias El Yandouzi
The PMAP infrastructure was upstream separately for Arm since
Hongyan sent the secret-free hypervisor series. So this is a new
patch to plumb the feature on x86.
Changes in v2:
* Declare PMAP entries earlier in fixed_addresses
From: Hongyan Xia
Create a per-domain mapping of PV guest_root_pt as direct map is being
removed.
Note that we do not map and unmap root_pgt for now since it is still a
xenheap page.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in
ic?).
=== Future of secret-free hypervisor ===
There are some information in an e-mail from Andrew a few years ago:
https://lore.kernel.org/xen-devel/e3219697-0759-39fc-2486-715cdec1c...@citrix.com/
Cheers,
[1] https://lore.kernel.org/xen-devel/cover.1588278317.git.hongy...@amazon.com/
*** BLUR
On 20/02/2024 11:14, Jan Beulich wrote:
On 16.01.2024 20:25, Elias El Yandouzi wrote:
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -29,6 +29,7 @@ config X86
select HAS_UBSAN
select HAS_VPCI if HVM
select NEEDS_LIBELF
+ select HAS_SECRET_HIDING
On 20/02/2024 10:51, Jan Beulich wrote:
On 16.01.2024 20:25, Elias El Yandouzi wrote:
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -750,9 +750,16 @@ int arch_domain_create(struct domain *d,
spin_lock_init(&d->arch.e820_lock);
+if ( (rc = mapcache_domain
On 20/02/2024 10:51, Jan Beulich wrote:
On 16.01.2024 20:25, Elias El Yandouzi wrote:
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -750,9 +750,16 @@ int arch_domain_create(struct domain *d,
spin_lock_init(&d->arch.e820_lock);
+if ( (rc = mapcache_domain
This only lifts the mapcache variable up. Whether we populate the
mapcache for a domain is unchanged in this patch.
Is it? I wonder because of ...
I agree, the commit message doesn't completely reflect the changes below.
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -843,6 +843
> On 20/02/2024 10:28, Jan Beulich wrote:
On 16.01.2024 20:25, Elias El Yandouzi wrote:
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -382,6 +382,10 @@ int __init dom0_construct_pv(struct domain *d,
l3_pgentry_t *l3tab = NULL, *l3start = NULL;
l2_pgentr
Hi Jan,
From: Hongyan Xia
Before, it assumed the pv cr3 could be accessed via a direct map. This
is no longer true.
There are a number of terminology issues here, starting with the title:
Unlike (iirc) in an earlier version, no mapping/unmapping occurs in
restore_all_guests itself anymore.
Hi Jan,
On 29/01/2024 08:28, Jan Beulich wrote:
On 16.01.2024 20:25, Elias El Yandouzi wrote:
Julien Grall (8):
xen/vmap: Check the page has been mapped in vm_init_type()
xen/vmap: Introduce vmap_size() and use it
xen/arm: fixmap: Rename the fixmap slots to follow the x86 convention
ongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 3b698c8c41..84c496ac4a 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -976,6 +976,57 @@ static struct domain *__init create_dom0(const module
The early fixed addresses must all fit into the static L1 table.
Introduce a build assertion to this end.
Signed-off-by: Elias El Yandouzi
Changes in v2:
* New patch
diff --git a/xen/arch/x86/include/asm/fixmap.h
b/xen/arch/x86/include/asm/fixmap.h
index a7ac365fc6
Until directmap gets completely removed, we'd still need to
keep some calls to mfn_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to mfn_to_directmap_virt() to flag them and
prevent further use of mfn_to_virt().
Signed-off-by: Elias El Yandouzi
diff --git
From: Julien Grall
Implement the same command line option as x86 to enable/disable the
directmap. By default this is kept enabled.
Also modify setup_directmap_mappings() to populate the L0 entries
related to the directmap area.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
allocation.
Since we now have early vmap, vmap the metadata locally in the new node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
* vmap_contig_pages() was renamed to vmap_contig()
* Fix indentation and coding
From: Julien Grall
The arm32 version of init_secondary_pagetables() will soon be re-used
for arm64 as well where the root table starts at level 0 rather than level 1.
So rename 'first' to 'root'.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Until directmap gets completely removed, we'd still need to
keep some calls to mmaddr_to_virt() for xenheap pages or when the
directmap is enabled.
Rename the macro to maddr_to_directmap_virt() to flag them and
prevent further use of maddr_to_virt().
Signed-off-by: Elias El Yandouzi
diff
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
I have left the call to map_pages_to_xen() and
, we
already have enough memory in the heap allocator in the 1st node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b813ea75b5..3b698c8c41 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86
. This will change in a
follow-up patch.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
There are a few TODOs:
- It is becoming more critical to fix the mapcache
implementation (this is not compliant with the Arm Arm)
- Evaluate the performance
diff
ified.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changelog since v1:
* Rebase
* Fix typoes
diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index d2651c9486..4f339efb7b 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/arm6
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_mfns_in_direct_map(mfn, 1) because these two are equivalent. The
extra comparison in arch_mfns_in_direct_map() looks different but b
From: Hongyan Xia
Also add a helper function to retrieve it. Change arch_mfns_in_direct_map
to check this option before returning.
This is added as a Kconfig option as well as a boot command line option.
While being generic, the Kconfig option is only usable for x86 at the moment.
Signed-off-by
From: Wei Liu
It is going to be needed by HVM and idle domain as well, because without
the direct map, both need a mapcache to map pages.
This only lifts the mapcache variable up. Whether we populate the
mapcache for a domain is unchanged in this patch.
Signed-off-by: Wei Liu
Signed-off-by: We
alised the mapcache for HVM domains. With this patch, PV, HVM,
idle domains now all initialise the mapcache.
Signed-off-by: Wei Wang
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Free resources if mapcache initialisa
are less change. So
all the Arm fixmap slots will now be prefixed with FIX rather than
FIXMAP.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Reviewed-by: Henry Wang
Reviewed-by: Jan Beulich
Reviewed-by: Stefano Stabellini
Note that potentially more renaming that
just the first page.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
* Rename vmap_contig_pages() to vmap_contig()
* Rename nr_pages to nr to be consistent with vmap() parameters
* Pass the whole regio
From: Hongyan Xia
This avoids the assumption that boot pages are in the direct map.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
There was a discussion with Jan regarding early failure vs
disable NUMA. I am strongly in favor of the
From: Hongyan Xia
Building a PV dom0 is allocating from the domheap but uses it like the
xenheap. Use the pages as they should be.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Clarify the commit message
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
See the
Signed-off-by: Elias El Yandouzi
The PMAP infrastructure was upstream separately for Arm since
Hongyan sent the secret-free hypervisor series. So this is a new
patch to plumb the feature on x86.
Changes in v2:
* Declare PMAP entries earlier in fixed_addresses
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in V2:
* Get rid of mfn_to_virt
*
ic?).
=== Future of secret-free hypervisor ===
There are some information in an e-mail from Andrew a few years ago:
https://lore.kernel.org/xen-devel/e3219697-0759-39fc-2486-715cdec1c...@citrix.com/
Cheers,
[1] https://lore.kernel.org/xen-devel/cover.1588278317.git.hongy...@amazon.com/
*** BLUR
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
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
the given address. Take the opportunity
to replace the open-coded version.
Note that vfree() was storing the type of the area in a local variable.
But this seems to have never been used (even when it was introduced).
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes
Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
- The return of map_pages_to_xen() is now checked in a separate
patch
- Clarify the commit message
- Group the new boolean with the others
diff --git a/xen/arch/arm/setup.c
From: Hongyan Xia
The root page table is allocated from the domheap and isn't
mapped by default. Map it on demand to build pv shim domain.
Signed-off-by: Hongyan Xia
Signed-off-by: Elias El Yandouzi
Changes in v2:
* New patch
diff --git a/xen/arch/x86/pv/dom0_build.c
t all.
As this is boot code, use BUG_ON() to check if map_pages_to_xen() has
succeeded.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changes in v2:
- New patch
diff --git a/xen/common/vmap.c b/xen/common/vmap.c
index 330e2ba897..830f64c5ef 100644
--- a/xen/c
Hi,
Newbie mistake, I didn't number the patches, I'll resend the series.
Sorry for the noise.
On 16/01/2024 18:50, Elias El Yandouzi wrote:
Hi all,
A few years ago, Wei Liu implemented a PoC to remove the directmap
from Xen. The last version was sent by Hongyan Xia [1].
I will
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_mfns_in_direct_map(mfn, 1) because these two are equivalent. The
extra comparison in arch_mfns_in_direct_map() looks different but b
, we
already have enough memory in the heap allocator in the 1st node.
Signed-off-by: Hongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b813ea75b5..3b698c8c41 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86
ified.
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
Changelog since v1:
* Rebase
* Fix typoes
diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index d2651c9486..4f339efb7b 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/arm6
ongyan Xia
Signed-off-by: Julien Grall
Signed-off-by: Elias El Yandouzi
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 3b698c8c41..84c496ac4a 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -976,6 +976,57 @@ static struct domain *__init create_dom0(const module
1 - 100 of 129 matches
Mail list logo