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

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





On 17/01/2024 17:38, Carlo Nonato wrote:
Hi Julien

Hi Carlo,

On Tue, Jan 16, 2024 at 3:37 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.


[...]

@@ -304,6 +307,16 @@ smp_prepare_cpus(void)
      if ( rc )
          panic("Unable to allocate CPU sibling/core maps\n");

+    /* Create a trampoline to confirm early boot code is self-contained */
+    trampoline = alloc_xenheap_page();
+    BUG_ON(!trampoline);
+
+    memcpy(trampoline, _start, PAGE_SIZE);
+    clean_dcache_va_range(trampoline, PAGE_SIZE);
+    invalidate_icache();
+
+    printk("Trampoline 0x%lx\n", virt_to_maddr(trampoline));

Here PRIx64 is needed for arm32.

Just for clarification, none of this patch is meant to work on Arm32. In fact, this would break secondary CPUs bring up.

This is why I tagged with DO NOT COMMIT. It was only included to show I tested this code on arm32.

Cheers,

--
Julien Grall



 


Rackspace

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