Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Jan Beulich
On 29.07.2024 20:36, Julien Grall wrote: > On 29/07/2024 15:24, Stewart Hildebrand wrote: >> Use the -finstrument-functions option to check that the stack pointer is > > Is the feature supported by both clang and GCC? If so, which from versions? > > From README, this is what we currently support

Re: [PATCH] tools/xl: add suspend-to-ram and resume subcommands

2024-07-29 Thread Jan Beulich
On 30.07.2024 00:31, zithro wrote: > Added my S-o-B (no other change). > > PS: re-sent to account for Anthony mail address change > > On 29 Feb 2024 08:00, zithro / Cyril Rébert wrote: >> The xl command doesn't provide suspend/resume, so add them : >>xl suspend-to-ram >>xl resume >> >>

Re: [PATCH 1/3] xen: add no_instrument_function attributes

2024-07-29 Thread Jan Beulich
On 29.07.2024 20:56, Stewart Hildebrand wrote: > On 7/29/24 10:55, Jan Beulich wrote: >> On 29.07.2024 16:24, Stewart Hildebrand wrote: >>> In preparation for using -finstrument-functions option, we need to tag a >>> few functions that don't work well with such instrumentation. If we >>> don't inte

[KEXEC] Lacking documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on linux host

2024-07-29 Thread A Kundu
I am experiencing issues using kexec to load Xen 4.19-rc4 and 4.20-dev on a debian host. The current documentation at https://xenbits.xenproject.org/docs/4.19-testing/misc/kexec_and_kdump.txt appears to be missing crucial details on properly using kexec with the --vmm option for loading Xen. kex

Missing documentation and kexec failure with Xen 4.19-rc4 and 4.20-dev on Linux host

2024-07-29 Thread A Kundu
[I'm not subscribed to xen-devel@, so please cc me in replies.] I am experiencing issues using kexec to load Xen 4.19-rc4 and 4.20-dev. The current documentation at https://xenbits.xenproject.org/docs/4.19-testing/misc/kexec_and_kdump.txt appears to be missing crucial details on properly using ke

[ovmf test] 187049: all pass - PUSHED

2024-07-29 Thread osstest service owner
flight 187049 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187049/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 84fc1ec52fc0f650187359bb081ee5a9400d9675 baseline version: ovmf 909abd7104b87986ad22e

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

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

[xen-4.19-testing test] 187044: tolerable FAIL - PUSHED

2024-07-29 Thread osstest service owner
flight 187044 xen-4.19-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/187044/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds 8 xen-boot fail REGR. vs. 186982 Tests which did not suc

[ovmf test] 187047: all pass - PUSHED

2024-07-29 Thread osstest service owner
flight 187047 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187047/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 909abd7104b87986ad22e92b4cb07d30a8cca11b baseline version: ovmf be1d408773504df8b95a2

Re: [PATCH] tools/xl: add suspend-to-ram and resume subcommands

2024-07-29 Thread zithro
Added my S-o-B (no other change). PS: re-sent to account for Anthony mail address change On 29 Feb 2024 08:00, zithro / Cyril Rébert wrote: The xl command doesn't provide suspend/resume, so add them : xl suspend-to-ram xl resume This patch follows a discussion on XenDevel: when you wan

Re: [PATCH] tools/xl: add suspend-to-ram and resume subcommands

2024-07-29 Thread zithro
Added my S-o-B (no other change). On 29 Feb 2024 08:00, zithro / Cyril Rébert wrote: The xl command doesn't provide suspend/resume, so add them : xl suspend-to-ram xl resume This patch follows a discussion on XenDevel: when you want the virtualized equivalent of "sleep"-ing a host, it's

Re: [XEN PATCH v5 7/8] x86/mm: add defensive return

2024-07-29 Thread Stefano Stabellini
On Mon, 29 Jul 2024, Federico Serafini wrote: > Add defensive return statement at the end of an unreachable > default case. Other than improve safety, this meets the requirements > to deviate a violation of MISRA C Rule 16.3: "An unconditional `break' > statement shall terminate every switch-clause

Re: [PATCH v2] x86/shutdown: change default reboot method preference

2024-07-29 Thread Marek Marczykowski-Górecki
On Fri, Sep 15, 2023 at 09:43:47AM +0200, Roger Pau Monne wrote: > The current logic to chose the preferred reboot method is based on the mode > Xen > has been booted into, so if the box is booted from UEFI, the preferred reboot > method will be to use the ResetSystem() run time service call. > >

Re: [PATCH v1] automation: add x86_64 xilinx smoke test

2024-07-29 Thread Stefano Stabellini
On Fri, 26 Jul 2024, victorm.l...@amd.com wrote: > From: Victor Lira > > Add a test script and related job for running x86_64 dom0 tests. > > Signed-off-by: Victor Lira Looks great! Reviewed-by: Stefano Stabellini > --- > Cc: Stefano Stabellini > Cc: Doug Goldstein > --- > automation/gi

Re: [PATCH 0/3] Stack checking on Arm

2024-07-29 Thread Stefano Stabellini
On Mon, 29 Jul 2024, Julien Grall wrote: > Hi, > > On 29/07/2024 15:24, Stewart Hildebrand wrote: > > This series introduces stack check instrumentation on Arm. This is > > helpful for safety certification efforts. I'm sending this in an RFC > > state because I wanted to gather opinions on the app

[linux-linus test] 187041: regressions - FAIL

2024-07-29 Thread osstest service owner
flight 187041 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/187041/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 186827 test-arm64-arm64-xl

Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Julien Grall
Hi, On 29/07/2024 20:40, Stewart Hildebrand wrote: On 7/29/24 14:50, Julien Grall wrote: Hi again, On 29/07/2024 15:24, Stewart Hildebrand wrote: diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index aac6c599f878..b4890eec7ec4 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/trap

Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Stewart Hildebrand
On 7/29/24 14:50, Julien Grall wrote: > Hi again, > > On 29/07/2024 15:24, Stewart Hildebrand wrote: >> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c >> index aac6c599f878..b4890eec7ec4 100644 >> --- a/xen/arch/arm/traps.c >> +++ b/xen/arch/arm/traps.c >> @@ -2325,6 +2325,51 @@ void asm

Re: [PATCH 2/3] xen: silence maybe-unitialized warning

2024-07-29 Thread Stewart Hildebrand
On 7/29/24 11:03, Jürgen Groß wrote: > On 29.07.24 16:24, Stewart Hildebrand wrote: >> When building with gcc with -finstrument-functions, optimization level >> -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the >> the following build warning (error) is encountered: >> >> common

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

2024-07-29 Thread osstest service owner
flight 187043 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/187043/ 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 1/3] xen: add no_instrument_function attributes

2024-07-29 Thread Stewart Hildebrand
On 7/29/24 10:55, Jan Beulich wrote: > On 29.07.2024 16:24, Stewart Hildebrand wrote: >> In preparation for using -finstrument-functions option, we need to tag a >> few functions that don't work well with such instrumentation. If we >> don't intervene, we would end up with linker errors such as und

Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Julien Grall
Hi again, On 29/07/2024 15:24, Stewart Hildebrand wrote: Use the -finstrument-functions option to check that the stack pointer is valid upon each function entry. Only enable it for debug builds due to the overhead introduced. Use per-cpu variables to store the stack base and nesting level. The

Re: [PATCH 0/3] Stack checking on Arm

2024-07-29 Thread Julien Grall
On 29/07/2024 19:39, Julien Grall wrote: Hi, On 29/07/2024 15:24, Stewart Hildebrand wrote: This series introduces stack check instrumentation on Arm. This is helpful for safety certification efforts. I'm sending this in an RFC state because I wanted to gather opinions on the approach of usi

Re: [PATCH 0/3] Stack checking on Arm

2024-07-29 Thread Julien Grall
Hi, On 29/07/2024 15:24, Stewart Hildebrand wrote: This series introduces stack check instrumentation on Arm. This is helpful for safety certification efforts. I'm sending this in an RFC state because I wanted to gather opinions on the approach of using -finstrument-functions. This looks ok fo

Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Julien Grall
Hi Stewart, On 29/07/2024 15:24, Stewart Hildebrand wrote: Use the -finstrument-functions option to check that the stack pointer is Is the feature supported by both clang and GCC? If so, which from versions? From README, this is what we currently support. - For ARM 32-bit: - GC

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Andrew Cooper
On 29/07/2024 5:18 pm, Roger Pau Monné wrote: > On Mon, Jul 29, 2024 at 04:52:22PM +0100, Andrew Cooper wrote: >> On 29/07/2024 12:53 pm, Jan Beulich wrote: >>> On 26.07.2024 17:21, Roger Pau Monne wrote: The PVH dom0 builder doesn't switch page tables and has no need to run with SMAP dis

[ovmf test] 187042: all pass - PUSHED

2024-07-29 Thread osstest service owner
flight 187042 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187042/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf be1d408773504df8b95a2a81be7b558276ba5356 baseline version: ovmf 43e2395c1b13054082095

Re: [PATCH v11 4/5] xen/riscv: enable GENERIC_BUG_FRAME

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 15:00 +0200, Jan Beulich wrote: > On 24.07.2024 17:31, Oleksii Kurochko wrote: > > To have working BUG(), WARN(), ASSERT, run_in_exception_handler() > > it is needed to enable GENERIC_BUG_FRAME. > > > > ebreak is used as BUG_insn so when macros from are > > used, an exceptio

Re: [PATCH v3 6/9] xen/riscv: introduce functionality to work with cpu info

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 17:28 +0200, Jan Beulich wrote: > On 24.07.2024 17:31, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/include/asm/processor.h > > +++ b/xen/arch/riscv/include/asm/processor.h > > @@ -12,8 +12,39 @@ > >   > >  #ifndef __ASSEMBLY__ > >   > > -/* TODO: need to be implemeted */

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 04:59:09PM +0100, Andrew Cooper wrote: > On 26/07/2024 4:21 pm, Roger Pau Monne wrote: > > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c > > index eee20bb1753c..bc387d96b519 100644 > > --- a/xen/arch/x86/setup.c > > +++ b/xen/arch/x86/setup.c > > @@ -955,26 +955,9

Re: [RFC XEN PATCH v12 6/7] tools: Add new function to get gsi from dev

2024-07-29 Thread Anthony PERARD
On Tue, Jul 09, 2024 at 03:35:57AM +, Chen, Jiqian wrote: > On 2024/7/8 21:27, Anthony PERARD wrote: > > You could reuse the already opened fd from libxencall: > > xencall_fd(xch->xcall) > Do I need to check it this fd<0? No, it should be good to use. Cheers, -- Anthony Perard | Vates

[PATCH] XSM/domctl: Fix permission checks on XEN_DOMCTL_createdomain

2024-07-29 Thread Andrew Cooper
The XSM checks for XEN_DOMCTL_createdomain are problematic. There's a split between xsm_domctl() called early, and flask_domain_create() called quite late during domain construction. All XSM implementations except Flask have a simple IS_PRIV check in xsm_domctl(), and operate as expected when an

Re: [PATCH v3 5/9] xen/riscv: introduce asm/pmap.h header

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 16:29 +0200, Jan Beulich wrote: > On 24.07.2024 17:31, Oleksii Kurochko wrote: > > Introduces arch_pmap_{un}map functions and select HAS_PMAP > > for CONFIG_RISCV. > > > > Additionaly it was necessary to introduce functions: > >  - mfn_from_xen_entry > >  - mfn_to_pte > > >

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 04:52:22PM +0100, Andrew Cooper wrote: > On 29/07/2024 12:53 pm, Jan Beulich wrote: > > On 26.07.2024 17:21, Roger Pau Monne wrote: > >> The PVH dom0 builder doesn't switch page tables and has no need to run with > >> SMAP disabled. > >> > >> Put the SMAP disabling close to

Re: [PATCH v3 4/9] xen/riscv: setup fixmap mapping

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 15:35 +0200, Jan Beulich wrote: > On 24.07.2024 17:31, Oleksii Kurochko wrote: > > Introduce a function to set up fixmap mappings and L0 page > > table for fixmap. > > > > Additionally, defines were introduced in riscv/config.h to > > calculate the FIXMAP_BASE address. > > Th

Re: [XEN PATCH v6] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Anthony PERARD
On Mon, Jul 29, 2024 at 04:02:41PM +0100, Matthew Barnes wrote: > diff --git a/tools/xcutils/lsevtchn.c b/tools/xcutils/lsevtchn.c > index d1710613ddc5..29504c9d2077 100644 > --- a/tools/xcutils/lsevtchn.c > +++ b/tools/xcutils/lsevtchn.c > @@ -24,7 +25,28 @@ int main(int argc, char **argv) >

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Andrew Cooper
On 26/07/2024 4:21 pm, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c > index eee20bb1753c..bc387d96b519 100644 > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -955,26 +955,9 @@ static struct domain *__init create_dom0(const module_t > *image, >

Re: [PATCH v3 7/9] xen/riscv: introduce and init SBI RFENCE extension

2024-07-29 Thread Jan Beulich
On 24.07.2024 17:31, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/sbi.h > +++ b/xen/arch/riscv/include/asm/sbi.h > @@ -14,6 +14,38 @@ > > #define SBI_EXT_0_1_CONSOLE_PUTCHAR 0x1 > > +#define SBI_EXT_BASE0x10 > +#define SBI_EXT_RFENCE

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Andrew Cooper
On 29/07/2024 12:53 pm, Jan Beulich wrote: > On 26.07.2024 17:21, Roger Pau Monne wrote: >> The PVH dom0 builder doesn't switch page tables and has no need to run with >> SMAP disabled. >> >> Put the SMAP disabling close to the code region where it's necessary, as it >> then becomes obvious why swi

Re: [PATCH 22/22] x86/mm: zero stack on stack switch or reset

2024-07-29 Thread Andrew Cooper
On 26/07/2024 4:22 pm, Roger Pau Monne wrote: > With the stack mapped on a per-CPU basis there's no risk of other CPUs being > able to read the stack contents, but vCPUs running on the current pCPU could > read stack rubble from operations of previous vCPUs. > > The #DF stack is not zeroed because

Re: [PATCH v3 6/9] xen/riscv: introduce functionality to work with cpu info

2024-07-29 Thread Jan Beulich
On 24.07.2024 17:31, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/processor.h > +++ b/xen/arch/riscv/include/asm/processor.h > @@ -12,8 +12,39 @@ > > #ifndef __ASSEMBLY__ > > -/* TODO: need to be implemeted */ > -#define smp_processor_id() 0 > +#include > +#include > + > +regis

[PATCH v5] libxl: Enable stubdom cdrom changing

2024-07-29 Thread Jason Andryuk
To change the cd-rom medium, libxl will: - QMP eject the medium from QEMU - block-detach the old PV disk - block-attach the new PV disk - QMP change the medium to the new PV disk by fdset-id The QMP code is reused, and remove and attach are implemented here. The stubdom must internally handle

Re: [PATCH 2/3] xen: silence maybe-unitialized warning

2024-07-29 Thread Jürgen Groß
On 29.07.24 16:24, Stewart Hildebrand wrote: When building with gcc with -finstrument-functions, optimization level -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the the following build warning (error) is encountered: common/sched/cpupool.c: In function ‘cpupool_gran_write’:

Re: [PATCH v4] libxl: Enable stubdom cdrom changing

2024-07-29 Thread Jason Andryuk
On Mon, Jul 29, 2024 at 10:32 AM Anthony PERARD wrote: > > On Sun, Jul 28, 2024 at 05:08:56PM -0400, Jason Andryuk wrote: > > +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, > > + libxl__ev_qmp *qmp, > > +

[XEN PATCH v6] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Matthew Barnes
Currently, lsevtchn aborts its event channel enumeration when it hits an event channel that is owned by Xen. lsevtchn does not distinguish between different hypercall errors, which results in lsevtchn missing potential relevant event channels with higher port numbers. Use the errno macro to disti

Re: [PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Jan Beulich
On 29.07.2024 16:24, Stewart Hildebrand wrote: > RFC: Should we put this under its own config option instead of reusing > CONFIG_DEBUG? I'd say yes, with it merely defaulting to DEBUG. And then have this in generic code rather than ... > --- a/xen/arch/arm/arch.mk > +++ b/xen/arch/arm/arch.m

Re: [PATCH 1/3] xen: add no_instrument_function attributes

2024-07-29 Thread Jan Beulich
On 29.07.2024 16:24, Stewart Hildebrand wrote: > In preparation for using -finstrument-functions option, we need to tag a > few functions that don't work well with such instrumentation. If we > don't intervene, we would end up with linker errors such as undefined > reference to __bad_cmpxchg. I ca

Re: [XEN PATCH v5] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Jan Beulich
On 29.07.2024 16:34, Matthew Barnes wrote: > @@ -58,7 +80,8 @@ int main(int argc, char **argv) > printf("\n"); > } > > +out: Sorry didn't pay attention here (and can likely be taken care of when committing, unless other comments arise): Labels want to be indented by at least one bl

[XEN PATCH v5] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Matthew Barnes
Currently, lsevtchn aborts its event channel enumeration when it hits an event channel that is owned by Xen. lsevtchn does not distinguish between different hypercall errors, which results in lsevtchn missing potential relevant event channels with higher port numbers. Use the errno macro to disti

Re: [PATCH v4] libxl: Enable stubdom cdrom changing

2024-07-29 Thread Anthony PERARD
On Sun, Jul 28, 2024 at 05:08:56PM -0400, Jason Andryuk wrote: > +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, > + libxl__ev_qmp *qmp, > + const libxl__json_object > *response, > +

Re: [PATCH v3 5/9] xen/riscv: introduce asm/pmap.h header

2024-07-29 Thread Jan Beulich
On 24.07.2024 17:31, Oleksii Kurochko wrote: > Introduces arch_pmap_{un}map functions and select HAS_PMAP > for CONFIG_RISCV. > > Additionaly it was necessary to introduce functions: > - mfn_from_xen_entry > - mfn_to_pte > > Also flush_xen_tlb_range_va_local() and flush_xen_tlb_one_local() > ar

[PATCH 3/3] xen/arm: stack check instrumentation

2024-07-29 Thread Stewart Hildebrand
Use the -finstrument-functions option to check that the stack pointer is valid upon each function entry. Only enable it for debug builds due to the overhead introduced. Use per-cpu variables to store the stack base and nesting level. The nesting level is used to avoid invoking __cyg_profile_func_e

[PATCH 2/3] xen: silence maybe-unitialized warning

2024-07-29 Thread Stewart Hildebrand
When building with gcc with -finstrument-functions, optimization level -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the the following build warning (error) is encountered: common/sched/cpupool.c: In function ‘cpupool_gran_write’: common/sched/cpupool.c:1220:26: error: ‘gran’

[PATCH 0/3] Stack checking on Arm

2024-07-29 Thread Stewart Hildebrand
This series introduces stack check instrumentation on Arm. This is helpful for safety certification efforts. I'm sending this in an RFC state because I wanted to gather opinions on the approach of using -finstrument-functions. Stewart Hildebrand (3): xen: add no_instrument_function attributes

[PATCH 1/3] xen: add no_instrument_function attributes

2024-07-29 Thread Stewart Hildebrand
In preparation for using -finstrument-functions option, we need to tag a few functions that don't work well with such instrumentation. If we don't intervene, we would end up with linker errors such as undefined reference to __bad_cmpxchg. Signed-off-by: Stewart Hildebrand --- xen/arch/arm/includ

Re: [PATCH 08/22] x86/mm: avoid passing a domain parameter to L4 init function

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 02:36:39PM +0100, Alejandro Vallejo wrote: > On Fri Jul 26, 2024 at 4:21 PM BST, Roger Pau Monne wrote: > > In preparation for the function being called from contexts where no domain > > is > > present. > > > > No functional change intended. > > > > Signed-off-by: Roger Pau

Re: [XEN PATCH v4] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Matthew Barnes
On Mon, Jul 29, 2024 at 09:58:46AM +0200, Jan Beulich wrote: > On 26.07.2024 18:40, Matthew Barnes wrote: > > @@ -24,7 +25,23 @@ int main(int argc, char **argv) > > status.port = port; > > rc = xc_evtchn_status(xch, &status); > > if ( rc < 0 ) > > -break; > >

[linux-linus test] 187039: regressions - FAIL

2024-07-29 Thread osstest service owner
flight 187039 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/187039/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 186827 test-arm64-arm64-xl

Re: [PATCH 08/22] x86/mm: avoid passing a domain parameter to L4 init function

2024-07-29 Thread Jan Beulich
On 29.07.2024 15:36, Alejandro Vallejo wrote: > On Fri Jul 26, 2024 at 4:21 PM BST, Roger Pau Monne wrote: >> --- a/xen/arch/x86/mm/hap/hap.c >> +++ b/xen/arch/x86/mm/hap/hap.c >> @@ -402,7 +402,8 @@ static mfn_t hap_make_monitor_table(struct vcpu *v) >> m4mfn = page_to_mfn(pg); >> l4e =

Re: [PATCH 08/22] x86/mm: avoid passing a domain parameter to L4 init function

2024-07-29 Thread Alejandro Vallejo
On Fri Jul 26, 2024 at 4:21 PM BST, Roger Pau Monne wrote: > In preparation for the function being called from contexts where no domain is > present. > > No functional change intended. > > Signed-off-by: Roger Pau Monné > --- > xen/arch/x86/include/asm/mm.h | 4 +++- > xen/arch/x86/mm.c

Re: [PATCH v3 4/9] xen/riscv: setup fixmap mapping

2024-07-29 Thread Jan Beulich
On 24.07.2024 17:31, Oleksii Kurochko wrote: > Introduce a function to set up fixmap mappings and L0 page > table for fixmap. > > Additionally, defines were introduced in riscv/config.h to > calculate the FIXMAP_BASE address. > This involved introducing BOOT_FDT_VIRT_{START, SIZE} and > XEN_VIRT_S

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Jan Beulich
On 29.07.2024 14:47, Roger Pau Monné wrote: > On Mon, Jul 29, 2024 at 02:41:23PM +0200, Jan Beulich wrote: >> On 29.07.2024 14:00, Roger Pau Monné wrote: >>> On Mon, Jul 29, 2024 at 12:47:09PM +0200, Jan Beulich wrote: On 29.07.2024 12:30, Roger Pau Monne wrote: > --- a/xen/arch/x86/includ

Re: [PATCH v11 4/5] xen/riscv: enable GENERIC_BUG_FRAME

2024-07-29 Thread Jan Beulich
On 24.07.2024 17:31, Oleksii Kurochko wrote: > To have working BUG(), WARN(), ASSERT, run_in_exception_handler() > it is needed to enable GENERIC_BUG_FRAME. > > ebreak is used as BUG_insn so when macros from are > used, an exception with BREAKPOINT cause will be generated. > > ebreak triggers a

Re: [PATCH 01/22] x86/mm: drop l{1,2,3,4}e_write_atomic()

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 09:52:50AM +0200, Jan Beulich wrote: > On 26.07.2024 17:21, Roger Pau Monne wrote: > > The l{1,2,3,4}e_write_atomic() and non _atomic suffixed helpers share the > > same > > implementation, so it seems pointless and possibly confusing to have both. > > > > Remove the l{1,2

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 02:41:23PM +0200, Jan Beulich wrote: > On 29.07.2024 14:00, Roger Pau Monné wrote: > > On Mon, Jul 29, 2024 at 12:47:09PM +0200, Jan Beulich wrote: > >> On 29.07.2024 12:30, Roger Pau Monne wrote: > >>> --- a/xen/arch/x86/include/asm/alternative.h > >>> +++ b/xen/arch/x86/in

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Jan Beulich
On 29.07.2024 14:00, Roger Pau Monné wrote: > On Mon, Jul 29, 2024 at 12:47:09PM +0200, Jan Beulich wrote: >> On 29.07.2024 12:30, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/include/asm/alternative.h >>> +++ b/xen/arch/x86/include/asm/alternative.h >>> @@ -183,13 +183,13 @@ extern void alternati

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 12:47:09PM +0200, Jan Beulich wrote: > On 29.07.2024 12:30, Roger Pau Monne wrote: > > --- a/xen/arch/x86/include/asm/alternative.h > > +++ b/xen/arch/x86/include/asm/alternative.h > > @@ -183,13 +183,13 @@ extern void alternative_branches(void); > > * https://github.com/l

Re: [PATCH] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 13:56 +0200, Jan Beulich wrote: > On 29.07.2024 13:52, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > (for whatever that's worth) > Thanks. ~ Oleksii

Re: [PATCH] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread Jan Beulich
On 29.07.2024 13:52, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich (for whatever that's worth)

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Jan Beulich
On 26.07.2024 17:21, Roger Pau Monne wrote: > The PVH dom0 builder doesn't switch page tables and has no need to run with > SMAP disabled. > > Put the SMAP disabling close to the code region where it's necessary, as it > then becomes obvious why switch_cr3_cr4() is required instead of > write_ptba

[PATCH] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V3: - update "Changed". Move "Code symbol annotations and MISRA compliance improvements" to generic part. - Sort "Added section". Per-arch changes go first. - Drop implementation related details for Arm and PPC in "Changed". - drop PPC and RIS

Re: [PATCH v2] xen: PE/COFF image header

2024-07-29 Thread Jan Beulich
On 23.07.2024 20:22, Milan Djokic wrote: > From: Nikola Jelic > > Added PE/COFF generic image header which shall be used for EFI > application format for x86/risc-v. x86 and risc-v source shall be adjusted > to use this header in following commits. pe.h header is taken over from > linux kernel wi

Re: [PATCH v1 1/3] mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options

2024-07-29 Thread Russell King (Oracle)
On Fri, Jul 26, 2024 at 05:07:26PM +0200, David Hildenbrand wrote: > Let's clean that up a bit and prepare for depending on > CONFIG_SPLIT_PMD_PTLOCKS in other Kconfig options. > > More cleanups would be reasonable (like the arch-specific "depends on" > for CONFIG_SPLIT_PTE_PTLOCKS), but we'll lea

Re: [PATCH v6 4/4] x86/ucode: Utilize ucode_force and remove opt_ucode_allow_same

2024-07-29 Thread Jan Beulich
On 25.07.2024 10:27, Fouad Hilly wrote: > --- a/docs/misc/xen-command-line.pandoc > +++ b/docs/misc/xen-command-line.pandoc > @@ -2650,7 +2650,7 @@ performance. > Alternatively, selecting `tsx=1` will re-enable TSX at the users own risk. > > ### ucode > -> `= List of [ | scan=, nmi=, allow-

Re: [PATCH v7 1/2] x86/mm: add API for marking only part of a MMIO page read only

2024-07-29 Thread Jan Beulich
On 26.07.2024 03:55, Marek Marczykowski-Górecki wrote: > In some cases, only few registers on a page needs to be write-protected. > Examples include USB3 console (64 bytes worth of registers) or MSI-X's > PBA table (which doesn't need to span the whole table either), although > in the latter case t

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Alejandro Vallejo
On Mon Jul 29, 2024 at 11:47 AM BST, Jan Beulich wrote: > On 29.07.2024 12:30, Roger Pau Monne wrote: > > --- a/xen/arch/x86/include/asm/alternative.h > > +++ b/xen/arch/x86/include/asm/alternative.h > > @@ -183,13 +183,13 @@ extern void alternative_branches(void); > > * https://github.com/llvm/l

Re: [XEN PATCH v5 6/8] x86/hvm: add defensive statements in unreachable program points

2024-07-29 Thread Jan Beulich
On 29.07.2024 11:00, Federico Serafini wrote: > As a defensive measure, make sure to signal an error to the caller > if an unreachable program point is reached. > > Signed-off-by: Federico Serafini Reviewed-by: Jan Beulich

Re: [PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Jan Beulich
On 29.07.2024 12:30, Roger Pau Monne wrote: > --- a/xen/arch/x86/include/asm/alternative.h > +++ b/xen/arch/x86/include/asm/alternative.h > @@ -183,13 +183,13 @@ extern void alternative_branches(void); > * https://github.com/llvm/llvm-project/issues/12579 > * https://github.com/llvm/llvm-projec

Re: [PATCH for 4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread Jan Beulich
On 29.07.2024 12:20, oleksii.kuroc...@gmail.com wrote: > On Mon, 2024-07-29 at 10:11 +0200, Jan Beulich wrote: >> On 29.07.2024 09:31, Oleksii Kurochko wrote: >>> @@ -31,6 +47,14 @@ The format is based on [Keep a >>> Changelog](https://keepachangelog.com/en/1.0.0/) >>>   - Add a new 9pfs backend ru

[PATCH v2] x86/altcall: further refine clang workaround

2024-07-29 Thread Roger Pau Monne
The current code in ALT_CALL_ARG() won't successfully workaround the clang code-generation issue if the arg parameter has a size that's not a power of 2. While there are no such sized parameters at the moment, improve the workaround to also be effective when such sizes are used. Instead of using a

Re: [PATCH for 4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread oleksii . kurochko
On Mon, 2024-07-29 at 10:11 +0200, Jan Beulich wrote: > On 29.07.2024 09:31, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Since no-one else cared to reply so far, I will (I tried to avoid > doing so, > because - I'm sorry for that - feedback is mostly negative, in part > follow

[ovmf test] 187040: all pass - PUSHED

2024-07-29 Thread osstest service owner
flight 187040 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187040/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 43e2395c1b130540820957305451340e1fff81e4 baseline version: ovmf 51edd4830d822e70b96a8

Re: [XEN PATCH v5 5/8] x86/hvm: address violations of MISRA C Rule 16.3

2024-07-29 Thread Jan Beulich
On 29.07.2024 11:00, Federico Serafini wrote: > MISRA C Rule 16.3 states that "An unconditional `break' statement shall > terminate every switch-clause". > > Add pseudo keyword fallthrough or missing break statement > to address violations of the rule. > > Signed-off-by: Federico Serafini Acked

[XEN PATCH v5 3/8] x86/traps: address violations of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
Add break or pseudo keyword fallthrough to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/traps.c |

[XEN PATCH v5 8/8] x86/mpparse: address a violation of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
Add a missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/mpparse.c | 1 + 1

[XEN PATCH v5 6/8] x86/hvm: add defensive statements in unreachable program points

2024-07-29 Thread Federico Serafini
As a defensive measure, make sure to signal an error to the caller if an unreachable program point is reached. Signed-off-by: Federico Serafini --- xen/arch/x86/hvm/emulate.c | 1 + xen/arch/x86/hvm/hvm.c | 4 xen/arch/x86/hvm/vmx/vmcs.c | 2 ++ 3 files changed, 7 insertions(+) diff

[XEN PATCH v5 7/8] x86/mm: add defensive return

2024-07-29 Thread Federico Serafini
Add defensive return statement at the end of an unreachable default case. Other than improve safety, this meets the requirements to deviate a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". Signed-off-by: Federico Serafini --- No changes f

[XEN PATCH v5 5/8] x86/hvm: address violations of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
MISRA C Rule 16.3 states that "An unconditional `break' statement shall terminate every switch-clause". Add pseudo keyword fallthrough or missing break statement to address violations of the rule. Signed-off-by: Federico Serafini --- Changes in v5: - separate mechanical changes from the ones tha

[XEN PATCH v5 4/8] x86/mce: address violations of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mce_amd.c

[XEN PATCH v5 2/8] x86/vpmu: address violations of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Reviewed-by: Jan Beulich --- xen/arch/x86/cpu/vpmu.c

[XEN PATCH v5 0/8] x86: address some violations of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
This patch series fixes a missing escape in a deviation and addresses some violations. Federico Serafini (8): automation/eclair: fix deviation of MISRA C Rule 16.3 x86/vpmu: address violations of MISRA C Rule 16.3 x86/traps: address violations of MISRA C Rule 16.3 x86/mce: address violatio

[XEN PATCH v5 1/8] automation/eclair: fix deviation of MISRA C Rule 16.3

2024-07-29 Thread Federico Serafini
Add missing escape for the final dot of the fallthrough comment, extend the search of a fallthrough comment up to 2 lines after the last statement and improve the text of the justification. Fixes: a128d8da91 ("automation/eclair: add deviations for MISRA C:2012 Rule 16.3") Reported-by: Jan Beulich

Re: [PATCH for-4.20] hvmloader: Rework hypercall infrastructure

2024-07-29 Thread Roger Pau Monné
On Thu, Jul 25, 2024 at 08:18:27AM +0200, Jan Beulich wrote: > On 24.07.2024 19:24, Andrew Cooper wrote: > > On 17/07/2024 1:37 pm, Jan Beulich wrote: > >> On 17.07.2024 13:12, Andrew Cooper wrote: > >>> static inline int > >>> hypercall_sched_op( > >>> int cmd, void *arg) > >>> { > >>> -

[xen-unstable test] 187037: tolerable FAIL

2024-07-29 Thread osstest service owner
flight 187037 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/187037/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail in 187032 pass in 187037 test-armhf-ar

Re: [PATCH for 4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread Roger Pau Monné
On Mon, Jul 29, 2024 at 10:11:23AM +0200, Jan Beulich wrote: > On 29.07.2024 09:31, Oleksii Kurochko wrote: > > @@ -23,6 +34,11 @@ The format is based on [Keep a > > Changelog](https://keepachangelog.com/en/1.0.0/) > > using a standalone library implementation. > > - xenalyze no longer requi

Re: [PATCH 03/22] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-29 Thread Roger Pau Monné
On Fri, Jul 26, 2024 at 05:21:47PM +0200, Roger Pau Monne wrote: > The PVH dom0 builder doesn't switch page tables and has no need to run with > SMAP disabled. This should be reworded as: "The PVH dom0 builder doesn't build guest page-tables, because PVH is started in 32bit protected mode, hence

Re: [PATCH] x86/altcall: further refine clang workaround

2024-07-29 Thread Roger Pau Monné
On Fri, Jul 26, 2024 at 05:38:11PM +0100, Alejandro Vallejo wrote: > On Fri Jul 26, 2024 at 5:25 PM BST, Alejandro Vallejo wrote: > > On Fri Jul 26, 2024 at 4:18 PM BST, Roger Pau Monné wrote: > > > On Fri, Jul 26, 2024 at 03:25:08PM +0100, Alejandro Vallejo wrote: > > > > On Fri Jul 26, 2024 at 3:

Re: [PATCH for 4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle

2024-07-29 Thread Jan Beulich
On 29.07.2024 09:31, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko Since no-one else cared to reply so far, I will (I tried to avoid doing so, because - I'm sorry for that - feedback is mostly negative, in part following what I said for some 4.18 entries last time already, iirc): > -

[ANNOUNCE] Call for agenda items - Community Call 1st August 2024

2024-07-29 Thread Kelly Choi
Hi all, *Please add your proposed agenda items below.* https://cryptpad.fr/pad/#/2/pad/edit/VxQ65XLa-w4D3D9z9ipZInnC/ **Please can a community member help host and record the call this month as I will be out of office** If any action items are missing or have been resolved, please add/remove th

Re: [XEN PATCH v4] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-29 Thread Jan Beulich
On 26.07.2024 18:40, Matthew Barnes wrote: > @@ -24,7 +25,23 @@ int main(int argc, char **argv) > status.port = port; > rc = xc_evtchn_status(xch, &status); > if ( rc < 0 ) > -break; > +{ > +switch ( errno ) { > +case EACCES

  1   2   >