Re: [PATCH v2] misra: increase identifiers length to 63

2024-11-19 Thread Nicola Vetrini
On 2024-11-19 00:54, Stefano Stabellini wrote: Currently the identifiers characters limit is arbitrarily set to 40. It causes a few violations as we have some identifiers longer than 40. Increase the limit to another rather arbitrary limit of 63. Thanks to this change, we remove a few violations

[PATCH] x86/pmstat: deal with Misra 8.4 violations

2024-11-19 Thread Jan Beulich
While the override #define-s in x86_64/platform_hypercall.c are good for the consuming side of the compat variants of set_{cx,px}_pminfo(), the producers lack the respective declarations. Include pmstat.h early, before the overrides are put in place, while adding explicit declarations of the compat

Re: [PATCH] x86/boot: Introduce boot-helpers.h

2024-11-19 Thread Jan Beulich
On 18.11.2024 18:18, Andrew Cooper wrote: > Eclair complains that neither reloc_trampoline{32,64}() can see their > declarations. > > reloc_trampoline32() needs to become asmlinkage, while reloc_trampoline64() > needs declaring properly in a way that both efi-boot.h and reloc-trampoline.c > can se

Re: [PATCH 1/4] x8&/mm: fix IS_LnE_ALIGNED() to comply with Misra Rule 20.7

2024-11-19 Thread Frediano Ziglio
On Tue, Nov 19, 2024 at 10:35 AM Roger Pau Monne wrote: > > While not strictly needed to guarantee operator precedence is as expected, add > the parentheses to comply with Misra Rule 20.7. > > No functional change intended. > > Reported-by: Andrew Cooper > Fixes: 5b52e1b0436f ('x86/mm: skip super

Re: [PATCH 1/4] x8&/mm: fix IS_LnE_ALIGNED() to comply with Misra Rule 20.7

2024-11-19 Thread Jan Beulich
On 19.11.2024 11:34, Roger Pau Monne wrote: > While not strictly needed to guarantee operator precedence is as expected, add > the parentheses to comply with Misra Rule 20.7. > > No functional change intended. > > Reported-by: Andrew Cooper > Fixes: 5b52e1b0436f ('x86/mm: skip super-page alignme

Re: [PATCH] x86/pmstat: deal with Misra 8.4 violations

2024-11-19 Thread Andrew Cooper
On 19/11/2024 8:12 am, Jan Beulich wrote: > While the override #define-s in x86_64/platform_hypercall.c are good for > the consuming side of the compat variants of set_{cx,px}_pminfo(), the > producers lack the respective declarations. Include pmstat.h early, > before the overrides are put in place

Re: [PATCH] x86/pmstat: deal with Misra 8.4 violations

2024-11-19 Thread Andrew Cooper
On 19/11/2024 10:30 am, Andrew Cooper wrote: > On 19/11/2024 8:12 am, Jan Beulich wrote: >> While the override #define-s in x86_64/platform_hypercall.c are good for >> the consuming side of the compat variants of set_{cx,px}_pminfo(), the >> producers lack the respective declarations. Include pmsta

Re: [PATCH v2 19/21] livepatch: Convert timeouts to secs_to_jiffies()

2024-11-19 Thread Petr Mladek
On Mon 2024-11-18 10:18:49, Easwar Hariharan wrote: > On 11/18/2024 3:06 AM, Petr Mladek wrote: > > On Sat 2024-11-16 11:10:52, Christophe Leroy wrote: > >> > >> > >> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit : > >>> [Vous ne recevez pas souvent de courriers de > >>> eahar...@linux.microsoft

[PATCH v2 4/4] xen/arm: do not give memory back to static heap

2024-11-19 Thread Luca Fancellu
From: Penny Zheng If Xenheap is statically configured in Device Tree, its size is definite. So, the memory shall not be given back into static heap, like it's normally done in free_init_memory, etc, once the initialization is finished. Extract static_heap flag from init data bootinfo, as it will

[PATCH v2 1/4] common/vmap: Fall back to simple allocator when !HAS_VMAP

2024-11-19 Thread Luca Fancellu
When HAS_VMAP is disabled, the xv{malloc,zalloc,...} functions should fall back to the simple x{malloc,zalloc,...} variant, implement that because MPU systems won't have virtual memory. Additionally remove VMAP_VIRT_START from vmap.h guards since MPU systems won't have it defined and protect with

[PATCH v2 3/4] xen/arm: Use vmap_contig instead of __vmap where it's possible

2024-11-19 Thread Luca Fancellu
Currently the arm code uses __vmap function in few parts to map physically contiguous pages, vmap_contig was introduced recently and does the same because it's a wrapper for __vmap, so use the latter instead of the direct __vmap function. Signed-off-by: Luca Fancellu Acked-by: Julien Grall --- C

[PATCH 3/4] x86/uaccess: rework user access speculative harden guards

2024-11-19 Thread Roger Pau Monne
The current guards to select whether user accesses should be speculative hardened violate Misra rule 20.7, as the UA_KEEP() macro doesn't (and can't) parenthesize the 'args' argument. Change the logic so the guard is implemented inside the assembly block using the .if assembly directive. No funct

[PATCH 2/4] x86/msi: fix Misra Rule 20.7 in msi.h

2024-11-19 Thread Roger Pau Monne
Prune unused macros and adjust the remaining ones to parenthesize macro arguments. No functional change intended. Singed-off-by: Roger Pau Monné --- xen/arch/x86/include/asm/msi.h | 35 ++ 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/xen/arch/x

[PATCH 1/4] x8&/mm: fix IS_LnE_ALIGNED() to comply with Misra Rule 20.7

2024-11-19 Thread Roger Pau Monne
While not strictly needed to guarantee operator precedence is as expected, add the parentheses to comply with Misra Rule 20.7. No functional change intended. Reported-by: Andrew Cooper Fixes: 5b52e1b0436f ('x86/mm: skip super-page alignment checks for non-present entries') Signed-off-by: Roger

[PATCH 0/4] x86/misra: fix remaining violations of rule 20.7

2024-11-19 Thread Roger Pau Monne
Hello, Following series attempts to fix the remaining violation for rules 20.7, and as a result make it blocking on x86 also (as it's already the case for ARM). Thanks, Roger. Roger Pau Monne (4): x8&/mm: fix IS_LnE_ALIGNED() to comply with Misra Rule 20.7 x86/msi: fix Misra Rule 20.7 in msi

[PATCH 4/4] automation/eclair: make Misra rule 20.7 blocking for x86 also

2024-11-19 Thread Roger Pau Monne
There are no violations left, make the rule globally blocking for both x86 and ARM. Signed-off-by: Roger Pau Monné --- automation/eclair_analysis/ECLAIR/tagging.ecl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/e

Re: [PATCH v3] drivers/char: rename arm-uart.c to uart-init.c

2024-11-19 Thread Julien Grall
Hi Oleksii, On 19/11/2024 09:43, oleksii.kuroc...@gmail.com wrote: Hi Julien, On Sat, 2024-11-16 at 10:11 +, Julien Grall wrote: Hi Oleksii, On 15/11/2024 12:48, Oleksii Kurochko wrote: Rename the file containing uart_init() to enable reuse across other architectures that utilize device

[XEN PATCH v2 0/3] CI: Allow automatic rebuild of rolling release containers

2024-11-19 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xenproject.org/git-http/people/aperard/xen-unstable.git br.gitlab-ci-rebuild-arch-container-v2 v2: - remove the logic to test containers once rebuilt, and only do container build in the pipeline. Hi, This patch series would allow to s

[XEN PATCH v2 2/3] CI: Define XEN_REGISTRY variable

2024-11-19 Thread Anthony PERARD
This allow to change the registry used for container in a single place, and could be controlled via other mean. Signed-off-by: Anthony PERARD Reviewed-by: Stefano Stabellini --- .gitlab-ci.yml | 3 +++ automation/gitlab-ci/build.yaml | 4 ++-- automation/gitlab-ci/test.yaml |

[XEN PATCH v2 3/3] CI: New stage "containers" to rebuild some containers

2024-11-19 Thread Anthony PERARD
Rebuild rolling release containers when XEN_CI_REBUILD_CONTAINERS is set. This is to be use with a scheduled pipeline. Signed-off-by: Anthony PERARD --- Notes: v2: - remove the logic to test containers once rebuilt. - only include the config with jobs for the "containers" stage wen

[PATCH v2 2/4] arm/setup: Move MMU specific extern declarations to mmu/setup.h

2024-11-19 Thread Luca Fancellu
Move some extern declarations related to MMU structures and define from asm/setup.h to asm/mmu/setup.h, in order to increase encapsulation and allow the MPU part to build, since it has no clue about them. Signed-off-by: Luca Fancellu --- Changes from v1: - Moved extern to mmu/setup.h instead of

[XEN PATCH v2 1/3] CI: Remove deprecated "only:variables" in favor of "rules:if"

2024-11-19 Thread Anthony PERARD
Also, this prevent using "rules", like in the ".test-jobs-common" template. https://docs.gitlab.com/ee/ci/yaml/#only--except Signed-off-by: Anthony PERARD Reviewed-by: Stefano Stabellini --- automation/gitlab-ci/test.yaml | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) d

Re: [PATCH] docs: fusa: Add requirements for mapping domain address to machine address

2024-11-19 Thread Bertrand Marquis
Hi Ayan, First a general comment: you use some terms such as machine address or domain address which are a bit undefined to me. This needs some definition first for those to be clear. Maybe use Virtual, IPA and PA instead all the time. > On 4 Nov 2024, at 20:06, Ayan Kumar Halder wrote: > > Th

Re: [ImageBuilder] UBOOT_SOURCE/SCRIPTS variables must always be set

2024-11-19 Thread Miccio, Luca
Hi Stefano, On 11/19/2024 1:23 AM, Stefano Stabellini wrote: > > > On Mon, 18 Nov 2024, Luca Miccio wrote: >> The current README incorrectly omits the need for the UBOOT_SOURCE and >> UBOOT_SCRIPT variables for uboot-script-gen to function properly. >> Moreover, the script silently fails if thes

Re: [PATCH] x86/boot: Introduce boot-helpers.h

2024-11-19 Thread Frediano Ziglio
On Mon, Nov 18, 2024 at 5:18 PM Andrew Cooper wrote: > > Eclair complains that neither reloc_trampoline{32,64}() can see their > declarations. > > reloc_trampoline32() needs to become asmlinkage, while reloc_trampoline64() > needs declaring properly in a way that both efi-boot.h and reloc-trampoli

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Jan Beulich
On 19.11.2024 08:31, Chen, Jiqian wrote: > On 2024/11/18 18:17, Roger Pau Monné wrote: >> On Wed, Nov 13, 2024 at 04:00:27PM +0800, Jiqian Chen wrote: >>> +static void cf_check rebar_ctrl_write(const struct pci_dev *pdev, >>> + unsigned int reg, >>> +

Re: [PATCH] docs: fusa: Add dom0less domain configuration requirements

2024-11-19 Thread Bertrand Marquis
Hi Ayan and Julien, > On 16 Nov 2024, at 10:57, Julien Grall wrote: > > Hi Ayan, > > On 15/11/2024 18:53, Ayan Kumar Halder wrote: +Assign vCPUs from CPU pool +-- + +`XenSwdgn~arm64_assign_vcpus_cpu_pool~1` + +Description: +Xen shall as

Re: [PATCH v2 19/21] livepatch: Convert timeouts to secs_to_jiffies()

2024-11-19 Thread Miroslav Benes
On Tue, 19 Nov 2024, Petr Mladek wrote: > On Mon 2024-11-18 10:18:49, Easwar Hariharan wrote: > > On 11/18/2024 3:06 AM, Petr Mladek wrote: > > > On Sat 2024-11-16 11:10:52, Christophe Leroy wrote: > > >> > > >> > > >> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit : > > >>> [Vous ne recevez pas

Re: [PATCH v2] misra: increase identifiers length to 63

2024-11-19 Thread Jan Beulich
On 19.11.2024 00:54, Stefano Stabellini wrote: > Currently the identifiers characters limit is arbitrarily set to 40. It > causes a few violations as we have some identifiers longer than 40. > > Increase the limit to another rather arbitrary limit of 63. Thanks to > this change, we remove a few vi

[PATCH] MISRA: Mark Rule 8.4 as clean

2024-11-19 Thread Andrew Cooper
All violations have been fixed up, so mark it as clean. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Stefano Stabellini CC: Julien Grall CC: consult...@bugseng.com As I've not committed "xen/bootinfo: Include declaration for fw_unreserved_regions()" yet, I'm very

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Roger Pau Monné
On Wed, Nov 13, 2024 at 04:00:27PM +0800, Jiqian Chen wrote: > +static void cf_check rebar_ctrl_write(const struct pci_dev *pdev, > + unsigned int reg, > + uint32_t val, > + void *data) >

[PATCH] bootfdt: Unify early printing of memory ranges endpoints

2024-11-19 Thread Michal Orzel
At the moment, when printing memory ranges during early boot, endpoints of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some as exclusive (Initrd, MODULE). Make the behavior consistent and print all the endpoints as inclusive. Signed-off-by: Michal Orzel --- xen/common/device-tre

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Andrew Cooper
On 19/11/2024 3:16 pm, Volodymyr Babchuk wrote: >> On Thu, 14 Nov 2024, Volodymyr Babchuk wrote: > As for test harness, I am using Zephyr currently. My first intention was > to use XTF, but it is x86-only... I am still considering using XTF for > x86 runs. I need to get back to fixing this. My in

Re: [PATCH] bootfdt: Unify early printing of memory ranges endpoints

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Luca Fancellu wrote: > Hi Michal, > > > On 19 Nov 2024, at 11:51, Michal Orzel wrote: > > > > At the moment, when printing memory ranges during early boot, endpoints > > of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some > > as exclusive (Initrd, MODULE). M

Re: [PATCH 2/4] x86/msi: fix Misra Rule 20.7 in msi.h

2024-11-19 Thread Andrew Cooper
On 19/11/2024 2:39 pm, Roger Pau Monné wrote: > On Tue, Nov 19, 2024 at 02:21:35PM +, Andrew Cooper wrote: >> On 19/11/2024 10:34 am, Roger Pau Monne wrote: >>> Prune unused macros and adjust the remaining ones to parenthesize macro >>> arguments. >>> >>> No functional change intended. >>> >>>

Re: [PATCH 2/4] x86/msi: fix Misra Rule 20.7 in msi.h

2024-11-19 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 03:35:34PM +, Andrew Cooper wrote: > On 19/11/2024 2:39 pm, Roger Pau Monné wrote: > > On Tue, Nov 19, 2024 at 02:21:35PM +, Andrew Cooper wrote: > >> On 19/11/2024 10:34 am, Roger Pau Monne wrote: > >>> --- > >>> xen/arch/x86/include/asm/msi.h | 35 ++--

Re: [XEN PATCH v2 3/3] CI: New stage "containers" to rebuild some containers

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Anthony PERARD wrote: > Rebuild rolling release containers when XEN_CI_REBUILD_CONTAINERS is > set. This is to be use with a scheduled pipeline. > > Signed-off-by: Anthony PERARD Reviewed-by: Stefano Stabellini > --- > > Notes: > v2: > - remove the logic to test

[PATCH] x86/boot: Load microcode much earlier on boot

2024-11-19 Thread Andrew Cooper
Following commit cd7cc5320bb2 ("x86/boot: add start and size fields to struct boot_module"), bootstrap_map*() works as soon as boot_info is populated. Resolve the todo, and move microcode loading to be the eariest action after establishing a console. A sample boot now looks like: (XEN) Xen ver

[PATCH] x86/ucode: Only rescan features on successful microcode load

2024-11-19 Thread Andrew Cooper
There's no point rescanning if we didn't load something new. Take the opportunity to make the comment a bit more concise. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/cpu/microcode/core.c | 13 - 1 file changed, 4 insertions(+), 9 deletions

Re: [PATCH] x86/mce: Compile do_mca() for CONFIG_PV only

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Andrew Cooper wrote: > On 19/11/2024 2:34 pm, Jan Beulich wrote: > > On 19.11.2024 13:59, Andrew Cooper wrote: > >> Eclair reports a Misra Rule 8.4 violation; that do_mca() can't see it's > >> declaration. It turns out that this is a consequence of do_mca() being > >> PV-only,

Re: [PATCH] x86/mce: Compile do_mca() for CONFIG_PV only

2024-11-19 Thread Andrew Cooper
On 19/11/2024 2:34 pm, Jan Beulich wrote: > On 19.11.2024 13:59, Andrew Cooper wrote: >> Eclair reports a Misra Rule 8.4 violation; that do_mca() can't see it's >> declaration. It turns out that this is a consequence of do_mca() being >> PV-only, and the declaration being compiled out in !PV build

Re: [PATCH] MISRA: Mark Rule 8.4 as clean

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Andrew Cooper wrote: > All violations have been fixed up, so mark it as clean. > > Signed-off-by: Andrew Cooper Acked-by: Stefano Stabellini > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Stefano Stabellini > CC: Julien Grall > CC: consult...@bugseng.com > > As

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Roger Pau Monné
On Mon, Nov 18, 2024 at 06:06:03AM +, Chen, Jiqian wrote: > On 2024/11/15 19:42, Roger Pau Monné wrote: > > On Fri, Nov 15, 2024 at 03:04:22AM +, Chen, Jiqian wrote: > >> On 2024/11/15 01:36, Roger Pau Monné wrote: > >>> On Thu, Nov 14, 2024 at 04:52:18PM +0100, Roger Pau Monné wrote: > >>>

Re: [PATCH] bootfdt: Unify early printing of memory ranges endpoints

2024-11-19 Thread Michal Orzel
On 19/11/2024 14:32, Luca Fancellu wrote: > > > Hi Michal, > >> On 19 Nov 2024, at 11:51, Michal Orzel wrote: >> >> At the moment, when printing memory ranges during early boot, endpoints >> of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some >> as exclusive (Initrd, MODULE)

[PATCH v2 0/4] Prerequisite patches for R82 upstreaming

2024-11-19 Thread Luca Fancellu
In this serie I've taken out patches from the R82 branch already in the ML[1] and some new patches I've done based on the current status of staging that will not impact the current Armv8-R earlyboot work. [1] https://patchwork.kernel.org/project/xen-devel/cover/20230626033443.2943270-1-penny.zh..

[PATCH] 9p/xen: fix init sequence

2024-11-19 Thread Alexander Merritt
From: Alex Zenla Large amount of mount hangs observed during hotplugging of 9pfs devices. The 9pfs Xen driver attempts to initialize itself more than once, causing the frontend and backend to disagree: the backend listens on a channel that the frontend does not send on, resulting in stalled proce

Re: [ImageBuilder] [PATCH V2] UBOOT_SOURCE/SCRIPTS variables must always be set

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Luca Miccio wrote: > The current README incorrectly omits the need for the UBOOT_SOURCE and > UBOOT_SCRIPT variables for uboot-script-gen to function properly. > Moreover, the script silently fails if these variables are not set. > Return an error if the the UBOOT_SCRIPT variab

[PATCH v10 10/12] xen/arm: add Xen cache colors command line parameter

2024-11-19 Thread Carlo Nonato
From: Luca Miccio Add a new command line parameter to configure Xen cache colors. These colors are dumped together with other coloring info. Benchmarking the VM interrupt response time provides an estimation of LLC usage by Xen's most latency-critical runtime task. Results on Arm Cortex-A53 on X

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Volodymyr Babchuk
Hi Stefano, (sorry, hit wrong Reply-To option, re-sending for wider audience) Stefano Stabellini writes: > On Tue, 19 Nov 2024, Volodymyr Babchuk wrote: >> Hi Stefano, >> >> Stefano Stabellini writes: >> >> > On Thu, 14 Nov 2024, Volodymyr Babchuk wrote: >> >> [...] >> >> >> +Building LibAFL

[PATCH v10 08/12] xen/page_alloc: introduce preserved page flags macro

2024-11-19 Thread Carlo Nonato
PGC_static, PGC_extra and PGC_broken need to be preserved when assigning a page. Define a new macro that groups those flags and use it instead of or'ing every time. To make preserved flags even more meaningful, they are kept also when switching state in mark_page_free(). Enforce the removal of PGC

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Chen, Jiqian
On 2024/11/19 20:51, Roger Pau Monné wrote: > On Wed, Nov 13, 2024 at 04:00:27PM +0800, Jiqian Chen wrote: >> +static void cf_check rebar_ctrl_write(const struct pci_dev *pdev, >> + unsigned int reg, >> + uint32_t val, >> +

[ImageBuilder] [PATCH V2] UBOOT_SOURCE/SCRIPTS variables must always be set

2024-11-19 Thread Luca Miccio
The current README incorrectly omits the need for the UBOOT_SOURCE and UBOOT_SCRIPT variables for uboot-script-gen to function properly. Moreover, the script silently fails if these variables are not set. Return an error if the the UBOOT_SCRIPT variable is not set and correct the documentation acco

Re: [PATCH 4/4] automation/eclair: make Misra rule 20.7 blocking for x86 also

2024-11-19 Thread Andrew Cooper
On 19/11/2024 10:34 am, Roger Pau Monne wrote: > There are no violations left, make the rule globally blocking for both x86 and > ARM. > > Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper Obviously subject to all the other patches going in. ~Andrew

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Marek Marczykowski-Górecki
On Tue, Nov 19, 2024 at 03:16:56PM +, Volodymyr Babchuk wrote: > > Honestly, aside from these two comments, this looks quite good. I would > > suggest adding a GitLab CI job to exercise this, if nothing else, to > > serve as an integration point since multiple components are required for > > th

Re: [PATCH] x86/pmstat: deal with Misra 8.4 violations

2024-11-19 Thread Andrew Cooper
On 19/11/2024 10:55 am, Andrew Cooper wrote: > On 19/11/2024 10:30 am, Andrew Cooper wrote: >> On 19/11/2024 8:12 am, Jan Beulich wrote: >>> While the override #define-s in x86_64/platform_hypercall.c are good for >>> the consuming side of the compat variants of set_{cx,px}_pminfo(), the >>> produc

Re: [PATCH 3/4] x86/uaccess: rework user access speculative harden guards

2024-11-19 Thread Andrew Cooper
On 19/11/2024 10:34 am, Roger Pau Monne wrote: > The current guards to select whether user accesses should be speculative > hardened violate Misra rule 20.7, as the UA_KEEP() macro doesn't (and can't) > parenthesize the 'args' argument. > > Change the logic so the guard is implemented inside the as

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Chen, Jiqian
On 2024/11/19 15:44, Jan Beulich wrote: > On 19.11.2024 08:31, Chen, Jiqian wrote: >> On 2024/11/18 18:17, Roger Pau Monné wrote: >>> On Wed, Nov 13, 2024 at 04:00:27PM +0800, Jiqian Chen wrote: +static void cf_check rebar_ctrl_write(const struct pci_dev *pdev, +

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Stefano Stabellini
On Tue, 19 Nov 2024, Volodymyr Babchuk wrote: > Hi Stefano, > > Stefano Stabellini writes: > > > On Thu, 14 Nov 2024, Volodymyr Babchuk wrote: > > [...] > > >> +Building LibAFL-QEMU based fuzzer > >> +- > >> + > >> +Fuzzer is written in Rust, so you need Rust to

Re: [PATCH] x86/mce: Compile do_mca() for CONFIG_PV only

2024-11-19 Thread Jan Beulich
On 19.11.2024 13:59, Andrew Cooper wrote: > Eclair reports a Misra Rule 8.4 violation; that do_mca() can't see it's > declaration. It turns out that this is a consequence of do_mca() being > PV-only, and the declaration being compiled out in !PV builds. > > Therefore, arrange for do_mca() to be c

Re: [PATCH] vpci: Add resizable bar support

2024-11-19 Thread Chen, Jiqian
On 2024/11/19 20:46, Roger Pau Monné wrote: > On Mon, Nov 18, 2024 at 06:06:03AM +, Chen, Jiqian wrote: >> On 2024/11/15 19:42, Roger Pau Monné wrote: >>> On Fri, Nov 15, 2024 at 03:04:22AM +, Chen, Jiqian wrote: On 2024/11/15 01:36, Roger Pau Monné wrote: > On Thu, Nov 14, 2024 at

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > On Thu, 14 Nov 2024, Volodymyr Babchuk wrote: [...] >> +Building LibAFL-QEMU based fuzzer >> +- >> + >> +Fuzzer is written in Rust, so you need Rust toolchain and `cargo` tool >> +in your system. Please refer to your di

[PATCH v10 01/12] xen/common: add cache coloring common code

2024-11-19 Thread Carlo Nonato
Last Level Cache (LLC) coloring allows to partition the cache in smaller chunks called cache colors. Since not all architectures can actually implement it, add a HAS_LLC_COLORING Kconfig option. LLC_COLORS_ORDER Kconfig option has a range maximum of 10 (2^10 = 1024) because that's the number of co

Re: [PATCH 3/4] x86/uaccess: rework user access speculative harden guards

2024-11-19 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 03:31:34PM +, Andrew Cooper wrote: > On 19/11/2024 10:34 am, Roger Pau Monne wrote: > > The current guards to select whether user accesses should be speculative > > hardened violate Misra rule 20.7, as the UA_KEEP() macro doesn't (and can't) > > parenthesize the 'args' a

[PATCH] x86/mce: Compile do_mca() for CONFIG_PV only

2024-11-19 Thread Andrew Cooper
Eclair reports a Misra Rule 8.4 violation; that do_mca() can't see it's declaration. It turns out that this is a consequence of do_mca() being PV-only, and the declaration being compiled out in !PV builds. Therefore, arrange for do_mca() to be compiled out in !PV builds. This in turn requires a

[PATCH v4] drivers/char: rename arm-uart.c to uart-init.c

2024-11-19 Thread Oleksii Kurochko
Rename the file containing uart_init() to enable reuse across other architectures that utilize device trees or SPCR tables to locate UART information. After locating UART data, {acpi}_device_init() is called to initialize the UART. arm_uart_init() is renamed to uart_init() to be reused by other ar

[PATCH v4] xen/common: Move gic_dt_preinit() to common code

2024-11-19 Thread Oleksii Kurochko
Introduce intc_dt_preinit() in the common codebase, as it is not architecture-specific and can be reused by both PPC and RISC-V. This function identifies the node with the interrupt-controller property in the device tree and calls device_init() to handle architecture-specific initialization of the

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-19 Thread Andrew Cooper
On 19/11/2024 1:46 am, Stefano Stabellini wrote: > On Thu, 14 Nov 2024, Volodymyr Babchuk wrote: >> diff --git a/xen/arch/arm/libafl_qemu.c b/xen/arch/arm/libafl_qemu.c >> new file mode 100644 >> index 00..58924ce6c6 >> --- /dev/null >> +++ b/xen/arch/arm/libafl_qemu.c >> @@ -0,0 +1,152 @@

[PATCH v10 11/12] xen/arm: make consider_modules() available for xen relocation

2024-11-19 Thread Carlo Nonato
Cache coloring must physically relocate Xen in order to color the hypervisor and consider_modules() is a key function that is needed to find a new available physical address. 672d67f339c0 ("xen/arm: Split MMU-specific setup_mm() and related code out") moved consider_modules() under arm32. Move it

[PATCH v10 02/12] xen/arm: add initial support for LLC coloring on arm64

2024-11-19 Thread Carlo Nonato
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 this excludes system caches in some platforms. Static memory alloc

[PATCH v10 05/12] xen: extend domctl interface for cache coloring

2024-11-19 Thread Carlo Nonato
Add a new domctl hypercall to allow the user to set LLC coloring configurations. Colors can be set only once, just after domain creation, since recoloring isn't supported. Based on original work from: Luca Miccio Signed-off-by: Carlo Nonato Signed-off-by: Marco Solieri Reviewed-by: Jan Beulich

Re: [PATCH 2/4] x86/msi: fix Misra Rule 20.7 in msi.h

2024-11-19 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 02:21:35PM +, Andrew Cooper wrote: > On 19/11/2024 10:34 am, Roger Pau Monne wrote: > > Prune unused macros and adjust the remaining ones to parenthesize macro > > arguments. > > > > No functional change intended. > > > > Singed-off-by: Roger Pau Monné > > It's a littl

Re: [PATCH v2 3/4] xen/arm: Use vmap_contig instead of __vmap where it's possible

2024-11-19 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 08:58:05AM +, Luca Fancellu wrote: > Currently the arm code uses __vmap function in few parts to map > physically contiguous pages, vmap_contig was introduced recently > and does the same because it's a wrapper for __vmap, so use the > latter instead of the direct __vmap

[PATCH v10 07/12] xen/arm: add support for cache coloring configuration via device-tree

2024-11-19 Thread Carlo Nonato
Add the "llc-colors" Device Tree attribute to express DomUs and Dom0less color configurations. Based on original work from: Luca Miccio Signed-off-by: Carlo Nonato Signed-off-by: Marco Solieri Reviewed-by: Jan Beulich # non-Arm --- v10: - no changes v9: - use best-effort allocation in domain_

[PATCH v10 00/12] Arm cache coloring

2024-11-19 Thread Carlo Nonato
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 for cache partitioning with page coloring, a transparent sof

[PATCH v10 04/12] xen/arm: add Dom0 cache coloring support

2024-11-19 Thread Carlo Nonato
Add a command line parameter to allow the user to set the coloring configuration for Dom0. A common configuration syntax for cache colors is introduced and documented. Take the opportunity to also add: - default configuration notion. - function to check well-formed configurations. Direct mapping

[PATCH v10 06/12] tools: add support for cache coloring configuration

2024-11-19 Thread Carlo Nonato
Add a new "llc_colors" parameter that defines the LLC color assignment for a domain. The user can specify one or more color ranges using the same syntax used everywhere else for color config described in the documentation. The parameter is defined as a list of strings that represent the color range

Re: [PATCH 1/4] x8&/mm: fix IS_LnE_ALIGNED() to comply with Misra Rule 20.7

2024-11-19 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 10:52:26AM +, Frediano Ziglio wrote: > On Tue, Nov 19, 2024 at 10:35 AM Roger Pau Monne wrote: > > > > While not strictly needed to guarantee operator precedence is as expected, > > add > > the parentheses to comply with Misra Rule 20.7. > > > > No functional change in

[PATCH v10 03/12] xen/arm: permit non direct-mapped Dom0 construction

2024-11-19 Thread Carlo Nonato
Cache coloring requires Dom0 not to be direct-mapped because of its non contiguous mapping nature, so allocate_memory() is needed in this case. 8d2c3ab18cc1 ("arm/dom0less: put dom0less feature code in a separate module") moved allocate_memory() in dom0less_build.c. In order to use it in Dom0 const

Re: [PATCH 3/4] x86/uaccess: rework user access speculative harden guards

2024-11-19 Thread Jan Beulich
On 19.11.2024 11:34, Roger Pau Monne wrote: > The current guards to select whether user accesses should be speculative > hardened violate Misra rule 20.7, as the UA_KEEP() macro doesn't (and can't) > parenthesize the 'args' argument. > > Change the logic so the guard is implemented inside the asse

Re: Xen 4.20 Development Update [August-October]

2024-11-19 Thread Carlo Nonato
Hi all, I would like to see "Arm cache coloring" in 4.20. I just sent v10. Best regards. - Carlo Nonato On Tue, Nov 12, 2024 at 5:16 PM Oleksii Kurochko wrote: > > Hello everyone, > > This email only tracks big items for xen.git tree. Please reply for items you > would like to see in 4.20 so t