[PATCH v2 2/3] xen/riscv: initialize .bss section

2023-03-02 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes since v1: * initialization of .bss was moved to head.S --- xen/arch/riscv/include/asm/asm.h | 4 xen/arch/riscv/riscv64/head.S| 9 + 2 files changed, 13 insertions(+) diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv

[PATCH v4 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-03-02 Thread Oleksii Kurochko
g frame and macros (bug_*()) related to the 'struct bug_frame' * Introduce BUG_INSTR and BUG_ASM_CONST to make _ASM_BUGFRAME_TEXT reusable between architectures * Make macros related to bug frame structure more generic. Signed-off-by: Oleksii Kurochko --- Changes in V4: * common/bug.c:

[PATCH v4 2/4] xen: change to

2023-03-02 Thread Oleksii Kurochko
redundant redeclaration of ... In the following two patches x86 and ARM archictectures will be switched fully: * xen/arm: switch ARM to use generic implementation of bug.h * xen/x86: switch x86 to use generic implemetation of bug.h Signed-off-by: Oleksii Kurochko --- Changes in V4:

[PATCH v4 3/4] xen/arm: switch ARM to use generic implementation of bug.h

2023-03-02 Thread Oleksii Kurochko
implementation of bug.h macros to generic one Signed-off-by: Oleksii Kurochko --- Changes in V4: * Switch ARM implementation to generic one * Remove BUG_FN_REG from arm{16,32}/bug.h as it isn't needed after switch to generic implementation * Update commit message --- Changes in V3: * As prototype and what

[PATCH v4 4/4] xen/x86: switch x86 to use generic implemetation of bug.h

2023-03-02 Thread Oleksii Kurochko
-by: Oleksii Kurochko --- Changes in V4: * Back comment /* !__ASSEMBLY__ */ for #else case in * Remove changes related to x86/.../asm/debuger.h as do_bug_frame() prototype was updated and cpu_user_regs isn't const any more. --- Changes in V3: * As prototype and what do_bug_frame() returns

[PATCH v4 0/4] introduce generic implementation of macros from bug.h

2023-03-02 Thread Oleksii Kurochko
ic do_bug_frame() uses bug_ptr(). * Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable between x86 and RISC-V. * Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and find_bug_frame() ) --- Oleksii Kurochko (4): xen: introduce CONFIG_GENERIC_BUG_FRAME xen

[PATCH v1] xen/arm: align *(.proc.info) in the linker script

2023-03-01 Thread Oleksii Kurochko
EN) (XEN) Reboot in five seconds... (XEN) Xen: Platform reset did not work properly! (XEN) Xen: Platform reset did not work properly! Signed-off-by: Oleksii Kurochko --- xen/arch/arm/xen.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S inde

[PATCH v1 2/3] xen/riscv: setup initial pagetables

2023-02-24 Thread Oleksii Kurochko
Calculate load and linker linker image addresses and setup initial pagetables. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index b7cd438a1d..f69bc278bb 100644

[PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-24 Thread Oleksii Kurochko
. Origin: https://gitlab.com/xen-on-risc-v/xen/-/tree/riscv-rebase 4af165b468af Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/include/asm/mm.h | 9 ++ xen/arch/riscv/include/asm/page.h | 90 xen/arch/riscv/mm.c | 223

[PATCH v1 0/3] enable MMU for RISC-V

2023-02-24 Thread Oleksii Kurochko
the built page table into the SATP 3. Enables MMU. 4. Updates smoke test to grep message which should be printed after MMU is enabled. Oleksii Kurochko (3): xen/riscv: introduce setup_initial_pages xen/riscv: setup initial pagetables automation: update RISC-V smoke test automation

[PATCH v1 3/3] automation: update RISC-V smoke test

2023-02-24 Thread Oleksii Kurochko
The smoke test was updated to verify that MMU has been enabled. Signed-off-by: Oleksii Kurochko --- automation/scripts/qemu-smoke-riscv64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv64.sh

[PATCH] xen/riscv: disable fpu

2023-02-24 Thread Oleksii Kurochko
Disable FPU to detect illegal usage of floating point in kernel space. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 593bb471a4..b7cd438a1d 100644 --- a/xen/arch/riscv

[PATCH] xen/riscv: init bss section

2023-02-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 154bf3a0bc..593bb471a4 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -24,6 +24,18 @@ static

[PATCH] xen/riscv: read hart_id and dtb_base passed by bootloader

2023-02-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 12 1 file changed, 12 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index b3f8b10f71..154bf3a0bc 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -26,6 +26,18 @@ static

[PATCH v4 5/5] automation: modify RISC-V smoke test

2023-02-24 Thread Oleksii Kurochko
The patch modifies the grep pattern to reflect the usage of WARN. Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis Acked-by: Stefano Stabellini --- Changes in V4: - Add Reviewed-by: Alistair Francis and Acked-by: Stefano Stabellini --- Changes in V3: - Update commit message

[PATCH v4 3/5] xen/riscv: introduce an implementation of macros from

2023-02-24 Thread Oleksii Kurochko
The patch introduces macros: BUG(), WARN(), run_in_exception(), assert_failed. The implementation uses "ebreak" instruction in combination with diffrent bug frame tables (for each type) which contains useful information. Signed-off-by: Oleksii Kurochko --- Changes in V4: - Updates i

[PATCH v4 1/5] xen/riscv: introduce decode_cause() stuff

2023-02-24 Thread Oleksii Kurochko
The patch introduces stuff needed to decode a reason of an exception. Signed-off-by: Oleksii Kurochko --- Changes in V4: - fix string in decode_reserved_interrupt_cause() --- Changes in V3: - Nothing changed --- Changes in V2: - Make decode_trap_cause() more optimization friendly

[PATCH v4 4/5] xen/riscv: test basic handling stuff

2023-02-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- Changes in V4: - Add Acked-by: Alistair Francis --- Changes in V3: - Nothing changed --- Changes in V2: - Nothing changed --- xen/arch/riscv/setup.c | 16 1 file changed, 16 insertions(+) diff --git a/xen

[PATCH v4 2/5] xen/riscv: introduce trap_init()

2023-02-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V4: - Nothing changed --- Changes in V3: - Nothing changed --- Changes in V2: - Rename setup_trap_handler() to trap_init(). - Add Reviewed-by to the commit message. --- xen/arch/riscv/include/asm/traps.h | 1

[PATCH v4 0/5] RISCV basic exception handling implementation

2023-02-24 Thread Oleksii Kurochko
tch series. - Refactor bug.h, remove bug_instr_t type from it. - Refactor decode_trap_cause() function to be more optimization-friendly. - Add two new empty headers: and as they are needed to include which provides ARRAY_SIZE and other macros. - Code style fixes. --- Oleksii Kurochk

[PATCH v3 2/4] xen: change to

2023-02-24 Thread Oleksii Kurochko
Since the generic version of bug.h stuff was introduced use instead of unnecessary Signed-off-by: Oleksii Kurochko --- Changes in V3: * Update patch 2 not to break compilation: move some parts from patches 3 and 4 to patch 2: * move some generic parts from to * add define

[PATCH v3 4/4] xen/x86: switch x86 to use generic implemetation of bug.h

2023-02-24 Thread Oleksii Kurochko
-by: Oleksii Kurochko --- Changes in V3: * As prototype and what do_bug_frame() returns was changed so patch 3 and 4 was updated to use a new version of do_bug_frame * MODIFIER was change to BUG_ASM_CONST to align with generic implementation --- Changes in V2: * Remove all unnecessary things

[PATCH v3 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-02-24 Thread Oleksii Kurochko
of do_bug_frame * new config CONFIG_GENERIC_BUG_FRAME Signed-off-by: Oleksii Kurochko --- Changes in V3: * Add debugger_trap_fatal() to do_bug_frame(). It simplifies usage of do_bug_frame() for x86 so making handle_bug_frame() and find_bug_frame() not needed anymore. * Update do_bug_frame

[PATCH v3 3/4] xen/arm: switch ARM to use generic implementation of bug.h

2023-02-24 Thread Oleksii Kurochko
() to bug_ptr() to align it with generic implementation. Signed-off-by: Oleksii Kurochko --- Changes in V3: * As prototype and what do_bug_frame() returns was changed so patch 3 and 4 was updated to use a new version of do_bug_frame --- Changes in V2: * Rename bug_file() in ARM implementation

[PATCH v3 0/4] introduce generic implementation of macros from bug.h

2023-02-24 Thread Oleksii Kurochko
s bug_ptr(). * Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable between x86 and RISC-V. * Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and find_bug_frame() ) --- Oleksii Kurochko (4): xen: introduce CONFIG_GENERIC_BUG_FRAME xen: change to xen/ar

[PATCH v2 4/4] xen/x86: switch x86 to use generic implemetation of bug.h

2023-02-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: * Remove all unnecessary things from as they were introduced in . * Define BUG_INSTR = 'ud2' and MODIFIER = 'c' ( it is needed to skip '$' when use an imidiate in x86 assembly ) * Update do_invalid_op() to re-use handle_bug_frame

[PATCH v2 3/4] xen/arm: switch ARM to use generic implementation of bug.h

2023-02-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: * Rename bug_file() in ARM implementation to bug_ptr() as generic do_bug_frame() uses bug_ptr(). * Remove generic parts from bug.h * Remove declaration of 'int do_bug_frame(...)' from as it was introduced in --- xen/arch/arm/Kconfig

[PATCH v2 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-02-20 Thread Oleksii Kurochko
of do_bug_frame() * new config CONFIG_GENERIC_BUG_FRAME Signed-off-by: Oleksii Kurochko --- Changes in V2: - Switch to x86 implementation as generic as it is more compact ( at least from the point of view of bug frame structure ). - Rename CONFIG_GENERIC_DO_BUG_FRAME

[PATCH v2 0/4] introduce generic implementation of macros from bug.h

2023-02-20 Thread Oleksii Kurochko
more generic. * Rename bug_file() in ARM implementation to bug_ptr() as generic do_bug_frame() uses bug_ptr(). * Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable between x86 and RISC-V. * Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and find_bug_frame()

[PATCH v2 2/4] xen: change to

2023-02-20 Thread Oleksii Kurochko
Since the generic version of bug.h stuff was introduced use instead of unnecessary Signed-off-by: Oleksii Kurochko --- Changes in V2: * Put [PATCH v1 4/4] xen: change to as second patch, update the patch to change all to among the whole project to not break build. * Update

[PATCH v3 13/14] xen/riscv: test basic handling stuff

2023-02-07 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V3: - Nothing changed --- Changes in V2: - Nothing changed --- xen/arch/riscv/setup.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index d502cf06b0..8d070244fd 100644

[PATCH v3 14/14] automation: modify RISC-V smoke test

2023-02-07 Thread Oleksii Kurochko
The patch modifies the grep pattern to reflect the usage of WARN. Signed-off-by: Oleksii Kurochko --- Changes in V3: - Update commit message --- Changes in V2: - Leave only the latest "grep ..." --- automation/scripts/qemu-smoke-riscv64.sh | 2 +- 1 file changed, 1 insertion(+),

[PATCH v3 09/14] xen/riscv: introduce decode_cause() stuff

2023-02-07 Thread Oleksii Kurochko
The patch introduces stuff needed to decode a reason of an exception. Signed-off-by: Oleksii Kurochko --- Changes in V3: - Nothing changed --- Changes in V2: - Make decode_trap_cause() more optimization friendly. - Merge the pathc which introduces do_unexpected_trap() to the current one

[PATCH v3 11/14] xen/riscv: introduce trap_init()

2023-02-07 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V3: - Nothing changed --- Changes in V2: - Rename setup_trap_handler() to trap_init(). - Add Reviewed-by to the commit message. --- xen/arch/riscv/include/asm/traps.h | 1 + xen/arch/riscv/setup.c | 4

[PATCH v3 12/14] xen/riscv: introduce an implementation of macros from

2023-02-07 Thread Oleksii Kurochko
The patch introduces macros: BUG(), WARN(), run_in_exception(), assert_failed. The implementation uses "ebreak" instruction in combination with diffrent bug frame tables (for each type) which contains useful information. Signed-off-by: Oleksii Kurochko --- Changes in V3: - Rebase

[PATCH v3 08/14] xen/riscv: introduce exception handlers implementation

2023-02-07 Thread Oleksii Kurochko
The patch introduces an implementation of basic exception handlers: - to save/restore context - to handle an exception itself. The handler calls wait_for_interrupt now, nothing more. Signed-off-by: Oleksii Kurochko --- Changes in V3: - Nothing changed --- Changes in V2: - Refactor entry.S

[PATCH v3 00/14] RISCV basic exception handling implementation

2023-02-07 Thread Oleksii Kurochko
pdate correspondingly the patches in the patch series. - Refactor bug.h, remove bug_instr_t type from it. - Refactor decode_trap_cause() function to be more optimization-friendly. - Add two new empty headers: and as they are needed to include which provides ARRAY_SIZE and other macro

[PATCH v3 03/14] xen/riscv: add

2023-02-07 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- Changes in V3: - Add Acked-by: Alistair Francis --- Changes in V2: - Take the latest version of riscv_encoding.h from OpenSBI. - Update riscv_encoding.h with Xen related changes mentioned in the commit message. - Update comm

[PATCH v3 10/14] xen/riscv: mask all interrupts

2023-02-07 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V3: - Nothing changed --- Changes in V2: - Add Reviewed-by to the commit message --- xen/arch/riscv/riscv64/head.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch

[PATCH v3 07/14] xen/riscv: introduce exception context

2023-02-07 Thread Oleksii Kurochko
eded for current status of the RISC-V port - register_t renamed to unsigned long - rename wait_for_interrupt to wfi Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko --- Changes in V3: - update code style for die() function --- Changes in V2: - All the changes were a

[PATCH v3 05/14] xen/riscv: introduce empty

2023-02-07 Thread Oleksii Kurochko
To include is required Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- Changes in V3: - Add Acked-by: Alistair Francis --- Changes in V2: - is a new empty header which is required to include --- xen/arch/riscv/include/asm/string.h | 6 ++ 1 file changed, 6

[PATCH v3 04/14] xen/riscv: add header

2023-02-07 Thread Oleksii Kurochko
The following changes were made in comparison with from Linux: * remove all defines as they are defined in riscv_encoding.h * leave only csr_* macros Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ d2d11f342b17 Signed-off-by: Oleksii Kurochko --- Changes in V3

[PATCH v3 06/14] xen/riscv: introduce empty

2023-02-07 Thread Oleksii Kurochko
To include is required Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- Changes in V3: - Add Acked-by: Alistair Francis --- Changes in V2: - is a new empty header which is required to include --- xen/arch/riscv/include/asm/cache.h | 6 ++ 1 file changed, 6

[PATCH v3 02/14] xen/riscv: add header

2023-02-07 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V3: - Nothing changed --- Changes in V2: - Nothing changed --- xen/arch/riscv/include/asm/asm.h | 54 1 file changed, 54 insertions(+) create mode 100644 xen/arch/riscv/include/asm/asm.h diff --git a/xen/arch

[PATCH v3 01/14] xen/riscv: change ISA to r64G

2023-02-07 Thread Oleksii Kurochko
-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V3: - Change the name of config RISCV_ISA_RV64IMA to RISCV_ISA_RV64G as instructions from Zicsr and Zifencei extensions aren't part of I extension any more. --- Changes in V2: - Nothing changed --- xen/arch/riscv

[PATCH v10 2/2] automation: add RISC-V smoke test

2023-02-07 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V10: - Nothing changed --- Changes in V9

[PATCH v10 1/2] xen/riscv: introduce early_printk basic stuff

2023-02-07 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v10 0/2] Basic early_printk and smoke test implementation

2023-02-07 Thread Oleksii Kurochko
5: - Nothing changed --- Changes in V4: - Nothing changed --- Changes in V3: - Nothing changed - All mentioned comments by Stefano in Xen mailing list will be fixed as a separate patch out of this patch series. --- Oleksii Kurochko (2): xen/riscv: introduce early_printk basic stuff automa

[PATCH v9 1/2] xen/riscv: introduce early_printk basic stuff

2023-02-07 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v9 0/2] Basic early_printk and smoke test implementation

2023-02-07 Thread Oleksii Kurochko
All mentioned comments by Stefano in Xen mailing list will be fixed as a separate patch out of this patch series. --- Oleksii Kurochko (2): xen/riscv: introduce early_printk basic stuff automation: add RISC-V smoke test automation/gitlab-ci/test.yaml| 20 ++ automa

[PATCH v9 2/2] automation: add RISC-V smoke test

2023-02-07 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V9: - Nothing changed --- Changes in V8: - Set

[PATCH v1 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-02-03 Thread Oleksii Kurochko
header * generic implementation of do_bug_frame() * new config CONFIG_GENERIC_BUG_FRAME Signed-off-by: Oleksii Kurochko --- xen/common/Kconfig| 6 ++ xen/common/Makefile | 1 + xen/common/bug.c | 88 + xen/include/xen/bug.h | 127

[PATCH v1 2/4] xen/arm: switch ARM to use generic implementation of bug.h

2023-02-03 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/arm/Kconfig | 1 + xen/arch/arm/include/asm/bug.h | 86 xen/arch/arm/include/asm/div64.h | 2 +- xen/arch/arm/traps.c | 79 - xen/arch/arm/vgic/vgic-v2.c

[PATCH v1 0/4] introduce generic implementation of macros from bug.h

2023-02-03 Thread Oleksii Kurochko
only common parts was removed from . RISC-V will be switched to use and in the future, it will use common the version of do_bug_frame() when xen/common will work for RISC-V. Oleksii Kurochko (4): xen: introduce CONFIG_GENERIC_BUG_FRAME xen/arm: switch ARM to use generic implementation

[PATCH v1 4/4] xen: change to

2023-02-03 Thread Oleksii Kurochko
Since the generic version of bug.h stuff was introduced it is necessary to rename all uses of to Signed-off-by: Oleksii Kurochko --- xen/drivers/cpufreq/cpufreq.c | 2 +- xen/include/xen/lib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/drivers/cpufreq

[PATCH v1 3/4] xen/x86: switch x86 to use generic implemetation of bug.h

2023-02-03 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 +- xen/arch/x86/include/asm/asm_defns.h | 2 +- xen/arch/x86/include/asm/bug.h | 32 ++-- 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/xen/arch/x86/acpi/cpufreq

[PATCH v8 1/2] xen/riscv: introduce early_printk basic stuff

2023-01-31 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v8 0/2] Basic early_printk and smoke test implementation

2023-01-31 Thread Oleksii Kurochko
in test.yaml for .qemu-riscv64. --- Changes in V5: - Nothing changed --- Changes in V4: - Nothing changed --- Changes in V3: - Nothing changed - All mentioned comments by Stefano in Xen mailing list will be fixed as a separate patch out of this patch series. --- Oleksii Kurochko (2): xen

[PATCH v8 2/2] automation: update RISC-V smoke test

2023-01-31 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V8: - Set "needs: archlinux-current-gcc-ri

[PATCH v2 14/14] automation: add smoke test to verify macros from bug.h

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - Leave only the latest "grep ..." --- automation/scripts/qemu-smoke-riscv64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv6

[PATCH v2 13/14] xen/riscv: test basic handling stuff

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - Nothing changed --- xen/arch/riscv/setup.c | 17 + 1 file changed, 17 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index c8513ca4f8..bcff680fb5 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch

[PATCH v2 12/14] xen/riscv: introduce an implementation of macros from

2023-01-27 Thread Oleksii Kurochko
The patch introduces macros: BUG(), WARN(), run_in_exception(), assert_failed. The implementation uses "ebreak" instruction in combination with diffrent bug frame tables (for each type) which contains useful information. Signed-off-by: Oleksii Kurochko --- Changes: - Remove __

[PATCH v2 09/14] xen/riscv: introduce decode_cause() stuff

2023-01-27 Thread Oleksii Kurochko
The patch introduces stuff needed to decode a reason of an exception. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Make decode_trap_cause() more optimization friendly. - Merge the pathc which introduces do_unexpected_trap() to the current one. --- xen/arch/riscv/traps.c | 85

[PATCH v2 10/14] xen/riscv: mask all interrupts

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V2: - Add Reviewed-by to the commit message --- xen/arch/riscv/riscv64/head.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index d444dd8aad

[PATCH v2 07/14] xen/riscv: introduce exception context

2023-01-27 Thread Oleksii Kurochko
eded for current status of the RISC-V port - register_t renamed to unsigned long - rename wait_for_interrupt to wfi Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko --- Changes in V2: - All the changes were added to the commit message. - temporarily was added function

[PATCH v2 11/14] xen/riscv: introduce trap_init()

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis --- Changes in V2: - Rename setup_trap_handler() to trap_init(). - Add Reviewed-by to the commit message. --- xen/arch/riscv/include/asm/traps.h | 1 + xen/arch/riscv/setup.c | 4 xen/arch/riscv/traps.c

[PATCH v2 05/14] xen/riscv: introduce empty

2023-01-27 Thread Oleksii Kurochko
To include is required Signed-off-by: Oleksii Kurochko --- Changes in V2: - is a new empty header which is required to include --- xen/arch/riscv/include/asm/string.h | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 xen/arch/riscv/include/asm/string.h diff --git a/xen

[PATCH v2 04/14] xen/riscv: add header

2023-01-27 Thread Oleksii Kurochko
The following changes were made in comparison with from Linux: * remove all defines as they are defined in riscv_encoding.h * leave only csr_* macros Origin: https://github.com/torvalds/linux.git 2475bf0250de Signed-off-by: Oleksii Kurochko --- Changes in V2: - Minor refactoring mentioned

[PATCH v2 08/14] xen/riscv: introduce exception handlers implementation

2023-01-27 Thread Oleksii Kurochko
The patch introduces an implementation of basic exception handlers: - to save/restore context - to handle an exception itself. The handler calls wait_for_interrupt now, nothing more. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Refactor entry.S to start using of defines introduced

[PATCH v2 06/14] xen/riscv: introduce empty

2023-01-27 Thread Oleksii Kurochko
To include is required Signed-off-by: Oleksii Kurochko --- Changes in V2: - is a new empty header which is required to include --- xen/arch/riscv/include/asm/cache.h | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 xen/arch/riscv/include/asm/cache.h diff --git a/xen

[PATCH v2 03/14] xen/riscv: add

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - Take the latest version of riscv_encoding.h from OpenSBI. - Update riscv_encoding.h with Xen related changes mentioned in the commit message. - Update commit message and add "Origin:" tag --- xen/arch/riscv/include/asm/ri

[PATCH v2 00/14] RISCV basic exception handling implementation

2023-01-27 Thread Oleksii Kurochko
unction to be more optimization-friendly. - Add two new empty headers: and as they are needed to include which provides ARRAY_SIZE and other macros. - Code style fixes. --- Oleksii Kurochko (14): xen/riscv: add _zicsr to CFLAGS xen/riscv: add header xen/riscv: add header xen/riscv:

[PATCH v2 01/14] xen/riscv: add _zicsr to CFLAGS

2023-01-27 Thread Oleksii Kurochko
Work with some registers requires csr command which is part of Zicsr. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Nothing changed --- xen/arch/riscv/arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index

[PATCH v2 02/14] xen/riscv: add header

2023-01-27 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V2: - Nothing changed --- xen/arch/riscv/include/asm/asm.h | 54 1 file changed, 54 insertions(+) create mode 100644 xen/arch/riscv/include/asm/asm.h diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv

[PATCH v7 2/2] automation: add RISC-V smoke test

2023-01-27 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V7: - Fix dependecy for qemu-smoke-riscv64-gcc

[PATCH v7 0/2] Basic early_printk and smoke test implementation

2023-01-27 Thread Oleksii Kurochko
g.debug - Move dockerfile changes to separate config and sent them as separate patch to mailing list. - Update test.yaml to wire up smoke test --- Oleksii Kurochko (2): xen/riscv: introduce early_printk basic stuff automation: add RISC-V smoke test automation/gitlab-ci/test.yaml

[PATCH v7 1/2] xen/riscv: introduce early_printk basic stuff

2023-01-27 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v6 1/2] xen/riscv: introduce early_printk basic stuff

2023-01-27 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v6 2/2] automation: add RISC-V smoke test

2023-01-27 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V6: - Rename container name in test.yaml

[PATCH v6 0/2] Basic early_printk and smoke test implementation

2023-01-27 Thread Oleksii Kurochko
list comments - Remove unneeded types in - Introduce definition of STACK_SIZE - order the files alphabetically in Makefile - Add license to early_printk.c - Add RISCV_32 dependecy to config EARLY_PRINTK in Kconfig.debug - Move dockerfile changes to separate config and sent th

[PATCH v1 11/14] xen/riscv: introduce setup_trap_handler()

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index d09ffe1454..174e134c93 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,16 +1,27 @@ #include

[PATCH v1 14/14] automation: add smoke test to verify macros from bug.h

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- automation/scripts/qemu-smoke-riscv64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv64.sh index e0f06360bc..e7cc7f1442 100755 --- a/automation/scripts/qemu-smoke-riscv64

[PATCH v1 10/14] xen/riscv: mask all interrupts

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/riscv64/head.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index d444dd8aad..ffd95f9f89 100644 --- a/xen/arch/riscv/riscv64/head.S +++ b/xen/arch/riscv/riscv64/head.S

[PATCH v1 12/14] xen/riscv: introduce an implementation of macros from

2023-01-20 Thread Oleksii Kurochko
The patch introduces macros: BUG(), WARN(), run_in_exception(), assert_failed. The implementation uses "ebreak" instruction in combination with diffrent bug frame tables (for each type) which contains useful information. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include

[PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-20 Thread Oleksii Kurochko
The patch introduces an implementation of basic exception handlers: - to save/restore context - to handle an exception itself. The handler calls wait_for_interrupt now, nothing more. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile| 2 + xen/arch/riscv/entry.S

[PATCH v1 04/14] xen/riscv: add header

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/csr.h | 82 1 file changed, 82 insertions(+) create mode 100644 xen/arch/riscv/include/asm/csr.h diff --git a/xen/arch/riscv/include/asm/csr.h b/xen/arch/riscv/include/asm/csr.h new file mode 100644

[PATCH v1 09/14] xen/riscv: introduce do_unexpected_trap()

2023-01-20 Thread Oleksii Kurochko
The patch introduces the function the purpose of which is to print a cause of an exception and call "wfi" instruction. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/traps.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/traps.c

[PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-20 Thread Oleksii Kurochko
and removed unneeded things from it now. Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/processor.h | 114 + 1 file changed, 114 insertions(+) create mode 100644 xen/arch/riscv/include/asm/processor.h diff --git a/xen/arch/riscv

[PATCH v1 01/14] xen/riscv: add _zicsr to CFLAGS

2023-01-20 Thread Oleksii Kurochko
Work with some registers requires csr command which is part of Zicsr. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 012dc677c3..95b41d9f3e 100644 --- a/xen/arch

[PATCH v1 05/14] xen/riscv: add early_printk_hnum() function

2023-01-20 Thread Oleksii Kurochko
Add ability to print hex number. It might be useful to print register value as debug information in BUG(), WARN(), etc... Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/early_printk.c | 39 +++ xen/arch/riscv/include/asm/early_printk.h | 2 ++ 2 files

[PATCH v1 13/14] xen/riscv: test basic handling stuff

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 174e134c93..35ab9d25c6 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,6

[PATCH v1 03/14] xen/riscv: add

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/riscv_encoding.h | 945 1 file changed, 945 insertions(+) create mode 100644 xen/arch/riscv/include/asm/riscv_encoding.h diff --git a/xen/arch/riscv/include/asm/riscv_encoding.h b/xen/arch/riscv/include/asm

[PATCH v1 08/14] xen/riscv: introduce decode_cause() stuff

2023-01-20 Thread Oleksii Kurochko
The patch introduces stuff needed to decode a reason of an exception. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/traps.c | 88 ++ 1 file changed, 88 insertions(+) diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c index 3201b851ef

[PATCH v1 00/14] RISCV basic exception handling implementation

2023-01-20 Thread Oleksii Kurochko
should be definitely changed in the neareset future. It wasn't implemented show_execution_state() and stack trace discovering as it's not necessary now. Oleksii Kurochko (14): xen/riscv: add _zicsr to CFLAGS xen/riscv: add header xen/riscv: add header xen/riscv: add early_printk_hnum()

[PATCH v1 02/14] xen/riscv: add header

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/asm.h | 54 1 file changed, 54 insertions(+) create mode 100644 xen/arch/riscv/include/asm/asm.h diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv/include/asm/asm.h new file mode 100644

[PATCH v5 3/5] xen/riscv: introduce sbi call to putchar to console

2023-01-19 Thread Oleksii Kurochko
. Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko Reviewed-by: Bobby Eshleman Reviewed-by: Alistair Francis --- Changes in V5: - Nothing critical was changed - Code style fixes - Remove unneeded from sbi.c --- Changes in V4: - Nothing changed --- Changes in V3

[PATCH v5 5/5] automation: add RISC-V smoke test

2023-01-19 Thread Oleksii Kurochko
Add check if there is a message 'Hello from C env' presents in log file to be sure that stack is set and C part of early printk is working. Signed-off-by: Oleksii Kurochko Acked-by: Stefano Stabellini Reviewed-by: Alistair Francis --- Changes in V5: - Nothing changed --- Changes in V4

[PATCH v5 4/5] xen/riscv: introduce early_printk basic stuff

2023-01-19 Thread Oleksii Kurochko
ow so there is no vscnprintf. This commit adds early printk implementation built on the putc SBI call. As sbi_console_putchar() is already being planned for deprecation it is used temporarily now and will be removed or reworked after real uart will be ready. Signed-off-by: Bobby Eshleman Signed-off-by: Ol

[PATCH v5 1/5] xen/include: Change to

2023-01-19 Thread Oleksii Kurochko
In the patch "include/types: move stddef.h-kind types to common header" [1] size_t was moved from to so early_printk should be updated correspondingly. [1] https://lore.kernel.org/xen-devel/5a0a9e2a-c116-21b5-8081-db75fe417...@suse.com/ Signed-off-by: Oleksii Kurochko --- xen/i

[PATCH v5 2/5] xen/riscv: introduce asm/types.h header file

2023-01-19 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - Remove size_t from asm/types after rebase on top of the patch "include/types: move stddef.h-kind types to common header" [1]. - All other types were back as they are used in and in xen/common. --- Cha

<    2   3   4   5   6   7   8   >