[xen-unstable test] 183620: regressions - trouble: fail/pass/starved

2023-10-30 Thread osstest service owner
flight 183620 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183620/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-examine-uefi 6 xen-install fail REGR. vs. 183615

[linux-linus test] 183617: tolerable FAIL - PUSHED

2023-10-30 Thread osstest service owner
flight 183617 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183617/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 183570 test-amd64-amd64-xl-qemuu-win7-amd64

[PATCH for-4.18 v2] automation: fix race condition in adl-suspend test

2023-10-30 Thread Marek Marczykowski-Górecki
If system suspends too quickly, the message for the test controller to wake up the system may be not sent to the console before suspending. This will cause the test to timeout. Fix this by calling sync on the console and waiting a bit after printing the message. The test controller then resumes

Re: [PATCH] xen/events: avoid using info_for_irq() in xen_send_IPI_one()

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Juergen Gross wrote: > xen_send_IPI_one() is being used by cpuhp_report_idle_dead() after > it calls rcu_report_dead(), meaning that any RCU usage by > xen_send_IPI_one() is a bad idea. > > Unfortunately xen_send_IPI_one() is using notify_remote_via_irq() > today, which is

[PATCH v4 5/5] [FUTURE] tools/arm: enable vPCI for domUs

2023-10-30 Thread Stewart Hildebrand
Set the vPCI flag in xen_domctl_createdomain to enable vPCI if a pci device has been specified in the xl domain config file. Signed-off-by: Stewart Hildebrand --- Same story as the patch before this regarding the [FUTURE] tag. v3->v4: * split from ("xen/arm: enable vPCI for domUs") ---

[PATCH v4 4/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-10-30 Thread Stewart Hildebrand
Select HAS_VPCI_GUEST_SUPPORT in Kconfig for enabling vPCI support for domUs. Add checks to fail guest creation if the configuration is invalid. Signed-off-by: Stewart Hildebrand --- As the tag implies, this patch is not intended to be merged (yet). Note that CONFIG_HAS_VPCI_GUEST_SUPPORT is

[PATCH v4 3/5] xen/arm: enable vPCI for dom0

2023-10-30 Thread Stewart Hildebrand
Set the vPCI flag in xen_domctl_createdomain to enable vPCI for dom0 if iommu and PCI passthrough are enabled and there exists a PCI host bridge in the system. Adjust pci_host_iterate_bridges_and_count() to count the number of host bridges if no callback is provided. Signed-off-by: Stewart

[PATCH v4 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common

2023-10-30 Thread Stewart Hildebrand
Both x86 and ARM need a way at domain creation time to specify whether the domain needs vPCI emulation. Move the vPCI flag from x86 xen_domctl_createdomain.arch.emulation_flags to the common xen_domctl_createdomain.flags. Move has_vpci() macro to common header. Bump XEN_DOMCTL_INTERFACE_VERSION

[PATCH v4 1/5] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option

2023-10-30 Thread Stewart Hildebrand
From: Rahul Singh Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though the feature is not yet complete in the current upstream codebase. The purpose of this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for testing and development of PCI

[PATCH v4 0/5] Kconfig for PCI passthrough on ARM

2023-10-30 Thread Stewart Hildebrand
There are multiple series in development/review [1], [2] that will benefit from having a Kconfig option for PCI passthrough on ARM. Hence I have sent this series independent from any other series. v3->v4: * rename ("xen/arm: pci: plumb xen_arch_domainconfig with pci info") to ("xen/vpci: move

Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Jan Beulich wrote: > On 30.10.2023 10:11, Nicola Vetrini wrote: > > --- a/automation/eclair_analysis/ECLAIR/deviations.ecl > > +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl > > @@ -163,6 +163,15 @@ Therefore the absence of prior declarations is safe." > >

Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Nicola Vetrini wrote: > As stated in rules.rst, functions used only in asm modules > are allowed to have no prior declaration visible when being > defined, hence these functions are marked with an > 'asmlinkage' macro, which is then deviated for MISRA C:2012 > Rule 8.4. > >

Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Julien Grall wrote: > Hi Nicola, > > On 30/10/2023 09:11, Nicola Vetrini wrote: > > As stated in rules.rst, functions used only in asm modules > > are allowed to have no prior declaration visible when being > > defined, hence these functions are marked with an > >

Re: [XEN PATCH][for-4.19 v5] xen: Add deviations for MISRA C:2012 Rule 7.1

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Julien Grall wrote: > Hi Nicola, > > On 27/10/2023 16:11, Nicola Vetrini wrote: > > diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst > > index 8511a189253b..81473fb4 100644 > > --- a/docs/misra/deviations.rst > > +++ b/docs/misra/deviations.rst > > @@

Re: [XEN PATCH][for-4.19 v4 1/8] xen/include: add macro ISOLATE_LOW_BIT

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Jan Beulich wrote: > On 27.10.2023 15:34, Nicola Vetrini wrote: > > --- a/xen/include/xen/macros.h > > +++ b/xen/include/xen/macros.h > > @@ -8,8 +8,14 @@ > > #define DIV_ROUND(n, d) (((n) + (d) / 2) / (d)) > > #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) > > > >

Re: [PATCH] console: conditionalize console_input_domain()

2023-10-30 Thread Stefano Stabellini
On Mon, 30 Oct 2023, Jan Beulich wrote: > The function was introduced for just one piece of code to use; it is > dead code in cases where the respective Kconfig option is disabled, thus > violating Misra C:2012 rule 2.1 there. > > Signed-off-by: Jan Beulich Reviewed-by: Stefano Stabellini >

Re: [PATCH] xenstored: do not redirect stderr to /dev/null

2023-10-30 Thread Edwin Torok
> On 25 Oct 2023, at 14:50, Edwin Török wrote: > > From: Edwin Török > > By default stderr gets redirected to /dev/null because oxenstored daemonizes > itself. > This must be a left-over from pre-systemd days. > > In ee7815f49f ("tools/oxenstored: Set uncaught exception handler") a >

Cambridge University Talk - 9th November 2023

2023-10-30 Thread Kelly Choi
Hello Xen Community! I'm excited to share that we will be presenting a talk at Cambridge University! This is free and open to everyone, including students and the public. Make sure to add this to your calendars and come along. *Date: Thursday 9th November 2023* *Time: 3 - 4pm * *Location: *

[xen-4.18-testing test] 183616: regressions - FAIL

2023-10-30 Thread osstest service owner
flight 183616 xen-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/183616/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 183555

Re: [PATCH v1 12/29] xen/asm-generic: introduce stub header pci.h

2023-10-30 Thread Jan Beulich
On 30.10.2023 17:34, Oleksii wrote: > Hello Jan, > > On Thu, 2023-10-19 at 11:55 +0200, Jan Beulich wrote: >> On 14.09.2023 16:56, Oleksii Kurochko wrote: >>> --- /dev/null >>> +++ b/xen/include/asm-generic/pci.h >>> @@ -0,0 +1,18 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-only */ >>> +#ifndef

Re: [PATCH] automation: fix race condition in adl-suspend test

2023-10-30 Thread Marek Marczykowski-Górecki
On Mon, Oct 30, 2023 at 05:32:08PM +0100, Marek Marczykowski-Górecki wrote: > On Mon, Oct 30, 2023 at 12:42:52PM +0100, Roger Pau Monné wrote: > > On Sat, Oct 28, 2023 at 05:33:57AM +0200, Marek Marczykowski-Górecki wrote: > > > If system suspends too quickly, the message for the test controller

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 05:34:48PM +0100, Jan Beulich wrote: > On 30.10.2023 17:10, Roger Pau Monné wrote: > > On Mon, Oct 30, 2023 at 03:32:56PM +0100, Jan Beulich wrote: > >> On 24.10.2023 15:51, Roger Pau Monne wrote: > >>> The current implementation of x2APIC requires to either use Cluster >

Re: [PATCH v2] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 03:32:40PM +0200, Xenia Ragiadakou wrote: > Given that start < kernel_end and end > kernel_start, the logic that > determines the best placement for dom0 initrd and metadata, does not > take into account the three cases below: > (1) start > kernel_start && end > kernel_end

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Jan Beulich
On 30.10.2023 17:10, Roger Pau Monné wrote: > On Mon, Oct 30, 2023 at 03:32:56PM +0100, Jan Beulich wrote: >> On 24.10.2023 15:51, Roger Pau Monne wrote: >>> The current implementation of x2APIC requires to either use Cluster Logical >>> or >>> Physical mode for all interrupts. However the

Re: [PATCH v1 12/29] xen/asm-generic: introduce stub header pci.h

2023-10-30 Thread Oleksii
Hello Jan, On Thu, 2023-10-19 at 11:55 +0200, Jan Beulich wrote: > On 14.09.2023 16:56, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/include/asm-generic/pci.h > > @@ -0,0 +1,18 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef __ASM_GENERIC_PCI_H__ > > +#define

Re: [PATCH] automation: fix race condition in adl-suspend test

2023-10-30 Thread Marek Marczykowski-Górecki
On Mon, Oct 30, 2023 at 12:42:52PM +0100, Roger Pau Monné wrote: > On Sat, Oct 28, 2023 at 05:33:57AM +0200, Marek Marczykowski-Górecki wrote: > > If system suspends too quickly, the message for the test controller to > > wake up the system may be not sent to the console before suspending. > >

Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

2023-10-30 Thread Jan Beulich
On 30.10.2023 17:19, Roger Pau Monné wrote: > On Mon, Oct 30, 2023 at 03:13:50PM +0100, Jan Beulich wrote: >> On 24.10.2023 12:26, Roger Pau Monne wrote: >>> The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is >>> Logical mode APIC must be configured for Cluster

Re: [RFC PATCH 03/22] x86/msr: always allow a pinned Dom0 to read any unknown MSR

2023-10-30 Thread Jan Beulich
On 25.10.2023 21:29, Edwin Török wrote: > This can be useful if you realize you have to inspect the value of an > MSR in production, without having to change into a new Xen first that > handles the MSR. Yet on a non-pinned Dom0 you'd still be lost. Since iirc we generally advise against pinning,

Re: [PATCH] arch: drop get_processor_id()

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 02:29:09PM +0100, Jan Beulich wrote: > smp_processor_id() is what we commonly use; there's no need for it to > have an alias. > > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Thanks, Roger.

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 04:35:41PM +0100, Jan Beulich wrote: > On 30.10.2023 16:23, Roger Pau Monné wrote: > > On Mon, Oct 30, 2023 at 04:19:22PM +0100, Jan Beulich wrote: > >> On 30.10.2023 16:14, Roger Pau Monné wrote: > >>> On Mon, Oct 30, 2023 at 01:24:52PM +0100, Jan Beulich wrote: > On

Re: [RFC PATCH 02/22] x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel

2023-10-30 Thread Jan Beulich
On 25.10.2023 21:29, Edwin Török wrote: > Dom0 should always be able to read this MSR: it is useful when > investigating performance issues in production. While I'm not outright opposed, I'm also not convinced. At the very least ... > Although the count is Thread scoped, in practice all cores

Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 03:13:50PM +0100, Jan Beulich wrote: > On 24.10.2023 12:26, Roger Pau Monne wrote: > > The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is > > Logical mode APIC must be configured for Cluster destination model. > > However in > >

Re: [RFC PATCH 04/22] x86/msr-index: add references to vendor manuals

2023-10-30 Thread Jan Beulich
On 25.10.2023 21:29, Edwin Török wrote: > To more easily lookup the semantics of these MSRs add references to > vendor manuals. As much as I appreciate the intention, ... > --- a/xen/arch/x86/include/asm/msr-index.h > +++ b/xen/arch/x86/include/asm/msr-index.h > @@ -13,6 +13,16 @@ > * Blocks

Re: [RFC PATCH 12/22] x86/msr-index: define more architectural MSRs

2023-10-30 Thread Jan Beulich
On 25.10.2023 21:29, Edwin Török wrote: > From: Edwin Török > > Add most architectural MSRs, except those behind CPUID features that are > not yet implemented, such as TME, SGX. I'm not convinced we should blindly add MSR definitions for ones we don't use. But if you do, ... > ---

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 03:32:56PM +0100, Jan Beulich wrote: > On 24.10.2023 15:51, Roger Pau Monne wrote: > > The current implementation of x2APIC requires to either use Cluster Logical > > or > > Physical mode for all interrupts. However the selection of Physical vs > > Logical > > is not

Re: [XEN PATCH 8/8] x86/sysctl: address a violation of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:23, Federico Serafini wrote: > Add missing parameter name. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 7/8] x86/platform_hypercall: address violations of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:23, Federico Serafini wrote: > Add missing parameter names. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 6/8] x86/physdev: address violations of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:23, Federico Serafini wrote: > Add missing parameter names. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich Albeit I can't resist to say that ... > --- a/xen/arch/x86/physdev.c > +++ b/xen/arch/x86/physdev.c > @@ -18,9 +18,9 @@ > #include >

Re: [XEN PATCH 5/8] x86/pci: address a violation of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:23, Federico Serafini wrote: > Add missing parameter name. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 4/8] x86/smp: address a violation of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:22, Federico Serafini wrote: > Add missing parameter name. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 2/8] x86/mmconfig: address violations of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:22, Federico Serafini wrote: > Add missing parameter names. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 3/8] x86/vpmu: address a violation of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:22, Federico Serafini wrote: > Add missing parameter name. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

Re: [XEN PATCH 1/8] x86/hvm: address violations of MISRA C:2012 Rule 8.2

2023-10-30 Thread Jan Beulich
On 23.10.2023 09:22, Federico Serafini wrote: > Add missing parameter names. No functional change. > > Signed-off-by: Federico Serafini Acked-by: Jan Beulich

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

2023-10-30 Thread Jan Beulich
On 13.10.2023 00:09, Volodymyr Babchuk wrote: > Previously pci_enable_msi() function obtained pdev pointer by itself, > but taking into account upcoming changes to PCI locking, it is better > when caller passes already acquired pdev pointer to the function. For the patch to be understandable on

Re: [XEN PATCH][for-4.19 v2 2/2] xen/iommu: use ISOLATE_LOW_BIT to wrap a violation of Rule 10.1

2023-10-30 Thread Jan Beulich
On 27.10.2023 15:36, Nicola Vetrini wrote: > No functional change. > > Signed-off-by: Nicola Vetrini > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [XEN PATCH][for-4.19 v4 1/8] xen/include: add macro ISOLATE_LOW_BIT

2023-10-30 Thread Jan Beulich
On 27.10.2023 15:34, Nicola Vetrini wrote: > --- a/xen/include/xen/macros.h > +++ b/xen/include/xen/macros.h > @@ -8,8 +8,14 @@ > #define DIV_ROUND(n, d) (((n) + (d) / 2) / (d)) > #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) > > -#define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m))) >

Re: [PATCH] xenoprof: move asm/ include

2023-10-30 Thread Bertrand Marquis
Hi Jan, > On 30 Oct 2023, at 14:19, Jan Beulich wrote: > > There's no need for xen/xenoprof.h to include the arch header when the > respective config option is off. The only compensation needed is for > svm.c to explicitly include the arch header instead of the common one > (matching what vmx.c

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Jan Beulich
On 30.10.2023 16:23, Roger Pau Monné wrote: > On Mon, Oct 30, 2023 at 04:19:22PM +0100, Jan Beulich wrote: >> On 30.10.2023 16:14, Roger Pau Monné wrote: >>> On Mon, Oct 30, 2023 at 01:24:52PM +0100, Jan Beulich wrote: On 26.10.2023 17:19, Roger Pau Monné wrote: > Maybe the issue is that

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 07:50:27AM -0700, Elliott Mitchell wrote: > On Tue, Oct 24, 2023 at 03:51:50PM +0200, Roger Pau Monne wrote: > > diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c > > index 707deef98c27..15632cc7332e 100644 > > --- a/xen/arch/x86/genapic/x2apic.c >

Re: [PATCH] arch: drop get_processor_id()

2023-10-30 Thread Bertrand Marquis
Hi Jan, > On 30 Oct 2023, at 14:29, Jan Beulich wrote: > > smp_processor_id() is what we commonly use; there's no need for it to > have an alias. > > Signed-off-by: Jan Beulich For the arm part: Reviewed-by: Bertrand Marquis Cheers Bertrand > > --- a/xen/arch/arm/include/asm/current.h >

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 04:19:22PM +0100, Jan Beulich wrote: > On 30.10.2023 16:14, Roger Pau Monné wrote: > > On Mon, Oct 30, 2023 at 01:24:52PM +0100, Jan Beulich wrote: > >> On 26.10.2023 17:19, Roger Pau Monné wrote: > >>> Maybe the issue is that PV_SHIM_EXCLUSIVE shouldn't have been a > >>>

Re: [XEN PATCH][for-4.19 v4 4/8] x86_64/mm: express macro CNT using ISOLATE_LOW_BIT

2023-10-30 Thread Jan Beulich
On 27.10.2023 15:34, Nicola Vetrini wrote: > The various definitions of macro CNT (and the related BUILD_BUG_ON) > can be rewritten using ISOLATE_LOW_BIT, encapsulating a violation of > MISRA C:2012 Rule 10.1. > > Signed-off-by: Nicola Vetrini > Reviewed-by: Stefano Stabellini Acked-by: Jan

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Jan Beulich
On 30.10.2023 16:14, Roger Pau Monné wrote: > On Mon, Oct 30, 2023 at 01:24:52PM +0100, Jan Beulich wrote: >> On 26.10.2023 17:19, Roger Pau Monné wrote: >>> Maybe the issue is that PV_SHIM_EXCLUSIVE shouldn't have been a >>> Kconfig option in the first place, and instead a specific Kconfig >>>

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 01:24:52PM +0100, Jan Beulich wrote: > On 26.10.2023 17:19, Roger Pau Monné wrote: > > On Thu, Oct 26, 2023 at 05:07:18PM +0200, Jan Beulich wrote: > >> On 26.10.2023 15:24, Roger Pau Monné wrote: > >>> On Thu, Oct 26, 2023 at 11:03:42AM +0200, Jan Beulich wrote: > On

Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Jan Beulich
On 30.10.2023 10:11, Nicola Vetrini wrote: > --- a/automation/eclair_analysis/ECLAIR/deviations.ecl > +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl > @@ -163,6 +163,15 @@ Therefore the absence of prior declarations is safe." > -config=MC3R1.R8.4,reports+={safe,

Re: [XEN PATCH v2] x86/iommu_init: address a violation of MISRA C:2012 Rule 8.3

2023-10-30 Thread Jan Beulich
On 25.10.2023 15:01, Federico Serafini wrote: > Make function definition and declaration consistent and emphasize that > the formal parameter is deliberately not used. Coming back to my earlier objection: Did you consider alternatives? Best would of course be to get rid of the forward

Re: [XEN PATCH][for-4.19 v5] xen: Add deviations for MISRA C:2012 Rule 7.1

2023-10-30 Thread Julien Grall
Hi Nicola, On 27/10/2023 16:11, Nicola Vetrini wrote: diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 8511a189253b..81473fb4 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -90,6 +90,13 @@ Deviations related to MISRA C:2012 Rules:

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Elliott Mitchell
On Tue, Oct 24, 2023 at 03:51:50PM +0200, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c > index 707deef98c27..15632cc7332e 100644 > --- a/xen/arch/x86/genapic/x2apic.c > +++ b/xen/arch/x86/genapic/x2apic.c > @@ -220,38 +239,56 @@ static struct

[ovmf test] 183619: all pass - PUSHED

2023-10-30 Thread osstest service owner
flight 183619 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183619/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a671a14e63fdaa9490e5c61cf11346416f1d1463 baseline version: ovmf

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-10-30 Thread Jan Beulich
On 24.10.2023 15:51, Roger Pau Monne wrote: > The current implementation of x2APIC requires to either use Cluster Logical or > Physical mode for all interrupts. However the selection of Physical vs > Logical > is not done at APIC setup, an APIC can be addressed both in Physical or > Logical >

[PATCH] xen/events: avoid using info_for_irq() in xen_send_IPI_one()

2023-10-30 Thread Juergen Gross
xen_send_IPI_one() is being used by cpuhp_report_idle_dead() after it calls rcu_report_dead(), meaning that any RCU usage by xen_send_IPI_one() is a bad idea. Unfortunately xen_send_IPI_one() is using notify_remote_via_irq() today, which is using irq_get_chip_data() via info_for_irq(). And

[PATCH v4 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-30 Thread Juergen Gross
As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to alternative code and header. Signed-off-by: Juergen Gross --- V4: - rename x86_nop() to nop_func() and x86_BUG() to BUG_func() (Boris Petkov) ---

[PATCH v4 0/5] x86/paravirt: Get rid of paravirt patching

2023-10-30 Thread Juergen Gross
This is a small series getting rid of paravirt patching by switching completely to alternative patching for the same functionality. The basic idea is to add the capability to switch from indirect to direct calls via a special alternative patching option. This removes _some_ of the paravirt macro

Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

2023-10-30 Thread Jan Beulich
On 24.10.2023 12:26, Roger Pau Monne wrote: > The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is > Logical mode APIC must be configured for Cluster destination model. However > in > apic_x2apic_probe() such flag is incorrectly used to gate whether Physical > mode > can

Re: [PATCH] x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER

2023-10-30 Thread Jan Beulich
On 24.10.2023 12:26, Roger Pau Monne wrote: > The ACPI FADT APIC_CLUSTER flag mandates that when the interrupt delivery is > Logical mode APIC must be configured for Cluster destination model. However > in > apic_x2apic_probe() such flag is incorrectly used to gate whether Physical > mode > can

Re: [PATCH] arch: drop get_processor_id()

2023-10-30 Thread Oleksii
Hi Jan, On Mon, 2023-10-30 at 14:29 +0100, Jan Beulich wrote: > smp_processor_id() is what we commonly use; there's no need for it to > have an alias. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/arm/include/asm/current.h > +++ b/xen/arch/arm/include/asm/current.h > @@ -53,7 +53,7 @@

Re: [PATCH] xenoprof: move asm/ include

2023-10-30 Thread Oleksii
Hi Jan, On Mon, 2023-10-30 at 14:19 +0100, Jan Beulich wrote: > There's no need for xen/xenoprof.h to include the arch header when > the > respective config option is off. The only compensation needed is for > svm.c to explicitly include the arch header instead of the common one > (matching what

Re: Lockdep show 6.6-rc regression in Xen HVM CPU hotplug

2023-10-30 Thread David Woodhouse
On Tue, 2023-10-24 at 14:08 +0200, Juergen Gross wrote: > On 24.10.23 12:41, Juergen Gross wrote: > > On 24.10.23 09:43, David Woodhouse wrote: > > > On Tue, 2023-10-24 at 08:53 +0200, Juergen Gross wrote: > > > > > > > > I'm puzzled. This path doesn't contain any of the RCU usage I've added > >

[PATCH v2] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-30 Thread Xenia Ragiadakou
Given that start < kernel_end and end > kernel_start, the logic that determines the best placement for dom0 initrd and metadata, does not take into account the three cases below: (1) start > kernel_start && end > kernel_end (2) start < kernel_start && end < kernel_end (3) start > kernel_start &&

[xen-unstable test] 183615: tolerable FAIL

2023-10-30 Thread osstest service owner
flight 183615 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183615/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-arm64-arm64-xl-vhd 8 xen-boot fail in 183603 pass in 183615

[PATCH] arch: drop get_processor_id()

2023-10-30 Thread Jan Beulich
smp_processor_id() is what we commonly use; there's no need for it to have an alias. Signed-off-by: Jan Beulich --- a/xen/arch/arm/include/asm/current.h +++ b/xen/arch/arm/include/asm/current.h @@ -53,7 +53,7 @@ static inline struct cpu_info *get_cpu_i DECLARE_PER_CPU(unsigned int, cpu_id);

Re: [PATCH] xenoprof: move asm/ include

2023-10-30 Thread Jan Beulich
On 30.10.2023 14:19, Jan Beulich wrote: > There's no need for xen/xenoprof.h to include the arch header when the > respective config option is off. The only compensation needed is for > svm.c to explicitly include the arch header instead of the common one > (matching what vmx.c and traps.c do). >

[PATCH] xenoprof: move asm/ include

2023-10-30 Thread Jan Beulich
There's no need for xen/xenoprof.h to include the arch header when the respective config option is off. The only compensation needed is for svm.c to explicitly include the arch header instead of the common one (matching what vmx.c and traps.c do). With that Arm's header can be deleted, and

[PATCH] console: conditionalize console_input_domain()

2023-10-30 Thread Jan Beulich
The function was introduced for just one piece of code to use; it is dead code in cases where the respective Kconfig option is disabled, thus violating Misra C:2012 rule 2.1 there. Signed-off-by: Jan Beulich --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -475,6 +475,7 @@

[PATCH] x86/PVH: allow Dom0 ELF parsing to be verbose

2023-10-30 Thread Jan Beulich
VERBOSE had ceased to exist already before the introduction of this ELF parsing code. Fixes: 62ba982424cb ("x86: parse Dom0 kernel for PVHv2") Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -557,9 +557,8 @@ static int __init

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

2023-10-30 Thread osstest service owner
flight 183618 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183618/ 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

Re: [PATCH 5/7] x86: detect PIT aliasing on ports other than 0x4[0-3]

2023-10-30 Thread Jan Beulich
On 26.10.2023 17:13, Roger Pau Monné wrote: > On Thu, Oct 26, 2023 at 05:10:41PM +0200, Jan Beulich wrote: >> On 26.10.2023 15:57, Roger Pau Monné wrote: >>> On Thu, Oct 26, 2023 at 02:31:27PM +0200, Jan Beulich wrote: On 26.10.2023 12:25, Roger Pau Monné wrote: > On Thu, May 11, 2023 at

Re: [PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative

2023-10-30 Thread Juergen Gross
On 25.10.23 12:34, Borislav Petkov wrote: On Thu, Oct 19, 2023 at 11:15:16AM +0200, Juergen Gross wrote: +/* Low-level backend functions usable from alternative code replacements. */ +DEFINE_ASM_FUNC(x86_nop, "", .entry.text); +EXPORT_SYMBOL_GPL(x86_nop); This is all x86 code so you don't

Re: [PATCH 4/7] x86: detect PIC aliasing on ports other than 0x[2A][01]

2023-10-30 Thread Jan Beulich
On 26.10.2023 17:19, Roger Pau Monné wrote: > On Thu, Oct 26, 2023 at 05:07:18PM +0200, Jan Beulich wrote: >> On 26.10.2023 15:24, Roger Pau Monné wrote: >>> On Thu, Oct 26, 2023 at 11:03:42AM +0200, Jan Beulich wrote: On 26.10.2023 10:34, Roger Pau Monné wrote: > On Thu, May 11, 2023 at

Re: [PATCH] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-30 Thread Jan Beulich
On 30.10.2023 08:37, Xenia Ragiadakou wrote: > Jan would it be possible to sketch a patch of your suggested solution > because I 'm afraid I have not fully understood it yet and I won't be > able to implement it properly for a v2? While what Roger sent looks to be sufficient, I still thought

Re: [PATCH] automation: fix race condition in adl-suspend test

2023-10-30 Thread Roger Pau Monné
On Sat, Oct 28, 2023 at 05:33:57AM +0200, Marek Marczykowski-Górecki wrote: > If system suspends too quickly, the message for the test controller to > wake up the system may be not sent to the console before suspending. > This will cause the test to timeout. > > Fix this by waiting a bit after

Re: [XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Julien Grall
Hi Nicola, On 30/10/2023 09:11, Nicola Vetrini wrote: As stated in rules.rst, functions used only in asm modules are allowed to have no prior declaration visible when being defined, hence these functions are marked with an 'asmlinkage' macro, which is then deviated for MISRA C:2012 Rule 8.4.

Re: [PATCH] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-30 Thread Roger Pau Monné
On Mon, Oct 30, 2023 at 09:37:24AM +0200, Xenia Ragiadakou wrote: > > On 27/10/23 15:01, Jan Beulich wrote: > > On 27.10.2023 13:18, Xenia Ragiadakou wrote: > > > > > > On 27/10/23 09:37, Jan Beulich wrote: > > > > On 26.10.2023 18:55, Xenia Ragiadakou wrote: > > > > > > > > > > > > > > > On

AMD SEV Enablement plans in Xen

2023-10-30 Thread Vaishali Thakkar
Hi All, This is an informational post about our plans for the enablement of AMD SEV support in Xen. This work will be done as part of the Hyper OpenX project[1]. Phase Zero: Our primary intention is to gather the necessary information required to commence the upstream work

[XEN PATCH][for-4.19 v5 0/8] Fix or deviate various instances of missing declarations

2023-10-30 Thread Nicola Vetrini
The patches in this series aim to fix or deviate various instances where a function or variable do not have a declaration visible when such entity is defined (in violation of MISRA C:2012 Rule 8.4). An exception listed under docs/misra/rules.rst allows asm-only functions and variables to be

[XEN PATCH][for-4.19 v5 7/8] x86/mem_access: make function static

2023-10-30 Thread Nicola Vetrini
The function is used only within this file, and therefore can be static. No functional change. Signed-off-by: Nicola Vetrini Acked-by: Tamas K Lengyel --- Changes in v3: - style fix --- xen/arch/x86/mm/mem_access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[XEN PATCH][for-4.19 v5 1/8] xen: modify or add declarations for variables where needed

2023-10-30 Thread Nicola Vetrini
Some variables with external linkage used in C code do not have a visible declaration where they are defined. Other variables can be made static, thereby eliminating the need for a declaration. Doing so also resolves violations of MISRA C:2012 Rule 8.4. Fix typo s/mcinfo_dumpped/mcinfo_dumped/

[XEN PATCH][for-4.19 v5 8/8] docs/misra: exclude three more files

2023-10-30 Thread Nicola Vetrini
These files should not conform to MISRA guidelines at the moment, therefore they are added to the exclusion list. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- These exclusions are automatically picked up by ECLAIR's automation to hide reports originating from these files.

[XEN PATCH][for-4.19 v5 3/8] x86: add asmlinkage macro to variables only used in asm code

2023-10-30 Thread Nicola Vetrini
To avoid a violation of MISRA C:2012 Rule 8.4, as permitted by docs/misra/rules.rst. Signed-off-by: Nicola Vetrini --- Changes in v3: - Edited commit message - Add two new variables Changes in v5: - Mark current_stack_pointer as a declaration. - Use asmlinkage instead of SAF. ---

[XEN PATCH][for-4.19 v5 6/8] xen/console: remove stub definition in consoled.h

2023-10-30 Thread Nicola Vetrini
The stub definition of 'consoled_guest_tx' can be removed, since its its single caller uses the implementation built with PV_SHIM enabled. Fixes: 5ef49f185c2d ("x86/pv-shim: shadow PV console's page for L2 DomU") Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini ---

[XEN PATCH][for-4.19 v5 2/8] x86: add deviation for asm-only functions

2023-10-30 Thread Nicola Vetrini
As stated in rules.rst, functions used only in asm modules are allowed to have no prior declaration visible when being defined, hence these functions are marked with an 'asmlinkage' macro, which is then deviated for MISRA C:2012 Rule 8.4. 'current_stack_pointer' in x86/asm_defns is a declaration,

[XEN PATCH][for-4.19 v5 5/8] x86/vm_event: add missing include for hvm_vm_event_do_resume

2023-10-30 Thread Nicola Vetrini
The missing header makes the declaration visible when the function is defined, thereby fixing a violation of MISRA C:2012 Rule 8.4. Fixes: 1366a0e76db6 ("x86/vm_event: add hvm/vm_event.{h,c}") Signed-off-by: Nicola Vetrini Acked-by: Tamas K Lengyel --- xen/arch/x86/hvm/vm_event.c | 1 + 1 file

[XEN PATCH][for-4.19 v5 4/8] x86/grant: switch included header to make declarations visible

2023-10-30 Thread Nicola Vetrini
The declarations for {create,replace}_grant_p2m_mapping are not visible when these functions are defined, therefore the right header needs to be included to allow them to be visible. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- Changes in v3: -

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-30 Thread Roger Pau Monné
On Fri, Oct 27, 2023 at 08:18:18PM +0100, Andrew Cooper wrote: > On 27/10/2023 2:47 pm, Roger Pau Monné wrote: > > On Fri, Oct 27, 2023 at 09:12:40AM +0200, Jan Beulich wrote: > >> On 26.10.2023 22:55, Andrew Cooper wrote: > >>> We eventually want to be able to build a stripped down Xen for a

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-30 Thread Jan Beulich
On 27.10.2023 21:18, Andrew Cooper wrote: > On 27/10/2023 2:47 pm, Roger Pau Monné wrote: >> On Fri, Oct 27, 2023 at 09:12:40AM +0200, Jan Beulich wrote: >>> On 26.10.2023 22:55, Andrew Cooper wrote: We eventually want to be able to build a stripped down Xen for a single platform. Make

[linux-linus test] 183614: regressions - FAIL

2023-10-30 Thread osstest service owner
flight 183614 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183614/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 broken in 183608

Re: [XEN v3] xen/arm32: head: Replace load_paddr with adr_l when they are equivalent

2023-10-30 Thread Michal Orzel
Hi Ayan, On 27/10/2023 20:07, Ayan Kumar Halder wrote: > Before the MMU is turned on, PC uses physical address. Thus, one can use adr_l > instead of load_paddr to obtain the physical address of a symbol. > > The only exception (for this replacement) is create_table_entry() which is > called

Re: [PATCH] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-30 Thread Xenia Ragiadakou
On 27/10/23 15:01, Jan Beulich wrote: On 27.10.2023 13:18, Xenia Ragiadakou wrote: On 27/10/23 09:37, Jan Beulich wrote: On 26.10.2023 18:55, Xenia Ragiadakou wrote: On 26/10/23 17:55, Jan Beulich wrote: On 26.10.2023 15:58, Xenia Ragiadakou wrote: On 26/10/23 15:37, Jan Beulich