[linux-linus test] 182179: regressions - FAIL

2023-08-04 Thread osstest service owner
flight 182179 linux-linus real [real] flight 182191 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182179/ http://logs.test-lab.xenproject.org/osstest/logs/182191/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[libvirt test] 182181: tolerable all pass - PUSHED

2023-08-04 Thread osstest service owner
flight 182181 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/182181/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 182131 test-armhf-armhf-libvirt-qcow2 15

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

2023-08-04 Thread osstest service owner
flight 182189 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/182189/ 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: [XEN PATCH] xen/sched: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Dario Faggioli
On Mon, 2023-07-31 at 14:24 -0700, Stefano Stabellini wrote: > On Mon, 31 Jul 2023, Federico Serafini wrote: > > Give a name to unnamed parameters to address violations of > > MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form > > with > > named parameters"). > > Keep consistency

Re: ack needed [XEN PATCH v3] xen/sched: mechanical renaming to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Dario Faggioli
On Mon, 2023-07-31 at 14:40 -0700, Stefano Stabellini wrote: > George, Dario, > > Please ack > Looks good to me. Acked-by: Dario Faggioli Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/

[xen-unstable test] 182174: regressions - FAIL

2023-08-04 Thread osstest service owner
flight 182174 xen-unstable real [real] flight 182186 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182174/ http://logs.test-lab.xenproject.org/osstest/logs/182186/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [XEN PATCH] xen: change parameter name in monitor_domctl() declaration

2023-08-04 Thread Stefano Stabellini
Hi Tamas, May I have your ack on this change? On Thu, 27 Jul 2023, Federico Serafini wrote: > Change parameter name in monitor_domctl() declaration for > consistency with the corresponding definition. > This addresses a violation of MISRA C:2012 Rule 8.3: "All declarations > of an object or

Re: [XEN PATCH 6/6] x86: refactor macros in 'xen-mca.h' to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > > -_mic = x86_mcinfo_next(_mic); \ > > +mic_ = x86_mcinfo_next(mic_); \ > > } \ > > -(_ret) = found ? _mic :

Re: [XEN PATCH 5/6] x86/xstate: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > Rename the local variables to avoid clashing with function 'xstate' > defined below, but declared in the corresponding header file. > > No functional changes. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h' > to avoid clashing with function parameter names in 'mpparse.c'. > > No functional changes. > > Signed-off-by: Nicola Vetrini > --- > Even though the global variable does not seem

Re: [XEN PATCH 3/6] xen/delay: address MISRA C:2012 Rule 5.3.

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > The variable 'msec' shadows the local variable in > 'ehci_dbgp_bios_handoff', but to prevent any future clashes, the one in > the macro gains a suffix. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH 2/6] libelf: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > The types u{8,16,32,64} defined in 'xen/arch/x86/include/asm/types.h' > shadow the variables in the modified function, hence violating Rule 5.3. > Therefore, the rename takes care of the shadowing. > > No functional changes. > > Signed-off-by: Nicola

Re: [XEN PATCH 1/6] x86: rename variable 'e820' to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > The variable declared in the header file 'xen/arch/x86/include/asm/e820.h' > is shadowed by many function parameters, so it is renamed to avoid these > violations. > > No functional changes. > > Signed-off-by: Nicola Vetrini > --- > This patch is

Re: [XEN PATCH] x86: Address violations of MISRA C:2012 and drop bool_t

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Federico Serafini wrote: > Give a name to unnamed parameters to address violations of > MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with > named parameters"). > Keep consistency between object and function declarations thus > addressing violations of MISRA

Re: [XEN PATCH v2 4/4] x86/setup: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > The parameters renamed in the function declaration caused shadowing > with the homonymous variable in 'xen/common/efi/boot.c'. Renaming > them also addresses Rule 8.3: > "All declarations of an object or function shall use the same names > and type

Re: [XEN PATCH v2 3/4] x86/irq: rename variable to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > The extern variable 'irq_desc' defined in 'irq.h' is shadowed by > local variables in the changed file. To avoid this, the variable is > renamed to 'irq_description'. > > No functional change. > > Signed-off-by: Nicola Vetrini You missed me reviewed

Re: [XEN PATCH v2 2/4] x86/mtrr: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > Rename variables to avoid shadowing and thus address > MISRA C:2012 Rule 5.3: > "An identifier declared in an inner scope shall not hide an > identifier declared in an outer scope". > > The shadowing happens between the struct declaration 'mtrr_state'

Re: [XEN PATCH v2 1/4] x86/mce: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Nicola Vetrini wrote: > Suitable mechanical renames are made to avoid shadowing > the function identifier 'wait' declared in 'xen/include/xen/wait.h', > thus addressing violations of MISRA C:2012 Rule 5.3: > "An identifier declared in an inner scope shall not hide an >

Re: Address MISRA C:2012 Rule 8.4

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Jan Beulich wrote: > On 04.08.2023 11:47, Nicola Vetrini wrote: > > Upon further examination, I identified the following patterns: > > > > 1. Functions defined in .c called only from asm code (e.g., the already > > mentioned __start_xen) > > 2. Functions/variables declared in

Re: [XEN PATCH 02/11] x86: move declarations to address MISRA C:2012 Rule 2.1

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Jan Beulich wrote: > On 03.08.2023 16:22, Nicola Vetrini wrote: > > On 03/08/2023 11:01, Jan Beulich wrote: > >> On 03.08.2023 04:13, Stefano Stabellini wrote: > >>> On Wed, 2 Aug 2023, Nicola Vetrini wrote: > @@ -1169,8 +1170,6 @@ static void cf_check >

Re: [PATCH] docs/misra: add always_inline to C-language-toolchain

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Jan Beulich wrote: > On 04.08.2023 03:34, Stefano Stabellini wrote: > > --- a/docs/misra/C-language-toolchain.rst > > +++ b/docs/misra/C-language-toolchain.rst > > @@ -84,6 +84,8 @@ The table columns are as follows: > >see Sections "6.48 Alternate Keywords" and

Re: [XEN PATCH v2] xen/string: add missing parameter names

2023-08-04 Thread Stefano Stabellini
On Fri, 4 Aug 2023, Jan Beulich wrote: > On 04.08.2023 09:55, Federico Serafini wrote: > > On 03/08/23 21:26, Stefano Stabellini wrote: > >> On Thu, 3 Aug 2023, Julien Grall wrote: > >>> On 03/08/2023 12:52, Luca Fancellu wrote: > > On 3 Aug 2023, at 12:46, Julien Grall wrote: > > > >

Re: [PATCH] automation: add missing "needs"

2023-08-04 Thread Stefano Stabellini
On Fri, 3 Aug 2023, Michal Orzel wrote: > On 04/08/2023 03:10, Stefano Stabellini wrote: > > > > > > From: Stefano Stabellini > > > > The test artifacts export jobs don't need prerequisites, so we should > > specify "needs" with an empty array for them. That way, they are not > > going to

Re: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2023 at 05:35:11PM +, Li, Xin3 wrote: > > > The IDT event delivery of X86_TRAP_DF, X86_TRAP_TS, X86_TRAP_NP, > > > X86_TRAP_SS, X86_TRAP_GP, X86_TRAP_AC and X86_TRAP_CP pushes an error > > > code into the orig_ax member of the pt_regs structure, and the error > > > code is

RE: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Li, Xin3
> > The IDT event delivery of X86_TRAP_DF, X86_TRAP_TS, X86_TRAP_NP, > > X86_TRAP_SS, X86_TRAP_GP, X86_TRAP_AC and X86_TRAP_CP pushes an error > > code into the orig_ax member of the pt_regs structure, and the error > > code is passed as the second argument of their C-handlers, although > > the

RE: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Li, Xin3
> > On 04/08/2023 8:57 am, Xin Li wrote: > >> I haven't checked Xen implications with this change, i.e., does Xen > >> hypervisor need to adjust how it passes arguments to PV guests? > > > > This is an internal detail of how Linux handles data on it's stacks, > > isn't it? > > > > The Xen code in

RE: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Li, Xin3
> On 04/08/2023 8:57 am, Xin Li wrote: > > I haven't checked Xen implications with this change, i.e., does Xen > > hypervisor need to adjust how it passes arguments to PV guests? > > This is an internal detail of how Linux handles data on it's stacks, isn't it? Yes, it is completely internal to

[ovmf test] 182184: all pass - PUSHED

2023-08-04 Thread osstest service owner
flight 182184 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182184/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 2d8c17a9b61ad298986daffe5373026c3b88c741 baseline version: ovmf

[qemu-mainline test] 182171: tolerable FAIL - PUSHED

2023-08-04 Thread osstest service owner
flight 182171 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/182171/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 182114

Re: [XEN PATCH 6/6] x86: refactor macros in 'xen-mca.h' to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
-_mic = x86_mcinfo_next(_mic); \ +mic_ = x86_mcinfo_next(mic_); \ } \ -(_ret) = found ? _mic : NULL; \ +(ret) = found_

[XEN PATCH 2/6] libelf: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
The types u{8,16,32,64} defined in 'xen/arch/x86/include/asm/types.h' shadow the variables in the modified function, hence violating Rule 5.3. Therefore, the rename takes care of the shadowing. No functional changes. Signed-off-by: Nicola Vetrini --- xen/common/libelf/libelf-tools.c | 24

[XEN PATCH 6/6] x86: refactor macros in 'xen-mca.h' to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
The macros defined 'xen/include/public/arch-x86/xen-mca.h' have needless underscore prefixes for parameter names and variable names that cause shadowing with e.g. the variable 'i' in function 'mce_action'. Therefore, the renaming aims to resolve present shadowing issues and lessen the probability

[XEN PATCH 4/6] x86/include: address MISRA C:2012 Rule 5.3.

2023-08-04 Thread Nicola Vetrini
s/mpc_default_type/mpc_default in 'xen/arch/x86/include/asm/mpspec.h' to avoid clashing with function parameter names in 'mpparse.c'. No functional changes. Signed-off-by: Nicola Vetrini --- Even though the global variable does not seem to be used anywhere and is perhaps better to remove it

[XEN PATCH 3/6] xen/delay: address MISRA C:2012 Rule 5.3.

2023-08-04 Thread Nicola Vetrini
The variable 'msec' shadows the local variable in 'ehci_dbgp_bios_handoff', but to prevent any future clashes, the one in the macro gains a suffix. No functional change. Signed-off-by: Nicola Vetrini --- Unless that file should remain as-is, because it's clearly taken from linux, but this does

[XEN PATCH 1/6] x86: rename variable 'e820' to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
The variable declared in the header file 'xen/arch/x86/include/asm/e820.h' is shadowed by many function parameters, so it is renamed to avoid these violations. No functional changes. Signed-off-by: Nicola Vetrini --- This patch is similar to other renames done on previous patches, and the

[XEN PATCH 0/6] xen: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
This series addresses shadowing issues to resolve violations of Rule 5.3, whose headline states: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope". To do this, suitable renames are made. In some cases global objects are modified, while other

[XEN PATCH 5/6] x86/xstate: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
Rename the local variables to avoid clashing with function 'xstate' defined below, but declared in the corresponding header file. No functional changes. Signed-off-by: Nicola Vetrini --- xen/arch/x86/xstate.c | 30 +++--- 1 file changed, 15 insertions(+), 15

[XEN PATCH] x86: Address violations of MISRA C:2012 and drop bool_t

2023-08-04 Thread Federico Serafini
Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between object and function declarations thus addressing violations of MISRA C:2012 Rule 8.3 ("All declarations of an object or

Re: Address MISRA C:2012 Rule 8.4

2023-08-04 Thread Nicola Vetrini
3. Variables that are either extern or not, such as 'acpi_gbl_FADT' in 'xen/include/acpi/acglobal.h', depending on DEFINE_ACPI_GLOBALS Below are the proposed resolution strategies: 3. One possible resolution pattern is including 'acglobal.h' twice (either directly or indirectly trough

[xen-4.17-testing test] 182167: tolerable FAIL - PUSHED

2023-08-04 Thread osstest service owner
flight 182167 xen-4.17-testing real [real] flight 182180 xen-4.17-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182167/ http://logs.test-lab.xenproject.org/osstest/logs/182180/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: Address MISRA C:2012 Rule 8.4

2023-08-04 Thread Nicola Vetrini
Upon further examination, I identified the following patterns: 1. Functions defined in .c called only from asm code (e.g., the already mentioned __start_xen) 2. Functions/variables declared in a .h, defined in a .c that does not include the .h with the declaration (e.g.,

Re: [PATCH v7 3/6] xen/riscv: introduce decode_cause() stuff

2023-08-04 Thread Alistair Francis
On Thu, Aug 3, 2023 at 8:05 AM Oleksii Kurochko wrote: > > The patch introduces stuff needed to decode a reason of an > exception. > > Signed-off-by: Oleksii Kurochko > --- > Changes in V7: > - Nothing changed. Only rebase. > --- > Changes in V6: > - Remove usage of LINK_TO_LOAD() due to the

Re: [PATCH v7 2/6] xen/riscv: introduce dummy

2023-08-04 Thread Alistair Francis
On Thu, Aug 3, 2023 at 8:05 AM Oleksii Kurochko wrote: > > will be used in the patch "xen/riscv: introduce > decode_cause() stuff" and requires > > Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis Alistair > --- > Changes in V7: > - Nothing changed. Only rebase. > --- > Changes

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 14:27, Julien Grall wrote: Hi Juergen, On 04/08/2023 13:05, Juergen Gross wrote: On 04.08.23 12:33, Julien Grall wrote: const char *canonicalize(struct connection *conn, const void *ctx,   const char *node, bool allow_special) { const char *name;   

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Julien Grall
Hi Juergen, On 04/08/2023 13:05, Juergen Gross wrote: On 04.08.23 12:33, Julien Grall wrote: const char *canonicalize(struct connection *conn, const void *ctx,   const char *node, bool allow_special) { const char *name; int local_off = 0;

[libvirt test] 182175: regressions - FAIL

2023-08-04 Thread osstest service owner
flight 182175 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/182175/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail REGR. vs. 182131 Tests which did not

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 12:33, Julien Grall wrote: Hi Juergen, On 04/08/2023 11:17, Juergen Gross wrote: On 04.08.23 12:00, Julien Grall wrote: Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename()

Re: [XEN PATCH] x86/processor: drop bool_t from mcheck_init() parameter

2023-08-04 Thread Federico Serafini
On 04/08/23 12:56, Federico Serafini wrote: Drop bool_t to make the function declaration consistent with the corresponding definition. This addresses a violation of MISRA C:2012 Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers"). No functional

Re: Address MISRA C:2012 Rule 8.4

2023-08-04 Thread Jan Beulich
On 04.08.2023 11:47, Nicola Vetrini wrote: > Upon further examination, I identified the following patterns: > > 1. Functions defined in .c called only from asm code (e.g., the already > mentioned __start_xen) > 2. Functions/variables declared in a .h, defined in a .c that does not > include the

Re: [PATCH] subdom: Fix -Werror=address failure in tmp_emulator

2023-08-04 Thread Jan Beulich
On 04.08.2023 11:29, Andrew Cooper wrote: > On 04/08/2023 8:23 am, Jan Beulich wrote: >> On 03.08.2023 22:36, Andrew Cooper wrote: >>> The opensuse-tumbleweed build jobs currently fail with: >>> >>> /builds/xen-project/xen/stubdom/tpm_emulator-x86_64/crypto/rsa.c: In >>> function 'rsa_private':

[XEN PATCH] x86/processor: drop bool_t from mcheck_init() parameter

2023-08-04 Thread Federico Serafini
Drop bool_t to make the function declaration consistent with the corresponding definition. This addresses a violation of MISRA C:2012 Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers"). No functional change. Signed-off-by: Federico Serafini ---

Re: [XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Julien Grall
Hi Federico, On 04/08/2023 11:29, Federico Serafini wrote: On 04/08/23 11:47, Andrew Cooper wrote: On 04/08/2023 10:38 am, Federico Serafini wrote: diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index be2b10a391..e1d9b94007 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5591,7

Re: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Juergen Gross
On 04.08.23 12:25, Andrew Cooper wrote: On 04/08/2023 8:57 am, Xin Li wrote: I haven't checked Xen implications with this change, i.e., does Xen hypervisor need to adjust how it passes arguments to PV guests? This is an internal detail of how Linux handles data on it's stacks, isn't it? The

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Julien Grall
Hi Juergen, On 04/08/2023 11:17, Juergen Gross wrote: On 04.08.23 12:00, Julien Grall wrote: Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling

Re: [XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Federico Serafini
On 04/08/23 11:47, Andrew Cooper wrote: On 04/08/2023 10:38 am, Federico Serafini wrote: diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index be2b10a391..e1d9b94007 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5591,7 +5591,7 @@ int __init populate_pt_range(unsigned long virt,

Re: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Andrew Cooper
On 04/08/2023 8:57 am, Xin Li wrote: > I haven't checked Xen implications with this change, i.e., does Xen > hypervisor need to adjust how it passes arguments to PV guests? This is an internal detail of how Linux handles data on it's stacks, isn't it? The Xen code in Linux will need adjustment

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 04.08.23 12:00, Julien Grall wrote: Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling canonicalize(), with the exception of do_unwatch(),

Re: [RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2023 at 12:57:34AM -0700, Xin Li wrote: > The IDT event delivery of X86_TRAP_DF, X86_TRAP_TS, X86_TRAP_NP, > X86_TRAP_SS, X86_TRAP_GP, X86_TRAP_AC and X86_TRAP_CP pushes an error > code into the orig_ax member of the pt_regs structure, and the error > code is passed as the second

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Julien Grall
Hi, On 04/08/2023 10:35, Juergen Gross wrote: On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling canonicalize(), with the exception of do_unwatch(), where the call is missing (which is not

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 04.08.23 11:44, Julien Grall wrote: On 04/08/2023 10:34, Juergen Gross wrote: On 04.08.23 11:21, Julien Grall wrote: Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git

Re: [XEN PATCH 02/11] x86: move declarations to address MISRA C:2012 Rule 2.1

2023-08-04 Thread Nicola Vetrini
This pattern (two closing braces at the same level) is why switch scope variable declarations were introduced (at least as far as introductions by me go). If switch scope variables aren't okay (which I continue to consider questionable), then this stylistic aspect needs sorting first (if

Re: [XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Andrew Cooper
On 04/08/2023 10:38 am, Federico Serafini wrote: > diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c > index be2b10a391..e1d9b94007 100644 > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -5591,7 +5591,7 @@ int __init populate_pt_range(unsigned long virt, > unsigned long nr_mfns) > * >

Re: Address MISRA C:2012 Rule 8.4

2023-08-04 Thread Nicola Vetrini
On 04/08/2023 02:35, Stefano Stabellini wrote: I think that's OK for me. My only concern is that we should track the project-wide deviations properly somewhere besides the ECLAIR configuration under xen.git which is ECLAIR specific. So far we used the notes in docs/misra/rules.rst. I don't

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Julien Grall
On 04/08/2023 10:34, Juergen Gross wrote: On 04.08.23 11:21, Julien Grall wrote: Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c

[XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Federico Serafini
Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names used in function declarations and the ones used in the corresponding function definitions, thus addressing

Re: [PATCH v3 23/25] tools/xenstore: merge is_valid_nodename() into canonicalize()

2023-08-04 Thread Juergen Gross
On 03.08.23 23:46, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: Today is_valid_nodename() is always called directly after calling canonicalize(), with the exception of do_unwatch(), where the call is missing (which is not correct, but results just in a wrong error reason

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 04.08.23 11:21, Julien Grall wrote: Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 86cf8322b4..2662a3fa49 100644 ---

Re: [PATCH] subdom: Fix -Werror=address failure in tmp_emulator

2023-08-04 Thread Andrew Cooper
On 04/08/2023 8:23 am, Jan Beulich wrote: > On 03.08.2023 22:36, Andrew Cooper wrote: >> The opensuse-tumbleweed build jobs currently fail with: >> >> /builds/xen-project/xen/stubdom/tpm_emulator-x86_64/crypto/rsa.c: In >> function 'rsa_private': >>

Re: [XEN PATCH] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Federico Serafini
On 04/08/23 11:05, Federico Serafini wrote: Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names used in function declarations and the ones used in the

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Julien Grall
Hi, On 04/08/2023 10:17, Juergen Gross wrote: On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 86cf8322b4..2662a3fa49 100644 --- a/tools/xenstore/xenstored_watch.c +++

Re: [PATCH v3 22/25] tools/xenstore: merge get_spec_node() into get_node_canonicalized()

2023-08-04 Thread Juergen Gross
On 03.08.23 23:36, Julien Grall wrote: Hi, On 24/07/2023 12:02, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 86cf8322b4..2662a3fa49 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstore/xenstored_watch.c @@ -166,19

[XEN PATCH] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-08-04 Thread Federico Serafini
Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names used in function declarations and the ones used in the corresponding function definitions, thus addressing

Re: [PATCH v2 1/2] docs: update hyperlaunch device tree

2023-08-04 Thread Julien Grall
Hi Daniel, On 03/08/2023 11:44, Daniel P. Smith wrote: +compatible + Identifies which hypervisors the configuration is compatible. Required. -hypervisor { -compatible = “hypervisor,xen” + Format: "hypervisor,", e.g "hypervisor,xen" I read "e.g" as "for example". You don't

[linux-linus test] 182138: regressions - FAIL

2023-08-04 Thread osstest service owner
flight 182138 linux-linus real [real] flight 182178 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182138/ http://logs.test-lab.xenproject.org/osstest/logs/182178/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[RFC PATCH 1/1] x86/traps: Get rid of exception handlers' second argument error code

2023-08-04 Thread Xin Li
The IDT event delivery of X86_TRAP_DF, X86_TRAP_TS, X86_TRAP_NP, X86_TRAP_SS, X86_TRAP_GP, X86_TRAP_AC and X86_TRAP_CP pushes an error code into the orig_ax member of the pt_regs structure, and the error code is passed as the second argument of their C-handlers, although the pt_regs structure is

[XEN PATCH v2 2/4] x86/mtrr: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
Rename variables to avoid shadowing and thus address MISRA C:2012 Rule 5.3: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope". The shadowing happens between the struct declaration 'mtrr_state' in 'xen/arch/x86/include/asm/mtrr.h' and local variable

[XEN PATCH v2 0/4] x86: address some violations of MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
Some variables are renamed or deleted in this series to avoid shadowing, which violates MISRA C:2012 Rule 5.3, whose headline is: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope". --- Changes in v2: - Addressed comments on patches 1 and 2. Patches

[XEN PATCH v2 4/4] x86/setup: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
The parameters renamed in the function declaration caused shadowing with the homonymous variable in 'xen/common/efi/boot.c'. Renaming them also addresses Rule 8.3: "All declarations of an object or function shall use the same names and type qualifiers". The local variable 'mask' is removed

[XEN PATCH v2 3/4] x86/irq: rename variable to address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
The extern variable 'irq_desc' defined in 'irq.h' is shadowed by local variables in the changed file. To avoid this, the variable is renamed to 'irq_description'. No functional change. Signed-off-by: Nicola Vetrini --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/include/asm/irq.h | 2

[XEN PATCH v2 1/4] x86/mce: address MISRA C:2012 Rule 5.3

2023-08-04 Thread Nicola Vetrini
Suitable mechanical renames are made to avoid shadowing the function identifier 'wait' declared in 'xen/include/xen/wait.h', thus addressing violations of MISRA C:2012 Rule 5.3: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope" The parameter name

Re: [XEN PATCH v2] xen/string: add missing parameter names

2023-08-04 Thread Jan Beulich
On 04.08.2023 09:55, Federico Serafini wrote: > On 03/08/23 21:26, Stefano Stabellini wrote: >> On Thu, 3 Aug 2023, Julien Grall wrote: >>> On 03/08/2023 12:52, Luca Fancellu wrote: > On 3 Aug 2023, at 12:46, Julien Grall wrote: > > Hi Luca, > > On 03/08/2023 11:28, Luca

Re: [XEN PATCH v2] xen/string: add missing parameter names

2023-08-04 Thread Federico Serafini
On 03/08/23 21:26, Stefano Stabellini wrote: On Thu, 3 Aug 2023, Julien Grall wrote: On 03/08/2023 12:52, Luca Fancellu wrote: On 3 Aug 2023, at 12:46, Julien Grall wrote: Hi Luca, On 03/08/2023 11:28, Luca Fancellu wrote: On 3 Aug 2023, at 09:26, Federico Serafini wrote: Add missing

Re: [PATCH] console: generalize the ability for domU access

2023-08-04 Thread Jan Beulich
On 03.08.2023 18:31, Daniel P. Smith wrote: > On 8/3/23 11:56, Jan Beulich wrote: >> On 03.08.2023 14:56, Daniel P. Smith wrote: >>> On 8/2/23 07:01, Jan Beulich wrote: On 01.08.2023 18:06, Daniel P. Smith wrote: > +{ > +for_each_domain(next) What

Re: [PATCH] docs/misra: add always_inline to C-language-toolchain

2023-08-04 Thread Jan Beulich
On 04.08.2023 03:34, Stefano Stabellini wrote: > --- a/docs/misra/C-language-toolchain.rst > +++ b/docs/misra/C-language-toolchain.rst > @@ -84,6 +84,8 @@ The table columns are as follows: >see Sections "6.48 Alternate Keywords" and "6.47.2.1 Volatile" of > GCC_MANUAL. >

Re: [PATCH] automation: add missing "needs"

2023-08-04 Thread Michal Orzel
On 04/08/2023 03:10, Stefano Stabellini wrote: > > > From: Stefano Stabellini > > The test artifacts export jobs don't need prerequisites, so we should > specify "needs" with an empty array for them. That way, they are not > going to fruitlessly wait for previous jobs (ECLAIR jobs) to

Re: [PATCH] subdom: Fix -Werror=address failure in tmp_emulator

2023-08-04 Thread Jan Beulich
On 03.08.2023 22:36, Andrew Cooper wrote: > The opensuse-tumbleweed build jobs currently fail with: > > /builds/xen-project/xen/stubdom/tpm_emulator-x86_64/crypto/rsa.c: In > function 'rsa_private': > /builds/xen-project/xen/stubdom/tpm_emulator-x86_64/crypto/rsa.c:56:7: > error: the

Re: [XEN PATCH 01/11] x86/efi: move variable declaration to address MISRA C:2012 Rule 2.1

2023-08-04 Thread Nicola Vetrini
On 03/08/2023 10:57, Jan Beulich wrote: On 03.08.2023 04:08, Stefano Stabellini wrote: On Wed, 2 Aug 2023, Nicola Vetrini wrote: The variable declaration is moved where it's actually used, rather than being declared in the switch before any clause, thus being classified as unreachable code.

Re: [XEN PATCH 02/11] x86: move declarations to address MISRA C:2012 Rule 2.1

2023-08-04 Thread Jan Beulich
On 03.08.2023 16:22, Nicola Vetrini wrote: > On 03/08/2023 11:01, Jan Beulich wrote: >> On 03.08.2023 04:13, Stefano Stabellini wrote: >>> On Wed, 2 Aug 2023, Nicola Vetrini wrote: @@ -1169,8 +1170,6 @@ static void cf_check irq_guest_eoi_timer_fn(void *data) switch (

Re: [PATCH v2 1/2] docs: update hyperlaunch device tree

2023-08-04 Thread Michal Orzel
Hi Daniel, On 03/08/2023 18:57, Daniel P. Smith wrote: > > > On 8/3/23 07:45, Michal Orzel wrote: >> Hi Daniel, >> >> On 03/08/2023 12:44, Daniel P. Smith wrote: >>> >>> >>> With on going development of hyperlaunch, changes to the device tree >>> definitions >>> has been necessary. This commit

Re: [PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-04 Thread Michal Orzel
On 03/08/2023 16:40, Luca Fancellu wrote: > > > Introduce Kconfig GICV2 to be able to compile the GICv2 driver only > when needed, the option is active by default. > > Introduce Kconfig VGICV2 that compiles the Generic Interrupt > Controller v2 emulation for domains, it is required only when

Re: [XEN PATCH 07/11] xen: address MISRA C:2012 Rule 2.1

2023-08-04 Thread Jan Beulich
On 04.08.2023 01:50, Stefano Stabellini wrote: > On Thu, 3 Aug 2023, Jan Beulich wrote: >> On 02.08.2023 16:38, Nicola Vetrini wrote: >>> Rule 2.1 states: "A project shall not contain unreachable code". >>> >>> The functions >>> - machine_halt >>> - maybe_reboot >>> - machine_restart >>> are not

[ovmf test] 182176: all pass - PUSHED

2023-08-04 Thread osstest service owner
flight 182176 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182176/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 01ad4134c3e6339ac53c85fccf62ed10d5b6d662 baseline version: ovmf

Re: [PATCH v4 0/8] annotate entry points with type and size

2023-08-04 Thread Jan Beulich
On 04.08.2023 08:24, Jan Beulich wrote: > The model introduced in patch 1 is now arch-agnostic, and all arch-es > are being switched at least partly (to at least give examples of how > things will look like); PPC and RISC-V are still small enough to switch > completely in one go. > > 1: common:

[PATCH v4 8/8] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions

2023-08-04 Thread Jan Beulich
Leverage the new infrastructure in xen/linkage.h to also switch to per- function sections (when configured), deriving the specific name from the "base" section in use at the time FUNC() is invoked. Signed-off-by: Jan Beulich --- TBD: Since we use .subsection in UNLIKELY_START(), a perhaps not

[PATCH v4 6/8] tools/binfile: switch to common annotations model

2023-08-04 Thread Jan Beulich
Use DATA() / END() and drop the now redundant .global. No change in generated data; of course the two symbols now properly gain "hidden" binding. Signed-off-by: Jan Beulich --- v3: New. --- a/xen/tools/binfile +++ b/xen/tools/binfile @@ -29,15 +29,10 @@ cat <$target .section

[PATCH v4 5/8] PPC: switch entry point annotations to common model

2023-08-04 Thread Jan Beulich
Use the generic framework in xen/linkage.h. No change in generated code except of course the converted symbol changes to be a hidden one. Signed-off-by: Jan Beulich --- v4: Also drop #undef-s from linker script. Re-base. v3: New. --- a/xen/arch/ppc/include/asm/asm-defns.h +++

[PATCH v4 5/8] RISC-V: annotate entry points with type and size

2023-08-04 Thread Jan Beulich
Use the generic framework in xen/linkage.h. No change in generated code except of course the converted symbols change to be hidden ones and gain a valid size. Signed-off-by: Jan Beulich --- Probably count_args_exp() should move to macros.h, but I first wanted to see whether anyone can suggest

[PATCH v4 4/8] Arm: annotate entry points with type and size

2023-08-04 Thread Jan Beulich
Use the generic framework in xen/linkage.h. No change in generated code except for the changed padding value (noticable when config.gz isn't a multiple of 4 in size). Plus of course the converted symbols change to be hidden ones. Note that ASM_INT() is switched to DATA(), not DATA_LOCAL(), as the

[PATCH v4 3/8] x86: also mark assembler globals hidden

2023-08-04 Thread Jan Beulich
Let's have assembler symbols be consistent with C ones. In principle there are (a few) cases where gas can produce smaller code this way, just that for now there's a gas bug causing smaller code to be emitted even when that shouldn't be the case. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau

[PATCH v4 2/8] x86: annotate entry points with type and size

2023-08-04 Thread Jan Beulich
Use the generic framework in xen/linkage.h. For switch_to_kernel() and restore_all_guest() so far implicit alignment (from being first in their respective sections) is being made explicit (as in: using FUNC() without 2nd argument). Whereas for {,compat}create_bounce_frame() and

  1   2   >