Re: [PATCH v2 4/5] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-03-11 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > For 1:1 direct-mapped dom0less DomUs, the magic pages should not clash > with any RAM region. To find a proper region for guest magic pages, > we can reuse the logic of finding domain extended regions. > > Extract the logic of finding domain

Re: [PATCH v2 3/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-03-11 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > There are some use cases where the toolstack needs to know the guest > memory map. For example, the toolstack helper application > "init-dom0less" needs to know the guest magic page regions for 1:1 > direct-mapped dom0less DomUs to allocate magic

Re: [PATCH v2 2/5] xen/domain.h: Centrialize is_domain_direct_mapped()

2024-03-08 Thread Michal Orzel
efine a stub is_domain_direct_mapped() in arch > header. > > Move is_domain_direct_mapped() to a centralized place at xen/domain.h > and evaluate CDF_directmap for non-Arm architecture to 0. > > Signed-off-by: Henry Wang Shouldn't you add Suggested-by: Jan? Reviewed-by: Michal Orz

Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask

2024-03-08 Thread Michal Orzel
Hi Henry, On 08/03/2024 03:05, Henry Wang wrote: > Hi everyone, > > On 2/26/2024 6:43 PM, Michal Orzel wrote: >>>>> xen/arch/arm/smpboot.c | 6 +- >>>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>>> >>>>

Re: [PATCH v2 1/5] xen/arm: Rename assign_static_memory_11() for consistency

2024-03-08 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > Currently on Arm there are 4 functions to allocate memory as domain > RAM at boot time for different types of domains: > (1) allocate_memory(): To allocate memory for Dom0less DomUs that > do not use static memory. > (2)

Re: [RFC PATCH v2] xen/arm: improve handling of load/store instruction decoding

2024-03-07 Thread Michal Orzel
On 07/03/2024 11:02, Manos Pitsidianakis wrote: > > > Hi Michal, Alex, > > I'm responding to Michel but also giving my own review comments here. > > On Thu, 07 Mar 2024 10:40, Michal Orzel wrote: >> Hi Alex, >> >> NIT: RFC tag is no longer needed.

Re: [RFC PATCH v2] xen/arm: improve handling of load/store instruction decoding

2024-03-07 Thread Michal Orzel
Hi Alex, NIT: RFC tag is no longer needed. On 06/03/2024 17:56, Alex Bennée wrote: > > > While debugging VirtIO on Arm we ran into a warning due to memory > being memcpy'd across MMIO space. While the bug was in the mappings > the warning was a little confusing: > > (XEN) d47v2 Rn should

Re: [PATCH] x86+Arm: drop (rename) __virt_to_maddr() / __maddr_to_virt()

2024-03-05 Thread Michal Orzel
On 05/03/2024 20:24, Julien Grall wrote: > > > Hi Jan, > > The title is quite confusing. I would have expected the macro... > > On 05/03/2024 08:33, Jan Beulich wrote: >> There's no use of them anymore except in the definitions of the non- >> underscore-prefixed aliases. Rename the inline

[PATCH] docs/misra/rules.rst: Fix entry for 20.12 rule

2024-03-01 Thread Michal Orzel
/rules.rst: add rule 16.6 and 20.12") Signed-off-by: Michal Orzel --- Failed pipeline: https://gitlab.com/xen-project/xen/-/pipelines/1196428827 --- docs/misra/rules.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index c1853669669d..

Re: [PATCH v2 1/3] docs/misra/rules.rst: add rule 16.6 and 20.12

2024-03-01 Thread Michal Orzel
On 01/03/2024 02:56, Stefano Stabellini wrote: > > > Hi all, > > This patch broke gitlab-ci. The jobs failing are the cppcheck jobs. > > xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j80 > No summary for rule 20.12 This is the error message. For rule 20.12, the summary and

Re: [PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
On 29/02/2024 13:40, Julien Grall wrote: > > > On 29/02/2024 12:37, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> >> On 29/02/2024 13:35, Julien Grall wrote: >>> On 29/02/2024 12:13, Michal Orzel wrote: >>>> Sinc

Re: [PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
Hi Julien, On 29/02/2024 13:35, Julien Grall wrote: > > > Hi Michal, > > On 29/02/2024 12:13, Michal Orzel wrote: >> Since commit bd1001db0af1 ("xen/arm: arm32: Allow Xen to boot on >> unidentified CPUs"), it's been possible to boot 32-bit Xen on ARMv8A

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-29 Thread Michal Orzel
On 29/02/2024 11:10, Julien Grall wrote: > > > Hi, > > On 29/02/2024 10:07, Michal Orzel wrote: >> >> >> On 28/02/2024 23:27, Stefano Stabellini wrote: >>> >>> >>> On Wed, 28 Feb 2024, Michal Orzel wrote: >>>> Hi Julien,

[PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
s uncommon and hasn't really been tested/hardened. Signed-off-by: Michal Orzel --- SUPPORT.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SUPPORT.md b/SUPPORT.md index a90d1108c9d9..acc61230bb5e 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -40,6 +40,7 @@ supported in this document. Status:

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-29 Thread Michal Orzel
On 28/02/2024 23:27, Stefano Stabellini wrote: > > > On Wed, 28 Feb 2024, Michal Orzel wrote: >> Hi Julien, >> >> On 28/02/2024 12:42, Julien Grall wrote: >>> >>> >>> Hi Michal, >>> >>> On 28/02/2024 10:35, Mich

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-28 Thread Michal Orzel
Hi Julien, On 28/02/2024 12:42, Julien Grall wrote: > > > Hi Michal, > > On 28/02/2024 10:35, Michal Orzel wrote: >> Commit 0441c3acc7e9 forgot to rename FIXMAP_CONSOLE to FIX_CONSOLE in >> TEMPORARY_EARLY_UART_VIRTUAL_ADDRESS macro. This results in a build >

[PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-28 Thread Michal Orzel
("xen/arm: fixmap: Rename the fixmap slots to follow the x86 convention") Signed-off-by: Michal Orzel --- xen/arch/arm/include/asm/early_printk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/early_printk.h b/xen/arch/arm/include/asm/earl

Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask

2024-02-26 Thread Michal Orzel
On 26/02/2024 10:54, Wang, Henry wrote: > [AMD Official Use Only - General] > > Hi Michal, > >> -Original Message- >> Subject: Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask >> >> Hi Henry, >> >> On 26/02/2024 04:01, Henry Wang wrote: >>> Signed-off-by: Henry Wang >> NIT: You

Re: [PATCH] xen/common: Do not allocate magic pages 1:1 for direct mapped domains

2024-02-26 Thread Michal Orzel
Hi Henry, On 26/02/2024 02:19, Henry Wang wrote: > An error message can seen from the init-dom0less application on > direct-mapped 1:1 domains: > ``` > Allocating magic pages > memory.c:238:d0v0 mfn 0x39000 doesn't belong to d1 > Error on alloc magic pages > ``` > > This is because

Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask

2024-02-26 Thread Michal Orzel
Hi Henry, On 26/02/2024 04:01, Henry Wang wrote: > In the common sysctl command XEN_SYSCTL_physinfo, the value of > cores_per_socket is calculated based on the cpu_core_mask of CPU0. > Currently on Arm this is a fixed value 1 (can be checked via xl info), > which is not correct. This is because

Re: [XEN v5 2/3] xen/arm: arm64: Add emulation of Debug Data Transfer Registers

2024-02-26 Thread Michal Orzel
Hi Ayan, On 23/02/2024 16:41, Ayan Kumar Halder wrote: > Hi, > > On 20/02/2024 12:17, Ayan Kumar Halder wrote: >> From: Michal Orzel >> >> Currently, if user enables HVC_DCC config option in Linux, it invokes access >> to debug data transfer registers (i.e. D

Re: [XEN v5 1/3] xen/arm: Introduce CONFIG_PARTIAL_EMULATION and "partial-emulation" cmd option

2024-02-21 Thread Michal Orzel
On 21/02/2024 13:20, Julien Grall wrote: > > > On 21/02/2024 11:33, Ayan Kumar Halder wrote: >> Hi Jan, >> >> On 21/02/2024 07:09, Jan Beulich wrote: >>> On 20.02.2024 16:22, Ayan Kumar Halder wrote: On 20/02/2024 12:33, Jan Beulich wrote: > On 20.02.2024 13:17, Ayan Kumar Halder

Re: [XEN v4 2/3] xen/arm: arm64: Add emulation of Debug Data Transfer Registers

2024-02-20 Thread Michal Orzel
Hi Julien, On 19/02/2024 19:48, Julien Grall wrote: > > > Hi Michal, > > On 19/02/2024 15:43, Michal Orzel wrote: > >> On 19/02/2024 15:45, Ayan Kumar Halder wrote: >>> >>> On 06/02/2024 19:05, Julien Grall wrote: >>>> Hi Ayan, >>&

Re: [XEN v4 2/3] xen/arm: arm64: Add emulation of Debug Data Transfer Registers

2024-02-19 Thread Michal Orzel
Hi Ayan, On 19/02/2024 15:45, Ayan Kumar Halder wrote: > > On 06/02/2024 19:05, Julien Grall wrote: >> Hi Ayan, > Hi Julien/Michal, >> >> On 31/01/2024 12:10, Ayan Kumar Halder wrote: >>> From: Michal Orzel >>> >>> Currently, if u

Re: [PATCH v9 1/7] automation: introduce fixed randconfig for RISC-V

2024-02-16 Thread Michal Orzel
Hi, On 16/02/2024 13:39, Oleksii Kurochko wrote: > > > This patch introduces the anchor riscv-fixed-randconfig, > which includes all configurations that should be disabled for > randconfig builds. > > Suggested-by: Stefano Stabellini > Signed-off-by: Oleksii Kuroc

Re: [PATCH] xen/arm: Make hwdom vUART optional feature

2024-02-16 Thread Michal Orzel
Hi Julien, On 15/02/2024 17:05, Julien Grall wrote: > > > Hi Michal, > > On 15/02/2024 14:39, Michal Orzel wrote: >> At the moment, the hardware domain vUART is always compiled in. In the >> spirit of fine granular configuration, make it optional so that the

[PATCH] xen/arm: Make hwdom vUART optional feature

2024-02-15 Thread Michal Orzel
a struct domain forward declaration to vuart.h, so that the header is self contained. Signed-off-by: Michal Orzel --- xen/arch/arm/Kconfig | 8 xen/arch/arm/Makefile | 2 +- xen/arch/arm/include/asm/domain.h | 2 ++ xen/arch/arm/vuart.h | 15

Re: [PATCH v2 1/2] xen/arm: Add imx8q{m,x} platform glue

2024-02-15 Thread Michal Orzel
Hi, On 14/02/2024 17:06, John Ernberg wrote: > > > When using Linux for dom0 there are a bunch of drivers that need to do SMC > SIP calls into the firmware to enable certain hardware bits like the > watchdog. > > Provide a basic platform glue that implements the needed SMC forwarding. > > The

Re: [PATCH v6 02/15] xen/arm: add initial support for LLC coloring on arm64

2024-02-14 Thread Michal Orzel
Hi Carlo, On 29/01/2024 18:17, Carlo Nonato wrote: > > > LLC coloring needs to know the last level cache layout in order to make the > best use of it. This can be probed by inspecting the CLIDR_EL1 register, > so the Last Level is defined as the last level visible by this register. > Note that

Re: [PATCH v6 1/3] xen: introduce Kconfig function alignment option

2024-02-14 Thread Michal Orzel
Monné In xen/linkage.h, there is still a comment at the top mentioning that CODE_ALIGN needs to be specified by each arch. I think this wants to be removed now. With that and Jan's remark addressed, for Arm: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v8 2/7] automation: introduce fixed randconfig for RISC-V

2024-02-12 Thread Michal Orzel
Hi Oleksii, On 09/02/2024 19:00, Oleksii Kurochko wrote: > > > This patch introduces the file riscv-fixed-randconfig.yaml, > which includes all configurations that should be disabled for > randconfig builds. > > Suggested-by: Stefano Stabellini > Signed-off-by: Oleksii Kurochko > --- > The

Re: [PATCH v8 1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line

2024-02-12 Thread Michal Orzel
Hi Oleksii, On 09/02/2024 19:00, Oleksii Kurochko wrote: > > > Kconfig tool expects each configuration to be on a new line. > > The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFIG} > in a single line and configs are seperated by spaces. > > As a result, only the first

[PATCH] xen/serial: Drop serial_{put,get}c

2024-02-08 Thread Michal Orzel
After removal of gdbstub by commit d182f9feae6d ("x86: Remove gdbstub"), we no longer have users of serial_{put,get}c functions, so remove them. Signed-off-by: Michal Orzel --- xen/drivers/char/serial.c | 72 --- xen/include/xen/serial.h | 10 -

[PATCH] xen/arm: Fix UBSAN failure in start_xen()

2024-02-08 Thread Michal Orzel
PTRDIFF_MAX as undefined behavior. To address this, switch to macro virt_to_maddr(), given the future plans to eliminate boot_phys_offset. Signed-off-by: Michal Orzel --- xen/arch/arm/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c

Re: [XEN v4 1/3] xen/arm: Introduce CONFIG_PARTIAL_EMULATION and "partial-emulation" cmd option

2024-02-07 Thread Michal Orzel
On 07/02/2024 11:06, Julien Grall wrote: > > > Hi Michal, > > On 07/02/2024 07:45, Michal Orzel wrote: >> On 06/02/2024 19:49, Julien Grall wrote: >>> On 31/01/2024 12:10, Ayan Kumar Halder wrote: >>>> There can be situations when the

Re: [XEN v4 1/3] xen/arm: Introduce CONFIG_PARTIAL_EMULATION and "partial-emulation" cmd option

2024-02-06 Thread Michal Orzel
Hi Julien, On 06/02/2024 19:49, Julien Grall wrote: > > > Hi Ayan, > > On 31/01/2024 12:10, Ayan Kumar Halder wrote: >> There can be situations when the registers cannot be emulated to their full >> functionality. This can be due to the complexity involved. In such cases, one >> can emulate

[PATCH] automation: Switch yocto-qemux86-64 job to run on x86

2024-02-06 Thread Michal Orzel
, which does not have a platform name appended. Signed-off-by: Michal Orzel --- I built and pushed a new container to registry. Pipeline: https://gitlab.com/xen-project/people/morzel/xen-orzelmichal/-/pipelines/1166227598 --- automation/build/yocto/yocto.inc | 6 -- automation/gitlab-ci

Re: [RFC PATCH] xen/arm: improve handling of load/store instruction decoding

2024-02-05 Thread Michal Orzel
On 05/02/2024 11:42, Julien Grall wrote: > > > Hi Alex, > > On 31/01/2024 17:50, Alex Bennée wrote: >> While debugging VirtIO on Arm we ran into a warning due to memory >> being memcpy'd across MMIO space. While the bug was in the mappings >> the warning was a little confusing: >> >>

Re: [PATCH v6 07/15] xen/arm: add support for cache coloring configuration via device-tree

2024-02-05 Thread Michal Orzel
On 05/02/2024 10:39, Jan Beulich wrote: > > > On 03.02.2024 12:43, Carlo Nonato wrote: >> On Thu, Feb 1, 2024 at 3:19 PM Jan Beulich wrote: >>> On 29.01.2024 18:18, Carlo Nonato wrote: @@ -950,6 +951,11 @@ void __init create_domUs(void) #endif } +

Re: [XEN v4 3/3] xen/arm: arm32: Add emulation of Debug Data Transfer Registers

2024-01-31 Thread Michal Orzel
* the transmit buffer has emptied. By setting TX status bit to > + * indicate the transmit buffer is full. This we would hint the OS > + * that the DCC is probably not working. I'm a bit suprised that these messages differ. Why not to use the same text as arm64 but with register names updated? Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [XEN v4 2/3] xen/arm: arm64: Add emulation of Debug Data Transfer Registers

2024-01-31 Thread Michal Orzel
Hi Ayan, On 31/01/2024 13:10, Ayan Kumar Halder wrote: > From: Michal Orzel > > Currently, if user enables HVC_DCC config option in Linux, it invokes access > to debug data transfer registers (i.e. DBGDTRTX_EL0 on arm64, DBGDTRTXINT on > arm32). As these registers are not emulat

Re: [XEN v4 1/3] xen/arm: Introduce CONFIG_PARTIAL_EMULATION and "partial-emulation" cmd option

2024-01-31 Thread Michal Orzel
; > + default y > + help > + This option enables partial emulation of registers to prevent guests > + crashing when accessing registers which are not optional but have not > been > + emulated to its complete functionality. Enabling this might result in NIT: s/its/their Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v6 00/15] Arm cache coloring

2024-01-30 Thread Michal Orzel
Hi Carlo, On 29/01/2024 18:17, Carlo Nonato wrote: > > > Shared caches in multi-core CPU architectures represent a problem for > predictability of memory access latency. This jeopardizes applicability > of many Arm platform in real-time critical and mixed-criticality > scenarios. We introduce

[ImageBuilder][PATCH] Fix Xen boot-time cpupools handling

2024-01-26 Thread Michal Orzel
e (example: cpupool-cpus < a> instead of < 0xa>). Address the issue by adding 0x prefix to the result from fdtget. Additionally, avoid unnecessary regeneration of the phandle if it already exists. Fixes: b687773b5046 ("Add support for Xen boot-time cpupools") Signed-off-by: Mi

[PATCH v2] lib{fdt,elf}: move lib{fdt,elf}-temp.o and their deps to $(targets)

2024-01-22 Thread Michal Orzel
flags. Fix it by switching to $(targets) instead. Also, for libfdt, append libfdt.o to nocov-y only if CONFIG_OVERLAY_DTB is not set. Otherwise, there is no section renaming and we should be able to run the coverage. Fixes: e321576f4047 ("xen/build: start using if_changed") Signed-off-by: Michal Orze

Re: [PATCH] coverage: filter out lib{fdt,elf}-temp.o

2024-01-22 Thread Michal Orzel
On 22/01/2024 12:05, Anthony PERARD wrote: > > > On Mon, Jan 22, 2024 at 10:54:13AM +, Anthony PERARD wrote: >> On Mon, Jan 22, 2024 at 11:04:41AM +0100, Jan Beulich wrote: >>> On 19.01.2024 16:25, Anthony PERARD wrote: >>>> On Fri, Jan 19, 2024 at

Re: [PATCH] coverage: filter out lib{fdt,elf}-temp.o

2024-01-19 Thread Michal Orzel
Hi Anthony, On 18/01/2024 18:37, Anthony PERARD wrote: > > > On Thu, Jan 18, 2024 at 02:12:21PM +0100, Jan Beulich wrote: >> On 18.01.2024 13:06, Michal Orzel wrote: >>> At the moment, trying to run xencov read/reset (calling SYSCTL_coverage_op >>> u

Re: [PATCH] coverage: filter out lib{fdt,elf}-temp.o

2024-01-18 Thread Michal Orzel
Hi Jan, On 18/01/2024 14:12, Jan Beulich wrote: > > > On 18.01.2024 13:06, Michal Orzel wrote: >> At the moment, trying to run xencov read/reset (calling SYSCTL_coverage_op >> under the hood) results in a crash. This is due to an attempt to >> access code in the .init

[PATCH] coverage: filter out lib{fdt,elf}-temp.o

2024-01-18 Thread Michal Orzel
"xen/build: start using if_changed") Signed-off-by: Michal Orzel --- xen/common/libelf/Makefile | 2 +- xen/common/libfdt/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index 8a4522e4e141..f618f70d5

Re: [PATCH v4 03/11] xen/arm: add Dom0 cache coloring support

2024-01-17 Thread Michal Orzel
On 18/01/2024 01:23, Stefano Stabellini wrote: > > > On Fri, 12 Jan 2024, Michal Orzel wrote: >> Hi Carlo, >> >> On 23/01/2023 16:47, Carlo Nonato wrote: >>> >>> >>> From: Luca Miccio >>> >>> This commit allows the user

Re: [PATCH v1 repost 1/4] arm/mmu: Move init_ttbr to a new section .data.idmap

2024-01-17 Thread Michal Orzel
On 17/01/2024 13:10, Julien Grall wrote: > > > On 17/01/2024 08:30, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> On 16/01/2024 15:37, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> With th

Re: [PATCH v1 repost 3/4] xen/arm64: head: Use PRINT_ID() for secondary CPU MMU-off boot code

2024-01-17 Thread Michal Orzel
he > same page as the rest of the idmap. > > So replace all the PRINT() that can be reachable by the secondary > CPU with MMU-off with PRINT_ID(). > > Signed-off-by: Julien Grall Reviewed-by: Michal Orzel with some remarks below > --- > xen/arch/arm/arm64/head.S

Re: [PATCH v1 repost 2/4] arm/smpboot: Move smp_up_cpu to a new section .data.idmap

2024-01-17 Thread Michal Orzel
ecutable. This means that we need to temporarily remap > smp_up_cpu in order to update it. > > Introduce a new function set_smp_up_cpu() for this purpose so the code > is not duplicated between when opening and closing the gate. > > Signed-off-by: Julien

Re: [PATCH v1 repost 1/4] arm/mmu: Move init_ttbr to a new section .data.idmap

2024-01-17 Thread Michal Orzel
> be mapped read-only executable. This means that we need to temporarily > remap init_ttbr in order to update it. > > Introduce a new function set_init_ttbr() for this purpose so the code > is not duplicated between arm64 and arm32. > > Signed-off-by: Julien Grall

[PATCH 0/2] xen/arm: head: early printk on 1:1 mapping

2024-01-15 Thread Michal Orzel
This series is a follow up to 1ec3fe1f664f ("xen/arm32: head: Improve logging in head.S"). Michal Orzel (2): xen/arm32: head: Move earlyprintk 'hex' to .rodata.idmap xen/arm64: head: Allow to use early printk while on 1:1 mapping xen/arch/arm/arm32/head.S | 2 +- xe

[PATCH 1/2] xen/arm32: head: Move earlyprintk 'hex' to .rodata.idmap

2024-01-15 Thread Michal Orzel
_putn when printing register values), which currently resides in .rodata.str. Move it to .rodata.idmap to allow making use of print_reg macro from anywhere (mostly to aid debugging). Signed-off-by: Michal Orzel --- xen/arch/arm/arm32/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 2/2] xen/arm64: head: Allow to use early printk while on 1:1 mapping

2024-01-15 Thread Michal Orzel
are now consolidated in a single place), - move early printk 'hex' string into .rodata.idmap and replace 'adr' instruction in asm_putn with 'adr_l' to extend the addressable range, - remove RODATA_STR() macro given no use. Signed-off-by: Michal Orzel --- xen/arch/arm/arm64/head.S

Re: [PATCH v2 2/2] xen/arm32: head: Improve logging in head.S

2024-01-12 Thread Michal Orzel
On 12/01/2024 11:58, Julien Grall wrote: > > > On 12/01/2024 08:49, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> On 11/01/2024 19:34, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> The sequ

Re: [PATCH v4 03/11] xen/arm: add Dom0 cache coloring support

2024-01-12 Thread Michal Orzel
On 12/01/2024 10:24, Michal Orzel wrote: > > > Hi Carlo, > > On 23/01/2023 16:47, Carlo Nonato wrote: >> >> >> From: Luca Miccio >> >> This commit allows the user to set the cache coloring configuration for >> Dom0 via a command line p

Re: [PATCH v4 03/11] xen/arm: add Dom0 cache coloring support

2024-01-12 Thread Michal Orzel
Hi Carlo, On 23/01/2023 16:47, Carlo Nonato wrote: > > > From: Luca Miccio > > This commit allows the user to set the cache coloring configuration for > Dom0 via a command line parameter. > Since cache coloring and static memory are incompatible, direct mapping > Dom0 isn't possible when

Re: [PATCH v2] xen/arm: bootfdt: Harden handling of malformed mem reserve map

2024-01-12 Thread Michal Orzel
in the case where the device tree is malformed. Fix this by properly > checking the return code for an error and calling panic(). > > Signed-off-by: Shawn Anastasio Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2 2/2] xen/arm32: head: Improve logging in head.S

2024-01-12 Thread Michal Orzel
> area (and so does the UART). So we just need to update the register > storing the UART address (i.e. r11) to point to the UART temporary > mapping. > > Take the opportunity to introduce mov_w_on_cond in order to > conditionally execute mov_w and avoid branches.

Re: [PATCH v2 1/2] xen/arm32: head: Rework how the fixmap and early UART mapping are prepared

2024-01-11 Thread Michal Orzel
_tables() because > the boot page tables needs to be recreated for every CPU. > * The early UART mapping is only added for the boot CPU0 as the > fixmap table is not cleared when secondary CPUs boot. > > Signed-off-by: Julien Grall Reviewed-by: Michal Orze

Re: [PATCH 0/8] limit passing around of cpu_user_regs

2024-01-11 Thread Michal Orzel
On 11/01/2024 08:31, Jan Beulich wrote: > > > Unlike (synchronous) exception handlers, interrupt handlers don't normally > have a need to know the outer context's register state. Similarly, the vast > majority of key handlers has no need for such. > > 1: keyhandler: don't pass cpu_user_regs

Re: [PATCH v2 4/7] xen/device-tree: Fix bootfdt.c to tolerate 0 reserved regions

2024-01-10 Thread Michal Orzel
On 09/01/2024 19:14, Julien Grall wrote: > > > (+ Stefano) > > Hi Shawn, > > On 15/12/2023 02:43, Shawn Anastasio wrote: >> The early_print_info routine in bootfdt.c incorrectly stores the result >> of a call to fdt_num_mem_rsv() in an unsigned int, which results in the >> negative error

Re: [XEN v3 3/3] xen/arm: arm32: Add emulation of Debug Data Transfer Registers

2024-01-07 Thread Michal Orzel
Hi Ayan, On 05/01/2024 12:21, Ayan Kumar Halder wrote: > DBGOSLSR is emulated in the same way as its AArch64 variant (ie OSLSR_EL1). > This is to ensure that DBGOSLSR.OSLK is 0, thus MDSCR_EL1.TXfull is treated > as UNK/SBZP. No need for this dot and yet another thus (it reads difficult). You

Re: [XEN v3 2/3] xen/arm: arm64: Add emulation of Debug Data Transfer Registers

2024-01-07 Thread Michal Orzel
Hi Ayan, On 05/01/2024 12:21, Ayan Kumar Halder wrote: > From: Michal Orzel > > Currently if user enables HVC_DCC config option in Linux, it invokes access > to debug data transfer registers (ie DBGDTRTX_EL0 on arm64, DBGDTRTXINT on > arm32). As these registers are not emulat

Re: [XEN v3 1/3] xen/arm: Introduce CONFIG_PARTIAL_EMULATION and "partial-emulation" cmd option

2024-01-07 Thread Michal Orzel
Hi Ayan, On 05/01/2024 12:21, Ayan Kumar Halder wrote: > > > There can be situations when the registers cannot be emulated to their full > functionality. This can be due to the complexity involved. In such cases, one > can emulate those registers as RAZ/WI. We call them as partial emulation. I

Re: [PATCH v5 00/13] Arm cache coloring

2024-01-04 Thread Michal Orzel
On 04/01/2024 10:37, Carlo Nonato wrote: > > > Hi Stefano, > > On Thu, Jan 4, 2024 at 2:55 AM Stefano Stabellini > wrote: >> >> On Wed, 3 Jan 2024, Stefano Stabellini wrote: >>> Also I tried this patch series on the "staging" branch and Xen failed to >>> boot, no messages at all from Xen so

Re: [PATCH v5 00/13] Arm cache coloring

2024-01-03 Thread Michal Orzel
Hi, On 02/01/2024 10:51, Carlo Nonato wrote: > > > Shared caches in multi-core CPU architectures represent a problem for > predictability of memory access latency. This jeopardizes applicability > of many Arm platform in real-time critical and mixed-criticality > scenarios. We introduce support

Re: [PATCH v2 1/3] xen/arm: Add emulation of Debug Data Transfer Registers

2024-01-01 Thread Michal Orzel
Hi Ayan, On 18/12/2023 21:32, michal.or...@amd.com wrote: > From: Michal Orzel > > Currently if user enables HVC_DCC config option in Linux, it invokes > access to debug data transfer registers (ie MDCCSR_EL0 on arm64, you mention status reg on arm64 and TX reg on arm32. Instea

Re: [XEN PATCH] xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls

2023-12-13 Thread Michal Orzel
SUPPORTED in x2 so update > ffa_handle_call() to return true and with the cpu_user_regs updated. > > Fixes: 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator") > Signed-off-by: Jens Wiklander Looking at Linux and TFA, this is indeed expected behavior, so: Reviewed-by: Michal Orzel ~Michal

Re: [XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Michal Orzel
On 11/12/2023 13:29, Julien Grall wrote: > > > Hi, > > On 11/12/2023 10:30, Nicola Vetrini wrote: >> The "return 1;" statements at the end of some cases in the switch >> of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the >> unreachability of the "return 1;" statement after the

Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-11 Thread Michal Orzel
On 11/12/2023 11:01, Julien Grall wrote: > > > Hi Michal, > > On 11/12/2023 08:31, Michal Orzel wrote: >> On 08/12/2023 16:09, Julien Grall wrote: >>> >>> >>> Hi, >>> >>> On 07/12/2023 09:38, Michal Orzel wrot

Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-11 Thread Michal Orzel
Hi Julien, On 08/12/2023 16:09, Julien Grall wrote: > > > Hi, > > On 07/12/2023 09:38, Michal Orzel wrote: >> Hi Penny, >> >> On 06/12/2023 10:06, Penny Zheng wrote: >>> >>> >>> We split the code of allocate_bank_memory into two

Re: [PATCH v5 05/11] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-12-08 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > We use paddr_assigned to indicate whether host address is provided, by > checking the length of "xen,shared-mem" property. > > The shm matching criteria shall also be adapt to cover the new scenario, by > adding when host address is not

Re: [PATCH v2 3/5] automation: Add the expect script with test case for FVP

2023-12-08 Thread Michal Orzel
On 08/12/2023 10:21, Henry Wang wrote: > > > Hi Michal, > >> On Dec 8, 2023, at 17:11, Michal Orzel wrote: >> On 08/12/2023 10:05, Henry Wang wrote: >>> >>> Hi Michal, >>> >>>> On Dec 8, 2023, at 16:57, Michal Orzel wrote: >

Re: [PATCH v2 5/5] automation: Add the arm64 FVP build and Dom0 smoke test jobs

2023-12-08 Thread Michal Orzel
-smoke-dom0-arm64-gcc` job. > > Signed-off-by: Henry Wang > Reviewed-by: Stefano Stabellini Reviewed-by: Michal Orzel with a remark... > --- > v2: > - Add Stefano's Reviewed-by tag. > > Although it does not affect the functionality, I am still quite > confused about wh

Re: [PATCH v2 3/5] automation: Add the expect script with test case for FVP

2023-12-08 Thread Michal Orzel
On 08/12/2023 10:05, Henry Wang wrote: > > > Hi Michal, > >> On Dec 8, 2023, at 16:57, Michal Orzel wrote: >> >> Hi Henry, >> >> On 08/12/2023 06:46, Henry Wang wrote: >>> >>> >>> To interact with the FVP (for example

Re: [PATCH v2 3/5] automation: Add the expect script with test case for FVP

2023-12-08 Thread Michal Orzel
the expected results by Xen, Dom0 and DomU. > > Signed-off-by: Henry Wang Reviewed-by: Michal Orzel with 1 question... > --- > v2: > - No change. > --- > .../expect/fvp-base-smoke-dom0-arm64.exp | 73 +++ > 1 file changed, 73 insertions(+) > crea

Re: [PATCH v2 2/5] automation: Add the Dockerfile to build TF-A and U-Boot for FVP

2023-12-08 Thread Michal Orzel
e" && \ If this is needed for git am, you could get away using 'patch -p1' > +git am 0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch > && \ > +make -j$(nproc) DEBUG=1 PLAT=fvp ARCH=aarch64 > FVP_DT_PREFIX=fvp-base-gicv3-psci-1t all && \ > +make -j$(nproc) DEBUG=1 PLAT=fvp ARCH=aarch64 > FVP_DT_PREFIX=fvp-base-gicv3-psci-1t fip > BL33=../u-boot-"$UBOOT_VERSION"/u-boot.bin && \ > +cp build/fvp/debug/bl1.bin / && \ > +cp build/fvp/debug/fip.bin / && \ > +cp build/fvp/debug/fdts/fvp-base-gicv3-psci-1t.dtb / && \ > +cd /build && \ > +rm -rf u-boot-"$UBOOT_VERSION" trusted-firmware-a You forgot to remove u-boot tar file Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v5 11/11] xen/arm: create another /memory node for static shm

2023-12-07 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > Static shared memory region shall be described both under /memory and > /reserved-memory. > > We introduce export_shm_memory_node() to create another /memory node to > contain the static shared memory ranges. > > Signed-off-by: Penny

Re: [PATCH] xen/arm: bootfdt: Check return code of device_tree_for_each_node()

2023-12-07 Thread Michal Orzel
On 07/12/2023 13:54, Julien Grall wrote: > > > Hi Michal, > > On 07/12/2023 12:39, Michal Orzel wrote: >> On 07/12/2023 13:20, Julien Grall wrote: >>> >>> >>> Hi Michal, >>> >>> On 07/12/2023 10:14, Mi

Re: [PATCH] xen/arm: bootfdt: Check return code of device_tree_for_each_node()

2023-12-07 Thread Michal Orzel
Hi Julien, On 07/12/2023 13:20, Julien Grall wrote: > > > Hi Michal, > > On 07/12/2023 10:14, Michal Orzel wrote: >> As a result of not checking the return code of device_tree_for_each_node() >> in boot_fdt_info(), any error occured during early FDT parsing does n

Re: [PATCH v5 10/11] xen/arm: fix duplicate /reserved-memory node in Dom0

2023-12-07 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > In case there is a /reserved-memory node already present in the host dtb, > current Xen codes would create yet another /reserved-memory node specially > for the static shm in Dom0 Device Tree. Rational missing: This would result in an

[PATCH] xen/arm: bootfdt: Check return code of device_tree_for_each_node()

2023-12-07 Thread Michal Orzel
. Fixes: 9cf4a9a46717 ("device tree: add device_tree_for_each_node()") Signed-off-by: Michal Orzel --- I've lost count how many times I had to fix missing rc check. However, I have not yet found any checker for this (-Wunused-result is pretty useless). --- xen/arch/arm/bootfdt.c | 4 +++- 1 fi

Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-07 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > We split the code of allocate_bank_memory into two parts, > allocate_domheap_memory and guest_physmap_memory. > > One is about allocating guest RAM from heap, which could be re-used later for > allocating static shared memory from heap

Re: [PATCH v5 03/11] xen/arm: re-define a set of data structures for static shared memory region

2023-12-06 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > This commit introduces a set of separate data structures to deal with > static shared memory at different stages. > > In boot-time host device tree parsing, we introduce a new structure > "struct shm_node" and a new field "shminfo" in

Re: [PATCH v5 02/11] xen/arm: avoid repetitive checking in process_shm_node

2023-12-06 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > Putting overlap and overflow checking in the loop is causing repetitive > operation, so this commit extracts both checking outside the loop. > > Signed-off-by: Penny Zheng In general the patch looks good to me: Reviewe

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-05 Thread Michal Orzel
On 05/12/2023 11:42, Julien Grall wrote: > > > On 05/12/2023 10:30, Michal Orzel wrote: >> >> >> On 05/12/2023 11:01, Julien Grall wrote: >>> >>> >>> On 05/12/2023 09:28, Michal Orzel wrote: >>>> Hi Julien, >>>> &g

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-05 Thread Michal Orzel
On 05/12/2023 11:01, Julien Grall wrote: > > > On 05/12/2023 09:28, Michal Orzel wrote: >> Hi Julien, >> >> On 04/12/2023 20:55, Julien Grall wrote: >>> >>> >>> On 04/12/2023 13:02, Ayan Kumar Halder wrote: >>>> >>&

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-05 Thread Michal Orzel
Hi Julien, On 04/12/2023 20:55, Julien Grall wrote: > > > On 04/12/2023 13:02, Ayan Kumar Halder wrote: >> >> On 04/12/2023 10:31, Julien Grall wrote: >>> Hi Ayan, >> Hi Julien, >>> >>> On 01/12/2023 18:50, Ayan Kumar Halder wrote: Currently if user enables HVC_DCC config option in Linux,

Re: xen | Failed pipeline for staging | 525c7c09

2023-12-04 Thread Michal Orzel
/staging ) >> >> Commit: 525c7c09 ( >> https://gitlab.com/xen-project/xen/-/commit/525c7c094b258e8a46b494488eef96f5670eb352 >> ) >> Commit Message: xen/arm: Move static event channel feature to a... >> Commit Author: Michal Orzel ( https://gitlab.com/orze

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-04 Thread Michal Orzel
gt; Also, we have added handle_read_val_wi() to emulate DBGDSCREXT register Emulating DBGDSCREXT is not needed. See below. > to return a specific value (ie TXfull | RXfull) and ignore any writes > to this register. > > Signed-off-by: Michal Orzel > Signed-off-by: Ayan Kumar Halder >

Re: [PATCH v4 00/10] Follow-up static shared memory PART I

2023-11-30 Thread Michal Orzel
Hi Penny, On 11/09/2023 12:04, Penny Zheng wrote: > > > Hi Michal > > On 2023/9/11 17:01, Michal Orzel wrote: >> Hi Penny, >> >> On 11/09/2023 06:04, Penny Zheng wrote: >>> >>> >>> There are some unsolving issues on current 4.17 st

[PATCH v2] xen/arm: Move static event channel feature to a separate module

2023-11-30 Thread Michal Orzel
the prototype to static-evtchn.h and provide a stub in case a feature is disabled. Guard static_evtchn_created in struct dt_device_node as well as its helpers. Signed-off-by: Michal Orzel --- This is a follow up to Luca's dom0less features modularization. Changes in v2: - keep static_evtchn_created

Re: [PATCH] xen/arm: Move static event channel feature to a separate module

2023-11-29 Thread Michal Orzel
On 29/11/2023 18:54, Julien Grall wrote: > > > Hi Michal, > > On 29/11/2023 18:41, Michal Orzel wrote: >> On 29/11/2023 18:17, Julien Grall wrote: >>> That said, I could settle on defining the two helpers in the *.c >>> directly because they are not m

Re: [PATCH] xen/arm: Move static event channel feature to a separate module

2023-11-29 Thread Michal Orzel
Hi Julien, On 29/11/2023 18:17, Julien Grall wrote: > > > Hi Michal > > On 29/11/2023 16:34, Michal Orzel wrote: >> Move static event channel feature related code to a separate module >> (static-evtchn.{c,h}) in the spirit of fine granular configuration, so >>

[PATCH] xen/arm: Move static event channel feature to a separate module

2023-11-29 Thread Michal Orzel
the prototype to static-evtchn.h and provide a stub in case a feature is disabled. Guard static_evtchn_created in struct dt_device_node and move its helpers to static-evtchn.h. Signed-off-by: Michal Orzel --- This is a follow up to Luca's dom0less features modularization. I'm not sure what's the best

[PATCH v2] xen/arm64: Move print_reg macro to asm/arm64/macros.h

2023-11-29 Thread Michal Orzel
, init_uart and putn since the calls to them are already protected by respective #ifdef CONFIG_EARLY_PRINTK. Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu Acked-by: Julien Grall --- Changes in v2: - re-sentence the stubs removal in commit msg - patch split out

<    1   2   3   4   5   6   7   8   9   10   >