Re: [RFC PATCH 0/4] address MISRA C:2012 Rule 15.2

2023-11-21 Thread Nicola Vetrini
On 2023-11-07 11:33, Nicola Vetrini wrote: This series is aimed at presenting some strategies that can be used to deal with violations of Rule 15.2: "The goto statement shall jump to a label declared later in the same function". The rule's rationale is about possible developer confusion, ther

Re: [PATCH v10 13/17] vpci: add initial support for virtual PCI bus topology

2023-11-21 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:18PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Assign SBDF to the PCI devices being passed through with bus 0. > The resulting topology is where PCIe devices reside on the bus 0 of the > root complex itself (embedded endpoints). > This imple

Re: [PATCH v10 12/17] vpci/header: emulate PCI_COMMAND register for guests

2023-11-21 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:18PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Xen and/or Dom0 may have put values in PCI_COMMAND which they expect > to remain unaltered. PCI_COMMAND_SERR bit is a good example: while the > guest's view of this will want to be zero initiall

Re: [RFC PATCH 2/4] x86/dom0: make goto jump forward

2023-11-21 Thread Jan Beulich
On 07.11.2023 11:33, Nicola Vetrini wrote: > The jump to the label 'parse_error' becomes forward, rather > than backward; at the same time, the else branch can be eliminated. What "else branch" is this referring to? > This also fixes a violation of MISRA C:2012 Rule 15.2. > > Signed-off-by: Nico

Re: [RFC PATCH 1/4] xen/vsprintf: replace backwards jump with loop

2023-11-21 Thread Jan Beulich
On 07.11.2023 12:36, Andrew Cooper wrote: > On 07/11/2023 10:33 am, Nicola Vetrini wrote: >> The backwards goto in the vsnprintf function can be replaced >> with a loop, thereby fixing a violation of MISRA C:2012 Rule 15.2. >> >> Signed-off-by: Nicola Vetrini >> --- >> xen/common/vsprintf.c | 20

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

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

Re: [PATCH] x86/traps: More use of nocall

2023-11-21 Thread Andrew Cooper
On 21/11/2023 8:52 am, Jan Beulich wrote: > On 20.11.2023 20:45, Andrew Cooper wrote: >> sysenter_eflags_saved() and int80_direct_trap() are now only used by a single >> translation unit. Move the declarations into the respective traps.c, >> renaming >> int80_direct_trap() to entry_int80() to mat

Re: [PATCH 06/12] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-21 Thread David Woodhouse
On Tue, 2023-10-24 at 14:29 +0100, David Woodhouse wrote: > > > > As a general rule (I'll be doing a bombing run on xen-bus once I get my > > > patch queue down into single digits) we should never check 'if (*errp)' > > > to check if a function had an error. It should *also* return a success > > >

Re: [PATCH v10 11/17] vpci/header: program p2m with guest BAR view

2023-11-21 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:17PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Take into account guest's BAR view and program its p2m accordingly: > gfn is guest's view of the BAR and mfn is the physical BAR value. > This way hardware domain sees physical BAR values and gu

Re: [PATCH] x86/entry: Use 32bit XOR in handle_ist_exception

2023-11-21 Thread Andrew Cooper
On 21/11/2023 8:56 am, Jan Beulich wrote: > On 20.11.2023 20:57, Andrew Cooper wrote: >> This is a micro-optimsiation for Silvermont microarchitectures, which don't >> recognise the 64bit form as a zeroing idiom. >> >> No functional change. >> >> Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beu

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread David Woodhouse
On Tue, 2023-11-21 at 14:58 +0400, Marc-André Lureau wrote: > > > Consistent with the rest of the lines (no conditional compilation nor > > driver #define..) > > Reviewed-by: Marc-André Lureau Thanks. > > btw, while quickly testing this (do we have any test for xen-console?): > > > > $ qemu --

[PATCH v2 5/5] tools/xenstored: remove "-N" command line option

2023-11-21 Thread Juergen Gross
The "-N" (do not daemonize) command line option is of questionable use: its sole purpose seems to be to aid debugging of xenstored by making it easier to start xenstored under gdb, or to see any debug messages easily. Debug messages can as well be sent to syslog(), while gdb can be attached to the

[PATCH v2 3/5] tools/xenstored: remove the "-P" command line option

2023-11-21 Thread Juergen Gross
The "-P" command line option just results in printing the PID of the xenstored daemon to stdout before stdout is being closed. The same information can be retrieved from the PID file via the "-F" option. Remove the redundant "-P" option. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --

[PATCH v2 4/5] tools/xenstored: remove the "-R" command line option

2023-11-21 Thread Juergen Gross
The "-R" (no recovery) command line option enables to omit fixing the node store in case of detected inconsistencies. This might have been of interest in the past, when the node data base was kept in a file, but now the usability of this option is zero. Remove the "-R" option. Signed-off-by: Jue

[PATCH v2 1/5] tools/xenstored: remove "-D" command line parameter

2023-11-21 Thread Juergen Gross
Remove the "-D" command parameter, which is disabling initialization of the mandatory domain data handling. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/core.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/xenstored/core.c b/t

[PATCH v2 2/5] tools/xenstored: remove "-V" command line option

2023-11-21 Thread Juergen Gross
The "-V" (verbose) command line option is nearly completely redundant with "io" tracing. Just the time of the printed data is a little bit different, while the tracing is more informative. Remove the verbose option. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstored/cor

[PATCH v2 0/5] tools/xenstored: remove some command line options

2023-11-21 Thread Juergen Gross
Remove some command line options which have no real use case. Changes in V2: - moved removal of "-N" into last patch of the series, as this is the only option which seems to have a use case (OTOH using it has some downsides as well). Juergen Gross (5): tools/xenstored: remove "-D" command l

Re: [PATCH 2/5] tools/xenstored: remove "-V" command line option

2023-11-21 Thread Juergen Gross
On 14.11.23 22:01, Julien Grall wrote: Hi Juergen, On 13/11/2023 12:43, Juergen Gross wrote: The "-V" (verbose) command line option is nearly completely redundant with "io" tracing. Just the time of the printed data is a little bit different, while the tracing is more informative. The current

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Paul Durrant
On 15/11/2023 17:24, David Woodhouse wrote: From: David Woodhouse If a Xen console is configured on the command line, do not add a default serial port. Signed-off-by: David Woodhouse --- system/vl.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Paul Durrant

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Marc-André Lureau
Hi On Tue, Nov 21, 2023 at 2:57 PM Marc-André Lureau wrote: > > Hi > > On Wed, Nov 15, 2023 at 9:28 PM David Woodhouse wrote: > > > > From: David Woodhouse > > > > If a Xen console is configured on the command line, do not add a default > > serial port. > > > > Signed-off-by: David Woodhouse >

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Marc-André Lureau
Hi On Wed, Nov 15, 2023 at 9:28 PM David Woodhouse wrote: > > From: David Woodhouse > > If a Xen console is configured on the command line, do not add a default > serial port. > > Signed-off-by: David Woodhouse > --- > system/vl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/system

[linux-5.4 test] 183803: tolerable FAIL - PUSHED

2023-11-21 Thread osstest service owner
flight 183803 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/183803/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-credit1 14 guest-start fail in 183797 pass in 183803 test-amd64-i386-xl-qemuu-debianhvm-

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-21 Thread Nicola Vetrini
On 2023-11-21 11:18, Jan Beulich wrote: On 21.11.2023 10:46, Nicola Vetrini wrote: On 2023-11-21 10:16, Jan Beulich wrote: On 16.11.2023 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of unif

xen | Successful pipeline for staging | a1f9490c

2023-11-21 Thread GitLab
Pipeline #1079835976 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: a1f9490c ( https://gitlab.com/xen-project/xen/-/commit/a1f9490cccb7bda80d736cd439be4611286d2042 ) Commit Message: docs/misra: e

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-21 Thread Jan Beulich
On 21.11.2023 10:46, Nicola Vetrini wrote: > On 2023-11-21 10:16, Jan Beulich wrote: >> On 16.11.2023 10:08, Nicola Vetrini wrote: >>> The comment-based justifications for MISRA C:2012 Rule 8.4 are >>> replaced >>> by the asmlinkage pseudo-attribute, for the sake of uniformity. >>> >>> Add missing

[PATCH v3 5/5] Mini-OS: fix 9pfs response receiving

2023-11-21 Thread Juergen Gross
When copying a 9pfs response chunk from the ring buffer across the ring end, the local ring pointer and length field are not updated correctly. Fix that. Fixes: 0924fec1de58 ("Mini-OS: add 9pfs transport layer") Signed-off-by: Juergen Gross --- V2: - new patch --- 9pfront.c | 4 +++- 1 file chan

[PATCH v3 3/5] Mini-OS: don't crash if no shutdown node is available

2023-11-21 Thread Juergen Gross
It might be perfectly fine not to have a control/shutdown Xenstore node. If this is the case, don't crash, but just terminate the shutdown thread after issuing a message that shutdown isn't available. In fini_shutdown() clearing the watch can result in an error now, in case the early exit above wa

[PATCH v3 4/5] Mini-OS: fix 9pfs stat receive format

2023-11-21 Thread Juergen Gross
The format string of the received data for the 9pfs stat command is missing the initial 2 byte total length specifier. Add it. Fixes: 2d1dfccd3aa3 ("Mini-OS: add read and write support to 9pfsfront") Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- 9pfront.c | 9 + 1 file cha

[PATCH v3 2/5] Mini-OS: get own domid

2023-11-21 Thread Juergen Gross
Get the own domid via creation of a temporary event channel. There is no "official" way to read the own domid in PV guests, so use the event channel interface to get it: - allocate an unbound event channel specifying DOMID_SELF for the other end - read the event channel status which will contai

[PATCH v3 0/5] Mini-OS: preparations for 9pfs in xenstore-stubdom

2023-11-21 Thread Juergen Gross
This small patch series is doing some preparations for being able to use 9pfs in Xenstore-stubdom. Changes in V2: - added patches 2 and 5 Changes in V3: - rename function to get own domid (patch 2) Juergen Gross (5): Mini-OS: make xenstore_buf externally visible Mini-OS: get own domid Mini

[PATCH v3 1/5] Mini-OS: make xenstore_buf externally visible

2023-11-21 Thread Juergen Gross
For support of the 9pfs frontend in Xenstore-stubdom xenstore_buf needs to be externally visible. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- include/xenbus.h | 2 ++ xenbus.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/xenbus.h b/includ

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-21 Thread Nicola Vetrini
On 2023-11-21 10:16, Jan Beulich wrote: On 16.11.2023 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. Add missing 'xen/compiler.h' #include-s where needed. The text in docs/mis

[PATCH 0/3] xen/arm64: head: misc cleanup

2023-11-21 Thread Michal Orzel
Some cleanup and improvements for the assembly boot code to make the behavior more consistent between arm32 and arm64. Michal Orzel (3): xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str xen/arm64: Move print_reg macro to asm/arm64/macros.h xen/arm64/mmu: head: Replace load_paddr

[PATCH 1/3] xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str

2023-11-21 Thread Michal Orzel
At the moment, the 'hex' string is placed right after the 'putn' function in the .text section. This is because of the limited range (+/- 1MB) of PC relative 'adr' instruction 'putn' uses. Modify it to use 'adr_l' instead (range extended to +/- 4GB) and move the string to .rodata.str. This way all

[PATCH 3/3] xen/arm64/mmu: head: Replace load_paddr with adr_l where appropriate

2023-11-21 Thread Michal Orzel
Macros load_paddr and adr_l are equivalent when used before the MMU is enabled, resulting in obtaining physical address of a symbol. The former requires to know the physical offset (PA - VA) and can be used both before and after the MMU is enabled. In the spirit of using something only when truly n

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

2023-11-21 Thread Michal Orzel
Macro print_reg is used to print a value of a register passed as an argument. While today it is only used from within the common head.S, in the future we might want to make use of it from other files, just like PRINT(). It also serves as a great aid when debugging. Expose print_reg macro by moving

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

2023-11-21 Thread Jan Beulich
On 01.11.2023 10:30, Nicola Vetrini wrote: > 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 al

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-21 Thread Jan Beulich
On 16.11.2023 10:08, Nicola Vetrini wrote: > The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced > by the asmlinkage pseudo-attribute, for the sake of uniformity. > > Add missing 'xen/compiler.h' #include-s where needed. > > The text in docs/misra/deviations.rst and docs/misra

Re: Interest in Release Manager Role

2023-11-21 Thread Oleksii
Hello Henry and Kelly, On Tue, 2023-11-21 at 01:48 +, Henry Wang wrote: > Hi Oleksii, > > > On Nov 20, 2023, at 22:06, Oleksii > > wrote: > > > > Dear Xen Community, > > > > I am keen on stepping into the role of a Release Manager for our > > next > > release. > > Thanks for the email! Th

Re: [PATCH] x86/entry: Use 32bit XOR in handle_ist_exception

2023-11-21 Thread Jan Beulich
On 20.11.2023 20:57, Andrew Cooper wrote: > This is a micro-optimsiation for Silvermont microarchitectures, which don't > recognise the 64bit form as a zeroing idiom. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich For my education, ... > --- a/xen/arch/x8

Re: [PATCH] x86/traps: More use of nocall

2023-11-21 Thread Jan Beulich
On 20.11.2023 20:45, Andrew Cooper wrote: > sysenter_eflags_saved() and int80_direct_trap() are now only used by a single > translation unit. Move the declarations into the respective traps.c, renaming > int80_direct_trap() to entry_int80() to match the style elsewhere. > > Annotate all 3 with no

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

2023-11-21 Thread Jan Beulich
On 01.11.2023 10:30, Nicola Vetrini wrote: > 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

Re: [PATCH 3/6] xen/efi: Make efi-boot.h compile with -Wwrite-strings

2023-11-21 Thread Jan Beulich
On 20.11.2023 23:49, Andrew Cooper wrote: > GCC complains: > > In file included from arch/arm/efi/boot.c:700: > arch/arm/efi/efi-boot.h: In function 'efi_arch_handle_cmdline': > arch/arm/efi/efi-boot.h:482:16: error: assignment discards 'const' > qualifier from pointer target type [-Werror=

Re: [PATCH 2/6] x86/setup: Rework cmdline_cook() to be compatible with -Wwrite-strings

2023-11-21 Thread Jan Beulich
On 20.11.2023 23:49, Andrew Cooper wrote: > Constify both cmdline variables in create_dom0() and __start_xen(). > Initialise Xen's variable to the empty string to simplify the parsing logic. > > Update cmdline_cook() to take and return const pointers, changing it to have > an early exit for a NULL

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-21 Thread Nicola Vetrini
On 2023-11-20 11:27, Julien Grall wrote: Hi Nicola, On 20/11/2023 08:39, Nicola Vetrini wrote: On 2023-11-17 20:15, Julien Grall wrote: Hi Nicola, On 16/11/2023 09:15, Nicola Vetrini wrote: On 2023-11-16 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4

Re: Remaining violations of MISRA Rule 7.4

2023-11-21 Thread Nicola Vetrini
On 2023-11-21 00:08, Andrew Cooper wrote: On 20/11/2023 4:40 pm, Nicola Vetrini wrote: I've just rebased and pushed the residual from the past work (although I missed the ARM EFI fix.) https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=commitdiff;h=0f06bab762f5201f3e00aaaee704c3c01f

<    1   2