Re: [PATCH v2 3/7] xen/common: Move Arm's bootfdt to common

2023-12-20 Thread Jan Beulich
On 19.12.2023 19:29, Julien Grall wrote: > On 19/12/2023 17:03, Jan Beulich wrote: >> On 15.12.2023 03:43, Shawn Anastasio wrote: >>> --- a/xen/arch/arm/bootfdt.c >>> +++ b/xen/common/device-tree/bootfdt.c >>> @@ -431,12 +431,15 @@ static int __init early_scan_node(const void *fdt, >>> { >>>

Re: [PATCH] x86/mm: use "break" in arch_memory_op()

2023-12-20 Thread Jan Beulich
On 20.12.2023 01:22, Stefano Stabellini wrote: > On Tue, 19 Dec 2023, Jan Beulich wrote: >> The final return statement is unreachable and hence disliked by Misra >> C:2012 (rule 2.1). Convert those case-specific (main) return statements >> which already use "rc", or in one case when it can be used

Re: [PATCH] x86/platform: tidy do_platform_op() a little

2023-12-20 Thread Jan Beulich
On 20.12.2023 01:30, Stefano Stabellini wrote: > On Tue, 19 Dec 2023, Jan Beulich wrote: >> The function has a few stray scopes and inconsistent use (indentation) >> of break statements. Drop the stray braces and bring all the break-s in >> line with one another. This in particular means dropping a

Re: [PATCH v4 1/4] x86/livepatch: align functions to ensure minimal distance between entry points

2023-12-20 Thread Roger Pau Monné
On Tue, Dec 19, 2023 at 07:46:11PM +, Andrew Cooper wrote: > On 15/12/2023 11:18 am, Roger Pau Monne wrote: > > The minimal function size requirements for livepatch are either 5 bytes (for > > "for an x86 livepatch", seeing as we're touching multiple architectures > worth of files. > > I know

Re: [XEN PATCH] xen: add acmacros.h to exclude-list.json

2023-12-20 Thread Jan Beulich
On 20.12.2023 01:17, Stefano Stabellini wrote: > On Tue, 19 Dec 2023, Luca Fancellu wrote: >>> On 19 Dec 2023, at 11:05, Nicola Vetrini wrote: >>> On 2023-12-19 11:51, Nicola Vetrini wrote: On 2023-12-19 11:37, Jan Beulich wrote: > On 19.12.2023 10:02, Nicola Vetrini wrote: >> --- a/d

Re: [PATCH v11 01/17] pci: msi: pass pdev to pci_enable_msi() function

2023-12-20 Thread Jan Beulich
On 20.12.2023 03:10, Stefano Stabellini wrote: > On Sat, 2 Dec 2023, Volodymyr Babchuk wrote: >> --- a/xen/arch/x86/include/asm/msi.h >> +++ b/xen/arch/x86/include/asm/msi.h >> @@ -81,8 +81,9 @@ struct irq_desc; >> struct hw_interrupt_type; >> struct msi_desc; >> /* Helper functions */ >> -exter

Re: [XEN PATCH] xen: add acmacros.h to exclude-list.json

2023-12-20 Thread Luca Fancellu
> On 20 Dec 2023, at 08:41, Jan Beulich wrote: > > On 20.12.2023 01:17, Stefano Stabellini wrote: >> On Tue, 19 Dec 2023, Luca Fancellu wrote: On 19 Dec 2023, at 11:05, Nicola Vetrini wrote: On 2023-12-19 11:51, Nicola Vetrini wrote: > On 2023-12-19 11:37, Jan Beulich wrote

Re: [PATCH v11 01/17] pci: msi: pass pdev to pci_enable_msi() function

2023-12-20 Thread Jan Beulich
On 02.12.2023 02:27, Volodymyr Babchuk wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -452,21 +452,29 @@ static void __init cf_check ns16550_init_postirq(struct > serial_port *port) > if ( rc > 0 ) > { > struct msi_desc

Re: [PATCH v4 1/4] x86/livepatch: align functions to ensure minimal distance between entry points

2023-12-20 Thread Jan Beulich
On 20.12.2023 09:32, Roger Pau Monné wrote: > On Tue, Dec 19, 2023 at 07:46:11PM +, Andrew Cooper wrote: >> On 15/12/2023 11:18 am, Roger Pau Monne wrote: >>> The minimal function size requirements for livepatch are either 5 bytes (for >> >> "for an x86 livepatch", seeing as we're touching mult

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Roger Pau Monné
On Tue, Dec 19, 2023 at 08:31:29PM +, Andrew Cooper wrote: > On 15/12/2023 11:18 am, Roger Pau Monne wrote: > > Introduce a helper to perform checks related to self modifying code, and > > start > > by creating a simple test to check that alternatives have been applied. > > > > Such test is ho

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Jan Beulich
On 19.12.2023 21:31, Andrew Cooper wrote: > On 15/12/2023 11:18 am, Roger Pau Monne wrote: >> +if ( system_state < SYS_STATE_active ) >> +printk(XENLOG_ERR "%s test failed\n", tests[i].name); > > This is a test hypercall, for the purpose of running testing, in > combination wit

Re: [XEN PATCH] xen: add acmacros.h to exclude-list.json

2023-12-20 Thread Nicola Vetrini
On 2023-12-20 09:50, Luca Fancellu wrote: On 20 Dec 2023, at 08:41, Jan Beulich wrote: On 20.12.2023 01:17, Stefano Stabellini wrote: On Tue, 19 Dec 2023, Luca Fancellu wrote: On 19 Dec 2023, at 11:05, Nicola Vetrini wrote: On 2023-12-19 11:51, Nicola Vetrini wrote: On 2023-12-19 11:37, Ja

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Jan Beulich
On 20.12.2023 10:08, Roger Pau Monné wrote: > On Tue, Dec 19, 2023 at 08:31:29PM +, Andrew Cooper wrote: >> On 15/12/2023 11:18 am, Roger Pau Monne wrote: >>> --- /dev/null >>> +++ b/xen/arch/x86/include/asm/test.h >>> @@ -0,0 +1,30 @@ >>> +#ifndef _ASM_X86_TEST_H_ >>> +#define _ASM_X86_TEST_H_

Re: [RFC PATCH] xen/dm: arm: Introudce arm_inject_msi DM op

2023-12-20 Thread Mykyta Poturai
Hi, On 20.12.23 02:42, Stefano Stabellini wrote: > On Tue, 19 Dec 2023, Julien Grall wrote: >> >> But QEMU should really not need to implement a full ITS. What it needs is a >> way to forward the MSI to Xen. That's it. > > I fully agree with Julien > > >> Stefano, do you have any suggestion ho

Re: [XEN PATCH v2] xen: move declaration of first_valid_mfn to xen/numa.h

2023-12-20 Thread Jan Beulich
On 19.12.2023 02:48, Stefano Stabellini wrote: > On Mon, 18 Dec 2023, Nicola Vetrini wrote: >> Such declaration is moved in order to provide it for Arm and PPC, >> whilst not violating MISRA C:2012 Rule 8.4 in common/page_alloc.c: >> "A compatible declaration shall be visible when an object or >> f

Re: [PATCH v2 06/14] block: remove AioContext locking

2023-12-20 Thread Kevin Wolf
Am 19.12.2023 um 21:04 hat Stefan Hajnoczi geschrieben: > On Tue, 19 Dec 2023 at 10:59, Kevin Wolf wrote: > > > > Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > > > This is the big patch that removes > > > aio_context_acquire()/aio_context_release() from the block layer and > > > affect

Re: [PATCH v4 1/4] x86/livepatch: align functions to ensure minimal distance between entry points

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 10:03:51AM +0100, Jan Beulich wrote: > On 20.12.2023 09:32, Roger Pau Monné wrote: > > On Tue, Dec 19, 2023 at 07:46:11PM +, Andrew Cooper wrote: > >> On 15/12/2023 11:18 am, Roger Pau Monne wrote: > >>> The minimal function size requirements for livepatch are either 5 b

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 10:12:15AM +0100, Jan Beulich wrote: > On 20.12.2023 10:08, Roger Pau Monné wrote: > > On Tue, Dec 19, 2023 at 08:31:29PM +, Andrew Cooper wrote: > >> On 15/12/2023 11:18 am, Roger Pau Monne wrote: > >>> --- /dev/null > >>> +++ b/xen/arch/x86/include/asm/test.h > >>> @@

Re: [PATCH v4 4/4] x86/PV: issue branch prediction barrier when switching 64-bit guest to kernel mode

2023-12-20 Thread Jan Beulich
On 19.12.2023 18:07, Roger Pau Monné wrote: > On Tue, Dec 19, 2023 at 04:11:09PM +0100, Roger Pau Monné wrote: >> On Tue, Dec 19, 2023 at 03:06:50PM +0100, Jan Beulich wrote: >>> On 19.12.2023 12:48, Roger Pau Monné wrote: On Tue, Dec 19, 2023 at 10:56:16AM +0100, Jan Beulich wrote: > On 1

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Jan Beulich
On 20.12.2023 10:25, Roger Pau Monné wrote: > On Wed, Dec 20, 2023 at 10:12:15AM +0100, Jan Beulich wrote: >> On 20.12.2023 10:08, Roger Pau Monné wrote: >>> On Tue, Dec 19, 2023 at 08:31:29PM +, Andrew Cooper wrote: On 15/12/2023 11:18 am, Roger Pau Monne wrote: > --- /dev/null >

Re: [PATCH v4 2/4] xen/x86: introduce self modifying code test

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 10:09:12AM +0100, Jan Beulich wrote: > On 19.12.2023 21:31, Andrew Cooper wrote: > > On 15/12/2023 11:18 am, Roger Pau Monne wrote: > >> +if ( system_state < SYS_STATE_active ) > >> +printk(XENLOG_ERR "%s test failed\n", tests[i].name); > > > > This is a

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

2023-12-20 Thread Luca Fancellu
Hi Ayan, > On 18 Dec 2023, at 20:29, Ayan Kumar Halder wrote: > > Hi, > > Refer > https://lore.kernel.org/all/alpine.DEB.2.22.394.2312071341540.1265976@ubuntu-linux-20-04-desktop/T/ > for the previous discussion on this issue. > > Also, the linux earlycon hvc driver has been fixed. > See > h

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-20 Thread Kevin Wolf
Am 19.12.2023 um 22:23 hat Stefan Hajnoczi geschrieben: > The following hack makes the test pass but there are larger safety > issues that I'll need to look at on Wednesday: I see, you're taking the same approach as in the SCSI layer: Don't make things thread-safe, but just always access them from

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

2023-12-20 Thread Luca Fancellu
> On 18 Dec 2023, at 20: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, > DBGDTRTXINT on arm32). As these registers are not emulated, Xen injects >

[PATCH v2] x86/platform: tidy do_platform_op() a little

2023-12-20 Thread Jan Beulich
The function has a few stray scopes and inconsistent use (indentation) of break statements. Drop the stray braces and bring all the break-s in line with one another. This in particular means dropping a redundant break from XENPF_cpu_offline handling, pleasing Misra C:2012 rule 2.1. No functional c

[xen-unstable test] 184181: tolerable FAIL - PUSHED

2023-12-20 Thread osstest service owner
flight 184181 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184181/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 184172 test-amd64-amd64-xl-qemut-win7-amd64

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

2023-12-20 Thread Luca Fancellu
> On 20 Dec 2023, at 09:29, Luca Fancellu wrote: > > Hi Ayan, > >> On 18 Dec 2023, at 20:29, Ayan Kumar Halder >> wrote: >> >> Hi, >> >> Refer >> https://lore.kernel.org/all/alpine.DEB.2.22.394.2312071341540.1265976@ubuntu-linux-20-04-desktop/T/ >> for the previous discussion on this issu

Re: [PATCH v3 4/7] x86/iommu: introduce a rangeset to perform hwdom IOMMU setup

2023-12-20 Thread Roger Pau Monné
On Tue, Dec 19, 2023 at 05:06:32PM +0100, Jan Beulich wrote: > On 15.12.2023 15:18, Roger Pau Monne wrote: > > --- a/xen/drivers/passthrough/x86/iommu.c > > +++ b/xen/drivers/passthrough/x86/iommu.c > > @@ -370,10 +370,88 @@ static unsigned int __hwdom_init > > hwdom_iommu_map(const struct domain

Re: [PATCH v4 4/4] x86/PV: issue branch prediction barrier when switching 64-bit guest to kernel mode

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 10:25:57AM +0100, Jan Beulich wrote: > On 19.12.2023 18:07, Roger Pau Monné wrote: > > On Tue, Dec 19, 2023 at 04:11:09PM +0100, Roger Pau Monné wrote: > >> On Tue, Dec 19, 2023 at 03:06:50PM +0100, Jan Beulich wrote: > >>> On 19.12.2023 12:48, Roger Pau Monné wrote: >

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-20 Thread Jan Beulich
On 20.12.2023 01:23, Sébastien Chaumat wrote: > I had to triple check: > > The first call is from xen_register_pirq() and seem to originate from > early_irq_init() : triggering is 1 > in this first call the HYPERVISOR_physdev_ops is called with triggering 1 > shareable 0 > > The second call is

Re: [PATCH v3 5/7] x86/iommu: remove regions not to be mapped

2023-12-20 Thread Roger Pau Monné
On Tue, Dec 19, 2023 at 05:18:39PM +0100, Jan Beulich wrote: > On 15.12.2023 15:18, Roger Pau Monne wrote: > > Introduce the code to remove regions not to be mapped from the rangeset > > that will be used to setup the IOMMU page tables for the hardware domain. > > > > This change also introduces t

Re: [PATCH v3 7/7] x86/iommu: cleanup unused functions

2023-12-20 Thread Roger Pau Monné
On Tue, Dec 19, 2023 at 05:23:57PM +0100, Jan Beulich wrote: > On 15.12.2023 15:18, Roger Pau Monne wrote: > > Remove xen_in_range() and vpci_is_mmcfg_address() now that hey are unused. > > > > Adjust comments to point to the new functions that replace the existing > > ones. > > And because of t

Re: [PATCH v3 7/7] x86/iommu: cleanup unused functions

2023-12-20 Thread Jan Beulich
On 20.12.2023 11:31, Roger Pau Monné wrote: > On Tue, Dec 19, 2023 at 05:23:57PM +0100, Jan Beulich wrote: >> On 15.12.2023 15:18, Roger Pau Monne wrote: >>> Remove xen_in_range() and vpci_is_mmcfg_address() now that hey are unused. >>> >>> Adjust comments to point to the new functions that replace

[XEN PATCH] automation/eclair_analysis: fix typo in deviation.

2023-12-20 Thread Nicola Vetrini
Unwanted leading '+'-s cause the deviation not to work as expected, leading to wrong analysis counts. Fixes: 11126964d82f ("automation/eclair_analysis: avoid violation of MISRA Rule 2.1") Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 8 1 file cha

Re: [PATCH v2 3/6] xen: add deviations for Rule 11.8

2023-12-20 Thread Jan Beulich
On 19.12.2023 12:05, Simone Ballarin wrote: > --- a/docs/misra/deviations.rst > +++ b/docs/misra/deviations.rst > @@ -248,6 +248,13 @@ Deviations related to MISRA C:2012 Rules: > If no bits are set, 0 is returned. > - Tagged as `safe` for ECLAIR. > > + * - R11.8 > + - Violatio

Re: [RFC PATCH] xen/dm: arm: Introudce arm_inject_msi DM op

2023-12-20 Thread Julien Grall
Hi, On 20/12/2023 09:13, Mykyta Poturai wrote: Hi, On 20.12.23 02:42, Stefano Stabellini wrote: On Tue, 19 Dec 2023, Julien Grall wrote: But QEMU should really not need to implement a full ITS. What it needs is a way to forward the MSI to Xen. That's it. I fully agree with Julien Stefa

[XEN PATCH 2/7] xen/arm: traps: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
MISRA C:2012 Rule 16.3 states: "An unconditional `break' statement shall terminate every switch-clause". Add missing break statements to address violations of Rule 16.3. Add pseudo-keyword "fallthrough" to make explicit the intended behavior and satisfy the requirements to deviate Rule 16.3. No fu

[XEN PATCH 3/7] xen/arm: guest_walk: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Add missing break statements to address violations of Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini --- xen/arch/arm/guest_walk.c | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/gu

[XEN PATCH 7/7] xen/arm: smmu-v3: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Add a break statement at the end of the switch-clauses to address violations of MISRA C:2012 Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No funtional change. Signed-off-by: Federico Serafini --- xen/drivers/passthrough/arm/smmu-v3.c | 2 ++ 1 file change

[XEN PATCH 5/7] xen/arm: v{cp,sys}reg: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Refactor of the switch-clauses to have a return statement at the end. This satisfies the requirements to deviate Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause). No functional change. Signed-off-by: Federico Serafini --- xen/arch/arm/arm64/vsysreg.c | 4 ++--

[XEN PATCH 0/7] xen/arm: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
This patch series addresses violations of MISRA C:2012 Rule 16.3 on the Arm code. No fucntional changes are introduced. Federico Serafini (7): xen/arm: gic-v3: address violations of MISRA C:2012 Rule 16.3 xen/arm: traps: address violations of MISRA C:2012 Rule 16.3 xen/arm: guest_walk: addre

[XEN PATCH 6/7] xen/arm: mmu: address a violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Add missing break at the end of the switch-clause to address a violation of MISRA C:2012 Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini --- xen/arch/arm/mmu/p2m.c | 1 + 1 file changed, 1 insertion(+)

[XEN PATCH 1/7] xen/arm: gic-v3: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Add the pseudo-keyword fallthrough to meet the requirements to deviate Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini --- xen/arch/arm/gic-v3.c | 30 ++ 1 file changed, 30 in

[XEN PATCH 4/7] xen/arm: mem_access: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
Refactor of the code to have a break statement at the end of the switch-clause. This addresses violations of Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini --- xen/arch/arm/mem_access.c | 12 ++-

Re: [PATCH v11 02/17] pci: introduce per-domain PCI rwlock

2023-12-20 Thread Jan Beulich
On 02.12.2023 02:27, Volodymyr Babchuk wrote: > Add per-domain d->pci_lock that protects access to > d->pdev_list. Purpose of this lock is to give guarantees to VPCI code > that underlying pdev will not disappear under feet. This is a rw-lock, > but this patch adds only write_lock()s. There will be

Re: [PATCH v2 2/7] xen/asm-generic: Introduce generic setup.h

2023-12-20 Thread Jan Beulich
On 15.12.2023 03:43, Shawn Anastasio wrote: > Introduce setup.h to asm-generic based off of ARM's to define all > stubs necessary to compile bootfdt.c > > Signed-off-by: Shawn Anastasio > --- > xen/arch/ppc/include/asm/Makefile | 1 + > xen/arch/ppc/include/asm/setup.h | 6 -- > xen/include

Re: [XEN PATCH 1/7] xen/arm: gic-v3: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi, On 20/12/2023 11:03, Federico Serafini wrote: Add the pseudo-keyword fallthrough to meet the requirements to deviate Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini Acked-by: Julien Grall Cheer

Re: [PATCH v2] x86/platform: tidy do_platform_op() a little

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 10:35:29AM +0100, Jan Beulich wrote: > The function has a few stray scopes and inconsistent use (indentation) > of break statements. Drop the stray braces and bring all the break-s in > line with one another. This in particular means dropping a redundant > break from XENPF_c

Re: [PATCH v2 3/6] xen: add deviations for Rule 11.8

2023-12-20 Thread Nicola Vetrini
On 2023-12-20 11:50, Jan Beulich wrote: On 19.12.2023 12:05, Simone Ballarin wrote: --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -248,6 +248,13 @@ Deviations related to MISRA C:2012 Rules: If no bits are set, 0 is returned. - Tagged as `safe` for ECLAIR. +

Re: [XEN PATCH 2/7] xen/arm: traps: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi, On 20/12/2023 11:03, Federico Serafini wrote: MISRA C:2012 Rule 16.3 states: "An unconditional `break' statement shall terminate every switch-clause". Add missing break statements to address violations of Rule 16.3. Add pseudo-keyword "fallthrough" to make explicit the intended behavior and

Re: [PATCH v2 5/7] xen/ppc: Enable bootfdt and boot allocator

2023-12-20 Thread Jan Beulich
On 15.12.2023 03:44, Shawn Anastasio wrote: > --- /dev/null > +++ b/xen/arch/ppc/include/asm/setup.h > @@ -0,0 +1,123 @@ > +#ifndef __ASM_PPC_SETUP_H__ > +#define __ASM_PPC_SETUP_H__ > + > +#define max_init_domid (0) > + > +#include > +#include > +#include > + > +#define MIN_FDT_ALIGN 8 > +#defi

Re: [XEN PATCH 3/7] xen/arm: guest_walk: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi, On 20/12/2023 11:03, Federico Serafini wrote: Add missing break statements to address violations of Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini Acked-by: Julien Grall Cheers, -- Julien Gra

Re: [PATCH v2 6/7] xen/ppc: mm-radix: Replace debug printing code with printk

2023-12-20 Thread Jan Beulich
On 15.12.2023 03:44, Shawn Anastasio wrote: > Now that we have common code building, there's no need to keep the old > itoa64+debug print function in mm-radix.c > > Signed-off-by: Shawn Anastasio Looks okay, just one question: > --- a/xen/arch/ppc/mm-radix.c > +++ b/xen/arch/ppc/mm-radix.c > @@

Re: [XEN PATCH 5/7] xen/arm: v{cp,sys}reg: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi Federico, On 20/12/2023 11:03, Federico Serafini wrote: Refactor of the switch-clauses to have a return statement at the end. This satisfies the requirements to deviate Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause). No functional change. Signed-off-by: F

Re: [XEN PATCH 7/7] xen/arm: smmu-v3: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi Federico, On 20/12/2023 11:03, Federico Serafini wrote: Add a break statement at the end of the switch-clauses to address violations of MISRA C:2012 Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No funtional change. Signed-off-by: Federico Serafini

Re: [XEN PATCH 6/7] xen/arm: mmu: address a violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi Federico, On 20/12/2023 11:03, Federico Serafini wrote: Add missing break at the end of the switch-clause to address a violation of MISRA C:2012 Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Federico Serafini Ack

Re: [XEN PATCH 4/7] xen/arm: mem_access: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Julien Grall
Hi Federico, On 20/12/2023 11:03, Federico Serafini wrote: Refactor of the code to have a break statement at the end of the switch-clause. This addresses violations of Rule 16.3 ("An unconditional `break' statement shall terminate every switch-clause"). No functional change. Signed-off-by: Fede

Re: [XEN PATCH 5/7] xen/arm: v{cp,sys}reg: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Jan Beulich
On 20.12.2023 12:48, Julien Grall wrote: > On 20/12/2023 11:03, Federico Serafini wrote: >> --- a/xen/arch/arm/arm64/vsysreg.c >> +++ b/xen/arch/arm/arm64/vsysreg.c >> @@ -210,8 +210,8 @@ void do_sysreg(struct cpu_user_regs *regs, >> /* RO at EL0. RAZ/WI at EL1 */ >> if ( regs_m

Re: [XEN PATCH 5/7] xen/arm: v{cp,sys}reg: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Federico Serafini
On 20/12/23 12:55, Jan Beulich wrote: On 20.12.2023 12:48, Julien Grall wrote: On 20/12/2023 11:03, Federico Serafini wrote: --- a/xen/arch/arm/arm64/vsysreg.c +++ b/xen/arch/arm/arm64/vsysreg.c @@ -210,8 +210,8 @@ void do_sysreg(struct cpu_user_regs *regs, /* RO at EL0. RAZ/WI at EL

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

2023-12-20 Thread Ayan Kumar Halder
On 20/12/2023 09:43, Luca Fancellu wrote: On 20 Dec 2023, at 09:29, Luca Fancellu wrote: Hi Ayan, Hi Luca, Thanks for looking into this. On 18 Dec 2023, at 20:29, Ayan Kumar Halder wrote: Hi, Refer https://lore.kernel.org/all/alpine.DEB.2.22.394.2312071341540.1265976@ubuntu-linux

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

2023-12-20 Thread Luca Fancellu
> > I wanted to keep Michal's change for the arm64 as it is. And introduce > Kconfig and command line in separate patches. > > But I agree, it does not look clean. > > > I am fine to follow your suggestion ie (Option 1) > > Patch 1 ---> arm64 changes + Kconfig + cmd_line (authored by Michal)

Re: [PATCH v2 37/39] xen/rirscv: add minimal amount of stubs to build full Xen

2023-12-20 Thread Oleksii
On Mon, 2023-12-18 at 18:00 +0100, Jan Beulich wrote: > On 24.11.2023 11:30, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/mm.c > > +++ b/xen/arch/riscv/mm.c > > @@ -1,19 +1,23 @@ > >  /* SPDX-License-Identifier: GPL-2.0-only */ > >   > > +#include > >  #include > >  #include > >  #include >

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

2023-12-20 Thread Julien Grall
Hi, On 20/12/2023 12:15, Ayan Kumar Halder wrote: On 20/12/2023 09:43, Luca Fancellu wrote: On 20 Dec 2023, at 09:29, Luca Fancellu wrote: Hi Ayan, Hi Luca, Thanks for looking into this. On 18 Dec 2023, at 20:29, Ayan Kumar Halder wrote: Hi, Refer https://lore.kernel.org/all/al

Re: [PATCH v2 5/7] xen/ppc: Enable bootfdt and boot allocator

2023-12-20 Thread Julien Grall
Hi, On 15/12/2023 02:44, Shawn Anastasio wrote: Move PPC off the asm-generic setup.h and enable usage of bootfdt for populating the boot info struct from the firmware-provided device tree. Also enable the Xen boot page allocator. Includes minor changes to bootfdt.c's boot_fdt_info() to tolerate

Re: [PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-20 Thread Stefan Hajnoczi
On Wed, 20 Dec 2023 at 04:32, Kevin Wolf wrote: > > Am 19.12.2023 um 22:23 hat Stefan Hajnoczi geschrieben: > > The following hack makes the test pass but there are larger safety > > issues that I'll need to look at on Wednesday: > > I see, you're taking the same approach as in the SCSI layer: Don

[PATCH v4 1/6] x86/p2m: move and rename paging_max_paddr_bits()

2023-12-20 Thread Roger Pau Monne
The function also supports non-paging domains, and hence it being placed in p2m.h and named with the paging_ prefix is misleading. Move to x86 domain.c and rename to domain_max_paddr_bits(). Moving to a different header is non trivial, as the function depends on helpers declared in p2m.h. There'

[PATCH v4 3/6] x86/iommu: introduce a rangeset to perform hwdom IOMMU setup

2023-12-20 Thread Roger Pau Monne
This change just introduces the boilerplate code in order to use a rangeset when setting up the hardware domain IOMMU mappings. The rangeset is never populated in this patch, so it's a non-functional change as far as the mappings the domain gets established. Note there will be a change for HVM do

[PATCH v4 5/6] x86/iommu: switch hwdom IOMMU to use a rangeset

2023-12-20 Thread Roger Pau Monne
The current loop that iterates from 0 to the maximum RAM address in order to setup the IOMMU mappings is highly inefficient, and it will get worse as the amount of RAM increases. It's also not accounting for any reserved regions past the last RAM address. Instead of iterating over memory addresse

[PATCH v4 0/6] x86/iommu: improve setup time of hwdom IOMMU

2023-12-20 Thread Roger Pau Monne
Hello, The aim of the series is to reduce boot time setup of IOMMU page tables for dom0. First and second patches are a pre-req, as further patches can end up attempting to create maps above the max RAM address, and hence without properly setting the IOMMU page tables levels those attempts to map

[PATCH v4 2/6] amd-vi: set IOMMU page table levels based on guest reported paddr width

2023-12-20 Thread Roger Pau Monne
However take into account the minimum number of levels required by unity maps when setting the page table levels. The previous setting of the page table levels for PV guests based on the highest RAM address was bogus, as there can be other non-RAM regions past the highest RAM address that need to

[PATCH v4 4/6] x86/iommu: remove regions not to be mapped

2023-12-20 Thread Roger Pau Monne
Introduce the code to remove regions not to be mapped from the rangeset that will be used to setup the IOMMU page tables for the hardware domain. This change also introduces two new functions: remove_xen_ranges() and vpci_subtract_mmcfg() that copy the logic in xen_in_range() and vpci_is_mmcfg_add

[PATCH v4 6/6] x86/iommu: cleanup unused functions

2023-12-20 Thread Roger Pau Monne
Remove xen_in_range() and vpci_is_mmcfg_address() now that hey are unused. Adjust comments to point to the new functions that replace the existing ones. No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Changes since v2: - Do remove vpci_is_mmcfg_address(). ---

Re: [PATCH v2 5/7] xen/ppc: Enable bootfdt and boot allocator

2023-12-20 Thread Julien Grall
Hi, On 15/12/2023 02:44, Shawn Anastasio wrote: diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/bootfdt.c index 796ac01c18..7ddfcc7e2a 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -543,12 +543,33 @@ size_t __init boot_fdt_info(con

Re: [PATCH v2 3/7] xen/common: Move Arm's bootfdt to common

2023-12-20 Thread Julien Grall
Hi Shawn, On 15/12/2023 02:43, Shawn Anastasio wrote: Move Arm's bootfdt.c to xen/common so that it can be used by other device tree architectures like PPC and RISCV. Only a minor change to conditionalize a call to a function only available on EFI-supporting targets was made to the code itself.

[xen-unstable-smoke test] 184190: tolerable all pass - PUSHED

2023-12-20 Thread osstest service owner
flight 184190 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184190/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

[PATCH v6 0/9] Introduce generic headers

2023-12-20 Thread Oleksii Kurochko
Some headers are common between several architectures, so the current patch series provide them. Another one reason to have them as generic is a simplification of adding support necessary to make a complete Xen build as it was/is being done in the patch series [1] and [2]. Also, instead of prov

[PATCH v6 2/9] automation: introduce fixed randconfig for RISC-V

2023-12-20 Thread Oleksii Kurochko
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 --- Changes in V6: - The patch was introduced in this version of patch series. --- autom

[PATCH v6 4/9] xen/asm-generic: introduce stub header monitor.h

2023-12-20 Thread Oleksii Kurochko
The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V6: - Rebase only. --- Cha

[PATCH v6 8/9] xen/asm-generic: ifdef inclusion of

2023-12-20 Thread Oleksii Kurochko
ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. For Arm it was explicitly added inclusion of for p2m.c and traps.c because they require some functions from which aren't available in case of !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulic

[PATCH v6 6/9] xen/asm-generic: introduce stub header softirq.h

2023-12-20 Thread Oleksii Kurochko
is common between Arm, PPC and RISC-V so it is moved to asm-generic. Drop Arm and PPC's softirq.h and use asm-generic version instead. Signed-off-by: Oleksii Kurochko Reviewed-by: Michal Orzel Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V6: - Rebase only. --- Changes in V

[PATCH v6 1/9] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line

2023-12-20 Thread Oleksii Kurochko
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 configuration in ${EXTRA_FIXED_RANDCONFIG} will be used. Signed-off-by: Ole

[PATCH v6 3/9] xen/asm-generic: introduce generic div64.h header

2023-12-20 Thread Oleksii Kurochko
All archs have the do_div implementation for BITS_PER_LONG == 64 so do_div64.h is moved to asm-generic. x86 and PPC were switched to asm-generic version of div64.h. Arm was switched partly because Arm has different implementation for 32-bits. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich

[PATCH v6 5/9] xen/asm-generic: introduce stub header numa.h

2023-12-20 Thread Oleksii Kurochko
is common through some archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko Reviewed-by: Michal Orzel Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V6: - Rebase only. --- Changes in V5: - Added Acked-by: Jan Beulich - Updated the comment around first_val

[PATCH v6 7/9] xen: ifdef inclusion of in

2023-12-20 Thread Oleksii Kurochko
Ifdef-ing inclusion of allows to avoid generation of empty for cases when CONFIG_GRANT_TABLE is not enabled. The following changes were done for Arm: should be included directly because it contains gnttab_dom0_frames() macros which is unique for Arm and is used in arch/arm/domain_build.c. is #

[PATCH v6 9/9] xen/asm-generic: introduce generic device.h

2023-12-20 Thread Oleksii Kurochko
Arm, PPC and RISC-V use the same device.h thereby device.h was moved to asm-generic. Arm's device.h was taken as a base with the following changes: - #ifdef PCI related things. - #ifdef ACPI related things. - Rename #ifdef guards. - Add SPDX tag. - #ifdef CONFIG_HAS_DEVICE_TREE related things.

[PATCH] x86/amd: extend CPU errata #1474 affected models

2023-12-20 Thread Roger Pau Monne
Errata #1474 does also affect models from family 17h ranges 00-2Fh, so the errata now covers all the models released under Family 17h (Zen, Zen+ and Zen2). Additionally extend the workaround to Family 18h (Hygon), since it's based on the Zen architecture and very likely affected. Rename all the z

Re: How to boot FreeBSD for arm 32 bit as DomU with u-boot on my ARM Chromebook

2023-12-20 Thread Mario Marietto
Hello. @Warner Losh : thanks for your help with the virtualization of FreeBSD with qemu,but I have already achieved this goal. The image file that I'm using (FreeBSD-13.2-RELEASE-armv7.img,raw,xvda) is already able to boot with qemu-kvm on my ARM Chromebook. We have also fixed the virtio-net driv

Re: [PATCH] x86/amd: extend CPU errata #1474 affected models

2023-12-20 Thread Andrew Cooper
On 20/12/2023 2:22 pm, Roger Pau Monne wrote: > Errata #1474 does also affect models from family 17h ranges 00-2Fh, so the > errata now covers all the models released under Family 17h (Zen, Zen+ and > Zen2). Perhaps "has now been extended to cover models from ..." ? > Additionally extend the work

xen | Successful pipeline for staging | 913a1774

2023-12-20 Thread GitLab
Pipeline #1114155971 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: 913a1774 ( https://gitlab.com/xen-project/xen/-/commit/913a1774168f82565bbdc7d41a46013a40ba302d ) Commit Message: x86/IO-APIC:

Re: [PATCH V8 00/12] fix migration of suspended runstate

2023-12-20 Thread Anthony PERARD
On Mon, Dec 18, 2023 at 01:14:51PM +0800, Peter Xu wrote: > On Wed, Dec 13, 2023 at 10:35:33AM -0500, Steven Sistare wrote: > > Hi Peter, all have RB's, with all i's dotted and t's crossed - steve > > Yes this seems to be more migration related so maybe good candidate for a > pull from migration s

[libvirt test] 184187: tolerable all pass - PUSHED

2023-12-20 Thread osstest service owner
flight 184187 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/184187/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-raw 15 saverestore-support-check fail blocked in 184157 test-armhf-armhf-libvirt 16 savere

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

2023-12-20 Thread Ayan Kumar Halder
On 20/12/2023 13:16, Julien Grall wrote: Hi, Hi Julien/Luca, On 20/12/2023 12:15, Ayan Kumar Halder wrote: On 20/12/2023 09:43, Luca Fancellu wrote: On 20 Dec 2023, at 09:29, Luca Fancellu wrote: Hi Ayan, Hi Luca, Thanks for looking into this. On 18 Dec 2023, at 20:29, Ayan Kuma

Re: [PATCH] x86/amd: extend CPU errata #1474 affected models

2023-12-20 Thread Roger Pau Monné
On Wed, Dec 20, 2023 at 02:46:43PM +, Andrew Cooper wrote: > On 20/12/2023 2:22 pm, Roger Pau Monne wrote: > > Errata #1474 does also affect models from family 17h ranges 00-2Fh, so the > > errata now covers all the models released under Family 17h (Zen, Zen+ and > > Zen2). > > Perhaps "has no

Re: [PATCH V8 00/12] fix migration of suspended runstate

2023-12-20 Thread Steven Sistare
On 12/20/2023 9:52 AM, Anthony PERARD wrote: > On Mon, Dec 18, 2023 at 01:14:51PM +0800, Peter Xu wrote: >> On Wed, Dec 13, 2023 at 10:35:33AM -0500, Steven Sistare wrote: >>> Hi Peter, all have RB's, with all i's dotted and t's crossed - steve >> >> Yes this seems to be more migration related so m

Re: [XEN PATCH 4/7] xen/arm: mem_access: address violations of MISRA C:2012 Rule 16.3

2023-12-20 Thread Tamas K Lengyel
On Wed, Dec 20, 2023 at 6:53 AM Julien Grall wrote: > > Hi Federico, > > On 20/12/2023 11:03, Federico Serafini wrote: > > Refactor of the code to have a break statement at the end of the > > switch-clause. This addresses violations of Rule 16.3 > > ("An unconditional `break' statement shall termi

Re: [PATCH] x86/amd: extend CPU errata #1474 affected models

2023-12-20 Thread Andrew Cooper
On 20/12/2023 3:10 pm, Roger Pau Monné wrote: > On Wed, Dec 20, 2023 at 02:46:43PM +, Andrew Cooper wrote: >> On 20/12/2023 2:22 pm, Roger Pau Monne wrote: >>> Errata #1474 does also affect models from family 17h ranges 00-2Fh, so the >>> errata now covers all the models released under Family 1

Re: [PATCH v6 4/9] xen/asm-generic: introduce stub header monitor.h

2023-12-20 Thread Oleksii
It is necessary to remove unnecessary inclusions of headers in arch/*/asm/monitor.h. This was overlooked. Sorry for the inconvenience. ~ Oleksii On Wed, 2023-12-20 at 16:08 +0200, Oleksii Kurochko wrote: > The header is shared between several archs so it is > moved to asm-generic. > > Switch pa

Re: [PATCH v2 5/7] xen/ppc: Enable bootfdt and boot allocator

2023-12-20 Thread Julien Grall
Hi Shawn, On 20/12/2023 13:23, Julien Grall wrote: Hi, On 15/12/2023 02:44, Shawn Anastasio wrote: Move PPC off the asm-generic setup.h and enable usage of bootfdt for populating the boot info struct from the firmware-provided device tree. Also enable the Xen boot page allocator. Includes min

[XEN PATCH v2] docs/misra: exclude files inherited from ACPI CA from MISRA compliance

2023-12-20 Thread Nicola Vetrini
The files under 'include/acpi/ac*.h' and 'include/acpi/plaform/ac*.h' are inherited from Linux and ACPI CA, therefore they are not subject to MISRA compliance at the moment. No functional change. Signed-off-by: Nicola Vetrini --- Changes in v2: - Generalize the exclusion to ac*.h - Add exclusion

Re: [PATCH v6 4/9] xen/asm-generic: introduce stub header monitor.h

2023-12-20 Thread Andrew Cooper
On 20/12/2023 2:08 pm, Oleksii Kurochko wrote: > diff --git a/xen/include/asm-generic/monitor.h > b/xen/include/asm-generic/monitor.h > new file mode 100644 > index 00..74e4870cd7 > --- /dev/null > +++ b/xen/include/asm-generic/monitor.h > @@ -0,0 +1,57 @@ > +/* SPDX-License-Identifier: GP

  1   2   >