[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 3/8] xen/riscv: introduce stack stuff
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Fri, 6 Jan 2023 14:55:44 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y6nqwjCeO6yIH8eftBJ7Xpict7gjEx2x3YmP+N15b4c=; b=ZrtkplRlKvwTWfAyVK03tMEA+y+9i4lu8aXzV3KJ2BXQl/HSsQV/DaXAjpOrhJT7yZCZ/UI7PrFFbq0PMtfFlZ71FrgPT9s14cVSZZTkcYIhIQFHSr/fNse+YnsrLnloAf+HYlnjt0cueXc71SQoS47x9Domz7tvvqpjmHaRsYaycSARA31GLUwKMmuSTlLSldQ6ep9omizZ8K7VS6SmZfK9IuslSjOP7vzH4WKaAmrzWjbdR1g6olYOSzc++qPqGwG0FlmHnYn7+/quLEMfZaKMMB+WlthyaS2fM+SzPp18sMCAMvdM56zPsAu0X/BA13mhyYuBZVJNmWdaouFPsA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4YR2n1k8weDMCmcqvXEEtZ4lP/nhok4woeIP7Okv76b+8VH2AV/RLAGd8n67RwoaK0uVbLovQNRCV88x5EbTvjvjSJSfgVUVGmv3E7dsnl5MQ5H9YxE6yRlKykV09ecMnzaxXq4HFYP6labhCBBfXTi53yh3Gj4YoutM7J2+rBLjhjjp0PvOyOtaVwnvD0mhH04R07PwpHf2gpCcymmE2IWmZ1kXuTt42xINC4MLSUVTofNsf/TZ1l7n09KxfO6kCI2r2yMGbtb7ciWzGqTkg/H5jnIQnk99vNUOx3EFV3bGES+SINUB1XsHGO4SYbvOMytg2jkHg6CfhhCE73N5w==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
- Delivery-date: Fri, 06 Jan 2023 15:05:00 +0000
- Ironport-data: A9a23:pyYw0aLtNcLAU0NvFE+RSpQlxSXFcZb7ZxGr2PjKsXjdYENSg2YGy mdLDGnUPfyDYmLzf41wPYy19k0FvpWAyIBrQFFlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHv+kUrWs1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPdwP9TlK6q4mhA5wRgPaojUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5vC2FV9 PMfAwokSTvblezm4Z7rdMpV05FLwMnDZOvzu1lG5BSAVbMMZ8+GRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/VvpTGLlGSd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnzHunA9hPRO3QGvhC3nOi4i8TOSwtCgGL++a/rEKadIhBN BlBksYphe1onKCxdfH6WxC7u3+F+B0BQd1bE+49wA6Iw6vQpQ2eAwAsXjNHLdArqsIybTgrz UOS2cPkAyR1t7+YQm7b8a2bxRupIjQcJ2IGYS4CTCMG7sPlrYV1iQjAJv5sEaezisD+EBnqw i6Ntyk4jPMYistj/6+891rWjimsopXMRwgd6QDeX2bj5QR8DKasY42z9VHa97BONo+fRVial GcIkI6V6+VmJZqKkiqKQukEArCyz/mAOTzYx1VoGvEcGy+F/neiecVa5m54LUIwasIcI2axO AnUpB9b44JVMD2yd6hrbomtCsMsi6/9CdDiUfOSZd1LCnRsSDK6EOhVTRb49wjQfIIEy/pX1 UuzGSp0MUsnNA==
- Ironport-hdrordr: A9a23:qvsDdqOPQCkUO8BcTgWjsMiBIKoaSvp037BK7S1MoH1uA6mlfq WV9sjzuiWatN98Yh8dcLO7Scu9qBHnlaKdiLN5VduftWHd01dAR7sSjrcKrQeAJ8X/nNQtr5 uJccJFeaDN5Y4Rt7eH3OG6eexQv+Vu6MqT9IPjJ+8Gd3ATV0lnhT0JbTqzIwlNayRtI4E2L5 aY7tovnUvaRZxGBv7LYEXsRoL41qT2qK4=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZIdDaBwrpw7Xp9EGdXN7qbTOW/a6RekUA
- Thread-topic: [PATCH v1 3/8] xen/riscv: introduce stack stuff
On 06/01/2023 1:14 pm, Oleksii Kurochko wrote:
> diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
> index 990edb70a0..ddc7104701 100644
> --- a/xen/arch/riscv/riscv64/head.S
> +++ b/xen/arch/riscv/riscv64/head.S
> @@ -1,4 +1,10 @@
> .section .text.header, "ax", %progbits
>
> ENTRY(start)
> - j start
> + la sp, cpu0_boot_stack
> + li t0, PAGE_SIZE
> + add sp, sp, t0
> +
> +_start_hang:
> + wfi
> + j _start_hang
> diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
> new file mode 100644
> index 0000000000..2c7dca1daa
> --- /dev/null
> +++ b/xen/arch/riscv/setup.c
> @@ -0,0 +1,6 @@
> +#include <xen/init.h>
> +#include <xen/compile.h>
> +
> +/* Xen stack for bringing up the first CPU. */
> +unsigned char __initdata cpu0_boot_stack[PAGE_SIZE]
> + __aligned(PAGE_SIZE);
Ah, I didn't spot his when looking at the unified delta of the series.
You want most of patch 7 merged into this, so we end up with
+void __init noreturn start_xen(void)
+{
+ for ( ;; )
+ asm volatile ("wfi");
+
+ unreachable();
+}
in setup.c too. That means we don't transiently add _start_hang just to
delete it 3 patches later. (And it will fix Jan's observation about the
misaligned operand.)
Adding the early_printk("Hello from C env\n"); line wants merging into
patch 6.
~Andrew
|