[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] [DO NOT COMMIT] xen/arm: Create a trampoline for secondary boot CPUs





On 16/01/2024 14:24, Carlo Nonato wrote:
Hi Julien,

On Tue, Jan 16, 2024 at 12:55 PM Julien Grall <julien@xxxxxxx> wrote:

From: Julien Grall <jgrall@xxxxxxxxxx>

In order to confirm the early boot code is self-contained, allocate a
separate trampoline region for secondary to boot from it.

Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
---
  xen/arch/arm/arm64/mmu/mm.c |  7 +++++++
  xen/arch/arm/mmu/smpboot.c  |  4 +++-
  xen/arch/arm/psci.c         |  5 ++++-
  xen/arch/arm/smpboot.c      | 15 ++++++++++++++-
  4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/arm64/mmu/mm.c b/xen/arch/arm/arm64/mmu/mm.c
index d2651c948698..3c4988dc75d1 100644
--- a/xen/arch/arm/arm64/mmu/mm.c
+++ b/xen/arch/arm/arm64/mmu/mm.c
@@ -110,11 +110,18 @@ void __init arch_setup_page_tables(void)
      prepare_runtime_identity_mapping();
  }

+extern mfn_t trampoline_start;
+
  void update_identity_mapping(bool enable)
  {
      paddr_t id_addr = virt_to_maddr(_start);
      int rc;

+    if ( !mfn_eq(trampoline_start, INVALID_MFN) )
+    {
+        id_addr = mfn_to_maddr(trampoline_start);
+    }
+
      if ( enable )
          rc = map_pages_to_xen(id_addr, maddr_to_mfn(id_addr), 1,
                                PAGE_HYPERVISOR_RX);
diff --git a/xen/arch/arm/mmu/smpboot.c b/xen/arch/arm/mmu/smpboot.c
index f1cf9252710c..d768dfe065a5 100644
--- a/xen/arch/arm/mmu/smpboot.c
+++ b/xen/arch/arm/mmu/smpboot.c
@@ -72,13 +72,15 @@ static void clear_boot_pagetables(void)
      clear_table(boot_third);
  }

+extern mfn_t trampoline_start;
+
  static void set_init_ttbr(lpae_t *root)

Isn't this function not present in the patch series?

Oh. It looks like I forgot to post one patch. Let me resend it.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.