Re: [PATCH] docs/misra/rules.rst: add more rules

2023-12-06 Thread Jan Beulich
On 07.12.2023 03:42, Stefano Stabellini wrote: > On Wed, 6 Dec 2023, Jan Beulich wrote: >> On 06.12.2023 04:02, Stefano Stabellini wrote: >>> --- a/docs/misra/rules.rst >>> +++ b/docs/misra/rules.rst >>> @@ -462,11 +462,23 @@ maintainers if you want to suggest a change. >>> >>> while(0) a

[linux-linus test] 184013: regressions - FAIL

2023-12-06 Thread osstest service owner
flight 184013 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/184013/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 6 kernel-build fail REGR. vs. 183973 build-arm64-pvops

Re: [PATCH v2] x86/DMI: adjustments to comply with Misra C:2012 Rule 9.3

2023-12-06 Thread Jan Beulich
On 06.12.2023 21:45, Andrew Cooper wrote: > On 05/12/2023 1:35 pm, Jan Beulich wrote: >> The rule demands that all array elements be initialized (or dedicated >> initializers be used). Introduce a small set of macros to allow doing so >> without unduly affecting use sites (in particular in terms of

[PATCH] MAINTAINERS: add me as Mini-OS maintainer

2023-12-06 Thread Juergen Gross
I've been the main contributor to Mini-OS since several years now. Add me as a maintainer. Signed-off-by: Juergen Gross --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0fcf5a6f36..496978a56c 100644 --- a/MAINTAINERS +++ b/MAINTA

Re: Clang-format configuration discussion - pt 2

2023-12-06 Thread Jan Beulich
On 06.12.2023 18:55, Julien Grall wrote: > On 06/12/2023 02:32, George Dunlap wrote: >> On Tue, Dec 5, 2023 at 2:07 PM Jan Beulich wrote: >>> On 05.12.2023 14:46, Luca Fancellu wrote: In my opinion, I don’t know of any tool that can address all the flexibility the Xen codestyle allows,

preparations for 4.17.3

2023-12-06 Thread Jan Beulich
All, the release is about due. Please point out backports you find missing from the respective staging branch, but which you consider relevant. Jan

Re: [RFC KERNEL PATCH v2 2/3] xen/pvh: Unmask irq for passthrough device in PVH dom0

2023-12-06 Thread Juergen Gross
On 07.12.23 03:18, Stefano Stabellini wrote: On Tue, 5 Dec 2023, Chen, Jiqian wrote: When PVH dom0 enable a device, it will get trigger and polarity from ACPI (see acpi_pci_irq_enable) I have a version of patch which tried that way, see below: This approach looks much better. I think this pat

Re: MiniOS build regressions

2023-12-06 Thread Juergen Gross
On 06.12.23 22:39, Julien Grall wrote: Hi, On 06/12/2023 21:58, Andrew Cooper wrote: Following the chaos this morning and a scattering of fixes, I finally got back to a working Gitlab with: https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1097843454 This contains a full revert of

[PATCH v2] tools/libs/evtchn: replace assert()s in stubdom with proper locking

2023-12-06 Thread Juergen Gross
In tools/libs/evtchn/minios.c there are assert()s for the current thread being the main thread when binding an event channel. As Mini-OS is supporting multiple threads, there is no real reason why the binding shouldn't be allowed to happen in any other thread. Drop the assert()s and replace them

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

2023-12-06 Thread osstest service owner
flight 184005 xen-unstable real [real] flight 184018 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184005/ http://logs.test-lab.xenproject.org/osstest/logs/184018/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armh

Re: [RFC KERNEL PATCH v2 2/3] xen/pvh: Unmask irq for passthrough device in PVH dom0

2023-12-06 Thread Chen, Jiqian
(Adding Juergen to the "To" list.) Hi Juergen, Looking forward to your opinions. On 2023/12/7 10:18, Stefano Stabellini wrote: > On Tue, 5 Dec 2023, Chen, Jiqian wrote: >> When PVH dom0 enable a device, it will get trigger and polarity from ACPI >> (see acpi_pci_irq_enable) >> I have a version

[ovmf test] 184017: all pass - PUSHED

2023-12-06 Thread osstest service owner
flight 184017 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184017/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf ff4c49a5ee38d613384fb2e318d891a800d32999 baseline version: ovmf df2ec2aab0876d3402596

Re: [PATCH -next RFC 01/14] block: add some bdev apis

2023-12-06 Thread Yu Kuai
Hi, 在 2023/12/06 22:58, Matthew Wilcox 写道: On Tue, Dec 05, 2023 at 08:37:15PM +0800, Yu Kuai wrote: +struct folio *bdev_read_folio(struct block_device *bdev, pgoff_t index) +{ + return read_mapping_folio(bdev->bd_inode->i_mapping, index, NULL); +} +EXPORT_SYMBOL_GPL(bdev_read_folio); I'

Re: [PATCH] docs/misra/rules.rst: add more rules

2023-12-06 Thread Stefano Stabellini
On Wed, 6 Dec 2023, Jan Beulich wrote: > On 06.12.2023 04:02, Stefano Stabellini wrote: > > --- a/docs/misra/rules.rst > > +++ b/docs/misra/rules.rst > > @@ -462,11 +462,23 @@ maintainers if you want to suggest a change. > > > > while(0) and while(1) and alike are allowed. > > > > + *

Re: [RFC KERNEL PATCH v2 2/3] xen/pvh: Unmask irq for passthrough device in PVH dom0

2023-12-06 Thread Stefano Stabellini
On Tue, 5 Dec 2023, Chen, Jiqian wrote: > When PVH dom0 enable a device, it will get trigger and polarity from ACPI > (see acpi_pci_irq_enable) > I have a version of patch which tried that way, see below: This approach looks much better. I think this patch is OKish. Juergen, what do you think?

Re: [PATCH 1/3] xen/ppc: Enable Boot Allocator

2023-12-06 Thread Daniel P. Smith
On 12/1/23 15:56, Julien Grall wrote: (+ Arm and RISC-V folks) Hi Shawn, On 01/12/2023 20:59, Shawn Anastasio wrote: Adapt arm's earlyfdt parsing code to ppc64 and enable Xen's early boot allocator. Routines for parsing arm-specific devicetree nodes (e.g. multiboot) were excluded, reducing the

[ovmf test] 184016: all pass - PUSHED

2023-12-06 Thread osstest service owner
flight 184016 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184016/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf df2ec2aab0876d34025968030d1f26ad8e5106ec baseline version: ovmf b59ab98049f20f826ff53

Re: [RFC XEN PATCH v2 1/3] xen/vpci: Clear all vpci status of device

2023-12-06 Thread Daniel P. Smith
V/r, Daniel P. Smith Apertus Solutions, LLC On 12/4/23 06:10, Roger Pau Monné wrote: On Mon, Dec 04, 2023 at 06:57:03AM +, Chen, Jiqian wrote: Hi Daniel P. Smith, On 2023/11/30 22:52, Roger Pau Monné wrote: On Thu, Nov 30, 2023 at 07:39:38AM -0500, Daniel P. Smith wrote: On 11/30/23 0

[xen-4.18-testing test] 184008: tolerable trouble: fail/pass/starved - PUSHED

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

xen | Failed pipeline for staging | d4bfd389

2023-12-06 Thread GitLab
Pipeline #1097898076 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: d4bfd389 ( https://gitlab.com/xen-project/xen/-/commit/d4bfd3899886d0fbe259c20660dadb1e00170f2d ) Commit Message: xen/hyperviso

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

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

[ovmf test] 184014: all pass - PUSHED

2023-12-06 Thread osstest service owner
flight 184014 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184014/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf b59ab98049f20f826ff5302a498a435cbb3b3753 baseline version: ovmf 7e18c9a788e543ab71cdc

Re: MiniOS build regressions

2023-12-06 Thread Julien Grall
Hi, On 06/12/2023 21:58, Andrew Cooper wrote: Following the chaos this morning and a scattering of fixes, I finally got back to a working Gitlab with: https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1097843454 This contains a full revert of the DMI patch, and removal of the Xilin

Re: [PATCH] tools/libs/evtchn: drop assert()s in stubdom

2023-12-06 Thread Julien Grall
Le mer. 6 déc. 2023 à 21:03, Jason Andryuk a écrit : > > On Wed, Dec 6, 2023 at 11:44 AM Juergen Gross wrote: > > > > On 06.12.23 17:38, Jason Andryuk wrote: > > > On Wed, Dec 6, 2023 at 9:40 AM Juergen Gross wrote: > > >> > > >> In tools/libs/evtchn/minios.c there are assert()s for the current

Re: [PATCH] tools/libs/evtchn: drop assert()s in stubdom

2023-12-06 Thread Jason Andryuk
On Wed, Dec 6, 2023 at 11:44 AM Juergen Gross wrote: > > On 06.12.23 17:38, Jason Andryuk wrote: > > On Wed, Dec 6, 2023 at 9:40 AM Juergen Gross wrote: > >> > >> In tools/libs/evtchn/minios.c there are assert()s for the current > >> thread being the main thread when binding an event channel. > >

MiniOS build regressions

2023-12-06 Thread Andrew Cooper
Following the chaos this morning and a scattering of fixes, I finally got back to a working Gitlab with: https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1097843454 This contains a full revert of the DMI patch, and removal of the Xilinx hardware runner, both handled in other threads

[libvirt test] 184003: tolerable all pass - PUSHED

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

Re: [PATCH v2] x86/DMI: adjustments to comply with Misra C:2012 Rule 9.3

2023-12-06 Thread Andrew Cooper
On 05/12/2023 1:35 pm, Jan Beulich wrote: > The rule demands that all array elements be initialized (or dedicated > initializers be used). Introduce a small set of macros to allow doing so > without unduly affecting use sites (in particular in terms of how many > elements .matches[] actually has; r

Re: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code

2023-12-06 Thread Brian Gerst
On Wed, Dec 6, 2023 at 2:19 PM Li, Xin3 wrote: > > > >>> + case X86_TRAP_OF: > > >>> + exc_overflow(regs); > > >>> + return; > > >>> + > > >>> + /* INT3 */ > > >>> + case X86_TRAP_BP: > > >>> + exc_int3(regs); > > >>> + return; > > >> ... neither OF nor BP will ever

Re: [PATCH v2 1/3] xen/arm: set -mno-unaligned-access compiler option for Arm32

2023-12-06 Thread Julien Grall
On 06/12/2023 10:57, Julien Grall wrote: Hi Juergen, On 06/12/2023 10:00, Juergen Gross wrote: On 06.12.23 09:44, Jan Beulich wrote: On 06.12.2023 08:10, Juergen Gross wrote: As the hypervisor is disabling unaligned accesses for Arm32, set the -mno-unaligned-access compiler option for buil

RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code

2023-12-06 Thread H. Peter Anvin
On December 6, 2023 11:19:26 AM PST, "Li, Xin3" wrote: >> >>> +case X86_TRAP_OF: >> >>> +exc_overflow(regs); >> >>> +return; >> >>> + >> >>> +/* INT3 */ >> >>> +case X86_TRAP_BP: >> >>> +exc_int3(regs); >> >>> +

RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code

2023-12-06 Thread Li, Xin3
> >>> + case X86_TRAP_OF: > >>> + exc_overflow(regs); > >>> + return; > >>> + > >>> + /* INT3 */ > >>> + case X86_TRAP_BP: > >>> + exc_int3(regs); > >>> + return; > >> ... neither OF nor BP will ever enter fred_intx() because they're > >> type SWEXC not SWINT. > > Pe

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Julien Grall
Hi Jan, On 06/12/2023 11:08, Jan Beulich wrote: On 06.12.2023 12:07, Julien Grall wrote: Hi Jan, On 06/12/2023 11:05, Jan Beulich wrote: On 06.12.2023 11:52, Julien Grall wrote: Hi Jan, On 06/12/2023 08:52, Jan Beulich wrote: On 05.12.2023 19:32, Julien Grall wrote: From: Julien Grall R

Re: [PATCH v2 15/29] tools/libs/light: add backend type for 9pfs PV devices

2023-12-06 Thread Jason Andryuk
On Wed, Dec 6, 2023 at 12:44 PM Nick Rosbrook wrote: > > On Wed, Dec 6, 2023 at 9:36 AM Jason Andryuk wrote: > > FYI, these IDL changes will require golang binding regeneration. > > (Maybe we shouldn't have generated code checked in...) > > The generated code needs to be checked in for it to work

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-12-06 Thread Peter Zijlstra
On Wed, Dec 06, 2023 at 10:37:33AM -0600, Madhavan T. Venkataraman wrote: > > > On 11/30/23 05:33, Peter Zijlstra wrote: > > On Wed, Nov 29, 2023 at 03:07:15PM -0600, Madhavan T. Venkataraman wrote: > > > >> Kernel Lockdown > >> --- > >> > >> But, we must provide at least some securi

[PATCH] xen/xenbus: client: fix kernel-doc comments

2023-12-06 Thread Randy Dunlap
Correct function kernel-doc notation to prevent warnings from scripts/kernel-doc. xenbus_client.c:134: warning: No description found for return value of 'xenbus_watch_path' xenbus_client.c:177: warning: No description found for return value of 'xenbus_watch_pathfmt' xenbus_client.c:258: warning:

Re: [PATCH -next RFC 01/14] block: add some bdev apis

2023-12-06 Thread Christoph Hellwig
On Wed, Dec 06, 2023 at 12:50:38PM -0500, Theodore Ts'o wrote: > This was added because pulling a mounted a USB thumb drive (or a HDD > drops off the SATA bus) while the file system is mounted and actively > in use, would result in a kernel OOPS. If that's no longer true, > that's great, but it wo

Re: Clang-format configuration discussion - pt 2

2023-12-06 Thread Julien Grall
On 06/12/2023 02:32, George Dunlap wrote: On Tue, Dec 5, 2023 at 2:07 PM Jan Beulich wrote: On 05.12.2023 14:46, Luca Fancellu wrote: In my opinion, I don’t know of any tool that can address all the flexibility the Xen codestyle allows, yet the use of automatic checkers would improve the

Re: [PATCH -next RFC 01/14] block: add some bdev apis

2023-12-06 Thread Theodore Ts'o
On Tue, Dec 05, 2023 at 10:14:00PM -0800, Christoph Hellwig wrote: > > +/* > > + * The del_gendisk() function uninitializes the disk-specific data > > + * structures, including the bdi structure, without telling anyone > > + * else. Once this happens, any attempt to call mark_buffer_dirty() > > +

Re: [PATCH v2 15/29] tools/libs/light: add backend type for 9pfs PV devices

2023-12-06 Thread Nick Rosbrook
On Wed, Dec 6, 2023 at 9:36 AM Jason Andryuk wrote: > FYI, these IDL changes will require golang binding regeneration. > (Maybe we shouldn't have generated code checked in...) The generated code needs to be checked in for it to work as a go module. -Nick

Re: [PATCH v4 2/6] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-12-06 Thread Anthony PERARD
On Sat, Dec 02, 2023 at 01:41:21AM +, Volodymyr Babchuk wrote: > Xen PV devices in QEMU can be created in two ways: either by QEMU > itself, if they were passed via command line, or by Xen toolstack. In > the latter case, QEMU scans XenStore entries and configures devices > accordingly. > > In

Re: [PATCH] tools/libs/evtchn: drop assert()s in stubdom

2023-12-06 Thread Juergen Gross
On 06.12.23 17:38, Jason Andryuk wrote: On Wed, Dec 6, 2023 at 9:40 AM Juergen Gross wrote: In tools/libs/evtchn/minios.c there are assert()s for the current thread being the main thread when binding an event channel. As Mini-OS is supporting multiple threads, there is no real reason why the

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-12-06 Thread Madhavan T. Venkataraman
On 11/30/23 18:45, Edgecombe, Rick P wrote: > On Wed, 2023-11-29 at 15:07 -0600, Madhavan T. Venkataraman wrote: >> Threat Model >> >> >> In the threat model in Heki, the attacker is a user space attacker >> who exploits >> a kernel vulnerability to gain more privileges or bypass th

Re: [PATCH] tools/libs/evtchn: drop assert()s in stubdom

2023-12-06 Thread Jason Andryuk
On Wed, Dec 6, 2023 at 9:40 AM Juergen Gross wrote: > > In tools/libs/evtchn/minios.c there are assert()s for the current > thread being the main thread when binding an event channel. > > As Mini-OS is supporting multiple threads, there is no real reason > why the binding shouldn't be allowed to h

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-12-06 Thread Madhavan T. Venkataraman
On 11/30/23 05:33, Peter Zijlstra wrote: > On Wed, Nov 29, 2023 at 03:07:15PM -0600, Madhavan T. Venkataraman wrote: > >> Kernel Lockdown >> --- >> >> But, we must provide at least some security in V2. Otherwise, it is useless. >> >> So, we have implemented what we call a kernel loc

Re: [PATCH] CODING_STYLE: Add a section of the naming convention

2023-12-06 Thread George Dunlap
On Wed, Dec 6, 2023 at 11:22 AM Julien Grall wrote: > > Hi, > > On 06/12/2023 11:19, Andrew Cooper wrote: > > On 06/12/2023 8:41 am, Jan Beulich wrote: > >> On 06.12.2023 03:21, George Dunlap wrote: > >>> On Tue, Dec 5, 2023 at 6:12 PM Julien Grall wrote: > From: Julien Grall > >

[PATCH] Mini-OS: don't use objcopy --dump-section

2023-12-06 Thread Juergen Gross
The objcopy option "--dump-section" isn't supported in binutils before version 2.25, which are still supported by the Xen build system. Avoid that by using the "-O binary" format together with "--only-section". This requires to set the "alloc" section flag. Fixes: 33411a11f848 ("Mini-OS: hide all

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

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

[linux-linus test] 184001: regressions - FAIL

2023-12-06 Thread osstest service owner
flight 184001 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/184001/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 6 kernel-build fail REGR. vs. 183973 Tests which are fai

Re: [PATCH -next RFC 01/14] block: add some bdev apis

2023-12-06 Thread Matthew Wilcox
On Tue, Dec 05, 2023 at 08:37:15PM +0800, Yu Kuai wrote: > +struct folio *bdev_read_folio(struct block_device *bdev, pgoff_t index) > +{ > + return read_mapping_folio(bdev->bd_inode->i_mapping, index, NULL); > +} > +EXPORT_SYMBOL_GPL(bdev_read_folio); I'm coming to the opinion that 'index' is

Re: [PATCH v2 0/3] livepatch-build-tools: fixes for non GNU tools and alignment

2023-12-06 Thread Ross Lagerwall
On Tue, Nov 28, 2023 at 9:22 AM Roger Pau Monne wrote: > > Hello, > > The series contains two fixes for using the tools on non GNU > environments, plus one extra fix to account for section alignment when > calculating old function size. > > Thanks, Roger. > > Roger Pau Monne (3): > livepatch-bui

[PATCH] tools/libs/evtchn: drop assert()s in stubdom

2023-12-06 Thread Juergen Gross
In tools/libs/evtchn/minios.c there are assert()s for the current thread being the main thread when binding an event channel. As Mini-OS is supporting multiple threads, there is no real reason why the binding shouldn't be allowed to happen in any other thread. Just drop the assert()s. Signed-off

Re: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code

2023-12-06 Thread Andrew Cooper
On 06/12/2023 7:45 am, Li, Xin3 wrote: >>> + case X86_TRAP_OF: >>> + exc_overflow(regs); >>> + return; >>> + >>> + /* INT3 */ >>> + case X86_TRAP_BP: >>> + exc_int3(regs); >>> + return; >> ... neither OF nor BP will ever enter fred_intx() because they'r

[PATCH] Mini-OS: export main_thread

2023-12-06 Thread Juergen Gross
The main_thread variable needs to be exported for applications. Fixes: 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()") Reported-by: Andrew Cooper Signed-off-by: Juergen Gross --- sched.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sched.c b/sched.c index e1

xen | Successful pipeline for staging-4.17 | 6eb98dda

2023-12-06 Thread GitLab
Pipeline #1097122838 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging-4.17 ( https://gitlab.com/xen-project/xen/-/commits/staging-4.17 ) Commit: 6eb98dda ( https://gitlab.com/xen-project/xen/-/commit/6eb98dda5c91e68555684c57a2c9bd119ff082c1 ) Commit Message: xe

Re: [PATCH v5 03/11] xen/arm: re-define a set of data structures for static shared memory region

2023-12-06 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > This commit introduces a set of separate data structures to deal with > static shared memory at different stages. > > In boot-time host device tree parsing, we introduce a new structure > "struct shm_node" and a new field "shminfo" in boot

xen | Failed pipeline for staging-4.18 | 25b7f9ed

2023-12-06 Thread GitLab
Pipeline #1097109453 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging-4.18 ( https://gitlab.com/xen-project/xen/-/commits/staging-4.18 ) Commit: 25b7f9ed ( https://gitlab.com/xen-project/xen/-/commit/25b7f9ed0f8c7e138a2cecb113bd377c613153d7 ) Commit Message: xe

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Jason Andryuk
On Tue, Dec 5, 2023 at 4:49 PM Julien Grall wrote: > > From: Julien Grall > > Right now, all tools and hypervisor will be complied with the option > -Wdeclaration-after-statement. While most of the code in the hypervisor > is controlled by us, for tools we may import external libraries. > > The b

Re: [PATCH v2 15/29] tools/libs/light: add backend type for 9pfs PV devices

2023-12-06 Thread Jason Andryuk
On Fri, Nov 10, 2023 at 11:09 AM Juergen Gross wrote: > diff --git a/tools/libs/light/libxl_types.idl > b/tools/libs/light/libxl_types.idl > index 7d8bd5d216..82565c4c10 100644 > --- a/tools/libs/light/libxl_types.idl > +++ b/tools/libs/light/libxl_types.idl > @@ -150,6 +150,12 @@ libxl_nic_type

Re: [PATCH] livepatch-build-tools: allow livepatching version.c

2023-12-06 Thread Ross Lagerwall
On Tue, Dec 5, 2023 at 2:57 PM Roger Pau Monné wrote: > > On Tue, Dec 05, 2023 at 02:15:05PM +, Andrew Cooper wrote: > > On 05/12/2023 12:34 pm, Roger Pau Monne wrote: > > > Currently version.o is explicitly ignored as the file would change as a > > > result > > > of the orignal and the patch

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Anthony PERARD
On Tue, Dec 05, 2023 at 06:32:26PM +, Julien Grall wrote: > From: Julien Grall > > Right now, all tools and hypervisor will be complied with the option > -Wdeclaration-after-statement. While most of the code in the hypervisor > is controlled by us, for tools we may import external libraries.

xen | Failed pipeline for staging | 59df2851

2023-12-06 Thread GitLab
Pipeline #1097090546 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: 59df2851 ( https://gitlab.com/xen-project/xen/-/commit/59df2851318357763be3ad8a5f300d6a9e7c6e38 ) Commit Message: x86/DMI: adju

Re: [PATCH mini-os] x86: fix building with Clang

2023-12-06 Thread Juergen Gross
On 06.12.23 11:59, Jan Beulich wrote: It doesn't understand -fno-reorder-blocks. Whether without that option the resulting binary is actually functional I can't tell, though. For $(cc-option ...) to be usable in arch.mk, at least CC needs setting earlier in Config.mk. Move up the entire "Set too

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Juergen Gross
On 06.12.23 12:33, Andrew Cooper wrote: On 06/12/2023 10:59 am, Andrew Cooper wrote: On 06/12/2023 7:10 am, Juergen Gross wrote: diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h index 0a2b16d05d..0ceb06a2bb 100644 --- a/xen/include/xen/unaligned.h +++ b/xen/include/xen/una

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Juergen Gross
On 06.12.23 11:59, Andrew Cooper wrote: On 06/12/2023 7:10 am, Juergen Gross wrote: diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h index 0a2b16d05d..0ceb06a2bb 100644 --- a/xen/include/xen/unaligned.h +++ b/xen/include/xen/unaligned.h @@ -1,12 +1,4 @@ -static inline uint

Re: [PATCH v5 02/11] xen/arm: avoid repetitive checking in process_shm_node

2023-12-06 Thread Michal Orzel
Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > > > Putting overlap and overflow checking in the loop is causing repetitive > operation, so this commit extracts both checking outside the loop. > > Signed-off-by: Penny Zheng In general the patch looks good to me: Reviewed-by: Michal Orzel

Re: [PATCH] Mini-OS: use BUG() instead of dereferencing NULL

2023-12-06 Thread Andrew Cooper
On 06/12/2023 11:30 am, Juergen Gross wrote: > There are some places using a dereference of NULL to cause a crash. > > Use BUG() instead. > > Reported-by: Jan Beulich > Signed-off-by: Juergen Gross Wow... Acked-by: Andrew Cooper > --- > lib/xmalloc.c | 4 ++-- > 1 file changed, 2 insertions(

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Andrew Cooper
On 06/12/2023 10:59 am, Andrew Cooper wrote: > On 06/12/2023 7:10 am, Juergen Gross wrote: >> diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h >> index 0a2b16d05d..0ceb06a2bb 100644 >> --- a/xen/include/xen/unaligned.h >> +++ b/xen/include/xen/unaligned.h >> @@ -1,12 +1,4 @@ >

[PATCH] Mini-OS: use BUG() instead of dereferencing NULL

2023-12-06 Thread Juergen Gross
There are some places using a dereference of NULL to cause a crash. Use BUG() instead. Reported-by: Jan Beulich Signed-off-by: Juergen Gross --- lib/xmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/xmalloc.c b/lib/xmalloc.c index cc5db11e..2aa07138 100644 -

Re: [PATCH] CODING_STYLE: Add a section of the naming convention

2023-12-06 Thread Julien Grall
Hi, On 06/12/2023 11:19, Andrew Cooper wrote: On 06/12/2023 8:41 am, Jan Beulich wrote: On 06.12.2023 03:21, George Dunlap wrote: On Tue, Dec 5, 2023 at 6:12 PM Julien Grall wrote: From: Julien Grall Several maintainers have expressed a stronger preference to use '-' when in filename and o

Re: [PATCH] CODING_STYLE: Add a section of the naming convention

2023-12-06 Thread Andrew Cooper
On 06/12/2023 8:41 am, Jan Beulich wrote: > On 06.12.2023 03:21, George Dunlap wrote: >> On Tue, Dec 5, 2023 at 6:12 PM Julien Grall wrote: >>> From: Julien Grall >>> >>> Several maintainers have expressed a stronger preference >>> to use '-' when in filename and option that contains multiple >>>

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Andrew Cooper
On 06/12/2023 8:52 am, Jan Beulich wrote: > On 05.12.2023 19:32, Julien Grall wrote: >> From: Julien Grall >> >> Right now, all tools and hypervisor will be complied with the option >> -Wdeclaration-after-statement. While most of the code in the hypervisor >> is controlled by us, for tools we may

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

2023-12-06 Thread osstest service owner
flight 184006 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184006/ 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] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Jan Beulich
On 06.12.2023 12:07, Julien Grall wrote: > Hi Jan, > > On 06/12/2023 11:05, Jan Beulich wrote: >> On 06.12.2023 11:52, Julien Grall wrote: >>> Hi Jan, >>> >>> On 06/12/2023 08:52, Jan Beulich wrote: On 05.12.2023 19:32, Julien Grall wrote: > From: Julien Grall > > Right now, all

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Julien Grall
Hi Jan, On 06/12/2023 11:05, Jan Beulich wrote: On 06.12.2023 11:52, Julien Grall wrote: Hi Jan, On 06/12/2023 08:52, Jan Beulich wrote: On 05.12.2023 19:32, Julien Grall wrote: From: Julien Grall Right now, all tools and hypervisor will be complied with the option -Wdeclaration-after-stat

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Jan Beulich
On 06.12.2023 11:52, Julien Grall wrote: > Hi Jan, > > On 06/12/2023 08:52, Jan Beulich wrote: >> On 05.12.2023 19:32, Julien Grall wrote: >>> From: Julien Grall >>> >>> Right now, all tools and hypervisor will be complied with the option >>> -Wdeclaration-after-statement. While most of the code

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Jan Beulich
On 06.12.2023 11:02, Juergen Gross wrote: > On 06.12.23 09:46, Jan Beulich wrote: >> On 06.12.2023 08:10, Juergen Gross wrote: >>> @@ -15,67 +7,82 @@ >>> #include >>> #endif >>> >>> -#define get_unaligned(p) (*(p)) >>> -#define put_unaligned(val, p) (*(p) = (val)) >>> +/* >>> + * This is th

[PATCH mini-os] x86: fix building with Clang

2023-12-06 Thread Jan Beulich
It doesn't understand -fno-reorder-blocks. Whether without that option the resulting binary is actually functional I can't tell, though. For $(cc-option ...) to be usable in arch.mk, at least CC needs setting earlier in Config.mk. Move up the entire "Set tools" section. Signed-off-by: Jan Beulich

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Andrew Cooper
On 06/12/2023 7:10 am, Juergen Gross wrote: > diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h > index 0a2b16d05d..0ceb06a2bb 100644 > --- a/xen/include/xen/unaligned.h > +++ b/xen/include/xen/unaligned.h > @@ -1,12 +1,4 @@ > > -static inline uint16_t get_unaligned_be16(const

Re: [PATCH v2 1/3] xen/arm: set -mno-unaligned-access compiler option for Arm32

2023-12-06 Thread Julien Grall
Hi Juergen, On 06/12/2023 10:00, Juergen Gross wrote: On 06.12.23 09:44, Jan Beulich wrote: On 06.12.2023 08:10, Juergen Gross wrote: As the hypervisor is disabling unaligned accesses for Arm32, set the -mno-unaligned-access compiler option for building. This will prohibit unaligned accesses w

Re: [PATCH] Only compile the hypervisor with -Wdeclaration-after-statement

2023-12-06 Thread Julien Grall
Hi Jan, On 06/12/2023 08:52, Jan Beulich wrote: On 05.12.2023 19:32, Julien Grall wrote: From: Julien Grall Right now, all tools and hypervisor will be complied with the option -Wdeclaration-after-statement. While most of the code in the hypervisor is controlled by us, for tools we may import

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Andrew Cooper
On 06/12/2023 8:46 am, Jan Beulich wrote: > On 06.12.2023 08:10, Juergen Gross wrote: >> Instead of defining get_unaligned() and put_unaligned() in a way that >> is only supporting architectures allowing unaligned accesses, use the >> same approach as the Linux kernel and let the compiler do the >>

Re: [XEN PATCH 7/7] xen/page_alloc: deviate first_valid_mfn for MISRA C Rule 8.4

2023-12-06 Thread Nicola Vetrini
On 2023-12-05 00:18, Stefano Stabellini wrote: On Mon, 4 Dec 2023, Nicola Vetrini wrote: On 2023-12-04 08:44, Jan Beulich wrote: > On 02.12.2023 04:03, Stefano Stabellini wrote: > > On Fri, 1 Dec 2023, Jan Beulich wrote: > > > On 01.12.2023 03:47, Stefano Stabellini wrote: > > > > On Wed, 29 Nov

Re: [XEN PATCH] ns16550: remove partial explicit initializer

2023-12-06 Thread Nicola Vetrini
On 2023-12-06 10:01, Jan Beulich wrote: On 05.12.2023 17:31, Nicola Vetrini wrote: --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -73,7 +73,7 @@ static struct ns16550 { With the variable even being static, ... bool msi; const struct ns16550_config_param *param

Re: [PATCH v2 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-06 Thread Juergen Gross
On 06.12.23 09:46, Jan Beulich wrote: On 06.12.2023 08:10, Juergen Gross wrote: Instead of defining get_unaligned() and put_unaligned() in a way that is only supporting architectures allowing unaligned accesses, use the same approach as the Linux kernel and let the compiler do the decision how t

Re: [PATCH v2 1/3] xen/arm: set -mno-unaligned-access compiler option for Arm32

2023-12-06 Thread Juergen Gross
On 06.12.23 09:44, Jan Beulich wrote: On 06.12.2023 08:10, Juergen Gross wrote: As the hypervisor is disabling unaligned accesses for Arm32, set the -mno-unaligned-access compiler option for building. This will prohibit unaligned accesses when e.g. accessing 2- or 4-byte data items in packed dat

[PATCH v5 10/11] xen/arm: fix duplicate /reserved-memory node in Dom0

2023-12-06 Thread Penny Zheng
In case there is a /reserved-memory node already present in the host dtb, current Xen codes would create yet another /reserved-memory node specially for the static shm in Dom0 Device Tree. Xen will use write_properties() to copy the reserved memory nodes from host dtb to Dom0 FDT, so we want to in

[PATCH v5 11/11] xen/arm: create another /memory node for static shm

2023-12-06 Thread Penny Zheng
Static shared memory region shall be described both under /memory and /reserved-memory. We introduce export_shm_memory_node() to create another /memory node to contain the static shared memory ranges. Signed-off-by: Penny Zheng --- v3 -> v4: new commit --- v4 -> v5: rebase and no changes --- x

[PATCH v5 09/11] xen/docs: refine docs about static shared memory

2023-12-06 Thread Penny Zheng
This commit amends docs(docs/misc/arm/device-tree/booting.txt) to include the new scenario where host address is not provided in "xen,shared-mem" property, and we also add a new example to explain in detail. We also fix some buggy info in the docs, like SHMID is "my-shared-mem-1", not "0x1". Sign

[PATCH v5 08/11] xen/p2m: put reference for superpage

2023-12-06 Thread Penny Zheng
We are doing foreign memory mapping for static shared memory, and there is a great possibility that it could be super mapped. But today, p2m_put_l3_page could not handle superpages. This commits implements a new function p2m_put_superpage to handle superpages, specifically for helping put extra re

[PATCH v5 06/11] xen/arm: support static shared memory when host address not provided

2023-12-06 Thread Penny Zheng
In order to support static shared memory when host address not provided, we shall do the following modification: - we shall let Xen allocate memory from heap for static shared memory at first domain, no matter it is owner or borrower. - In acquire_shared_memory_bank, as static shared memory has alr

[PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-06 Thread Penny Zheng
We split the code of allocate_bank_memory into two parts, allocate_domheap_memory and guest_physmap_memory. One is about allocating guest RAM from heap, which could be re-used later for allocating static shared memory from heap when host address is not provided. The other is building up guest P2M

[PATCH v5 07/11] xen/arm: remove shm holes for extended regions

2023-12-06 Thread Penny Zheng
Static shared memory acts as reserved memory in guest, so it shall be excluded from extended regions. Extended regions are taken care of under three different scenarios: normal DomU, direct-map domain with iommu on, and direct-map domain with iommu off. For normal DomU, we create a new function "

[PATCH v5 02/11] xen/arm: avoid repetitive checking in process_shm_node

2023-12-06 Thread Penny Zheng
Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng --- v6: new commit --- xen/arch/arm/static-shmem.c | 39 +++-- 1 file changed, 16 insertions(+), 2

[PATCH v5 05/11] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-12-06 Thread Penny Zheng
We use paddr_assigned to indicate whether host address is provided, by checking the length of "xen,shared-mem" property. The shm matching criteria shall also be adapt to cover the new scenario, by adding when host address is not provided, if SHMID matches, the region size must exactly match too.

[PATCH v5 00/11] Follow-up static shared memory PART I

2023-12-06 Thread Penny Zheng
There are some unsolving issues on current 4.18 static shared memory feature[1], including: - In order to avoid keeping growing 'membank', having the shared memory info in separate structures is preferred. - Missing implementation on having the host address optional in "xen,shared-mem" property - R

[PATCH v5 03/11] xen/arm: re-define a set of data structures for static shared memory region

2023-12-06 Thread Penny Zheng
This commit introduces a set of separate data structures to deal with static shared memory at different stages. In boot-time host device tree parsing, we introduce a new structure "struct shm_node" and a new field "shminfo" in bootinfo to describe and store parsed shm info. In acquire_nr_borrower

[PATCH v5 01/11] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-12-06 Thread Penny Zheng
Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng Reviewed-by: Michal Orzel --- v1 -> v2: - new commit --- v2 -> v3: rebase and no change --- v3 -> v4: rebase and no change --- v4 -> v5: rebase and no cha

Re: [PATCH] docs/misra/rules.rst: add more rules

2023-12-06 Thread Jan Beulich
On 06.12.2023 04:02, Stefano Stabellini wrote: > --- a/docs/misra/rules.rst > +++ b/docs/misra/rules.rst > @@ -462,11 +462,23 @@ maintainers if you want to suggest a change. > > while(0) and while(1) and alike are allowed. > > + * - `Rule 16.3 >

Re: [XEN PATCH] ns16550: remove partial explicit initializer

2023-12-06 Thread Jan Beulich
On 05.12.2023 17:31, Nicola Vetrini wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -73,7 +73,7 @@ static struct ns16550 { With the variable even being static, ... > bool msi; > const struct ns16550_config_param *param; /* Points into .init.*! */ > #en

  1   2   >