Re: [PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Juergen Gross
On 16.11.23 19:54, Gustavo A. R. Silva wrote: Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in `struct privcmd_kernel_ioreq`. Also annotate array `ports` with

Re: [PATCH v2] xen/sched: fix sched_move_domain()

2023-11-16 Thread Juergen Gross
On 16.11.23 17:48, George Dunlap wrote: On Tue, Nov 14, 2023 at 1:30 PM Juergen Gross wrote: When moving a domain out of a cpupool running with the credit2 scheduler and having multiple run-queues, the following ASSERT() can be observed: (XEN) Xen call trace: (XEN)[] R credit2.c#csched2_u

Re: [PATCH] xenstored: print domain id in traces

2023-11-16 Thread Juergen Gross
On 16.11.23 21:56, Volodymyr Babchuk wrote: It is very helpful to see domain id why analyzing xenstored traces. Especially when you are trying to understand which exactly domain performs an action. Signed-off-by: Volodymyr Babchuk Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628B

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

2023-11-16 Thread Jan Beulich
On 17.11.2023 01:43, Stefano Stabellini wrote: > On Thu, 16 Nov 2023, Jan Beulich wrote: >> On 16.11.2023 11:02, Nicola Vetrini wrote: >>> On 2023-11-16 09:26, Jan Beulich wrote: On 31.10.2023 11:20, Jan Beulich wrote: > On 31.10.2023 11:03, Nicola Vetrini wrote: >> On 2023-10-31 09:28

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Stewart Hildebrand
On 11/15/23 18:28, Stefano Stabellini wrote: > + Stewart, Vikram > > On Wed, 15 Nov 2023, Oleksandr Tyshchenko wrote: >> On 15.11.23 14:33, Julien Grall wrote: >>> Thanks for adding support for virtio-pci in Xen. I have some questions. >>> >>> On 15/11/2023 11:26, Sergiy Kibrik wrote: From: O

Re: [PATCH] arm/mm: add option to prefer IOMMU ops for DMA on Xen

2023-11-16 Thread Chuck Zmudzinski
On 11/15/2023 12:56 PM, Chuck Zmudzinski wrote: > On 11/14/2023 5:20 PM, Stefano Stabellini wrote: >> On Tue, 14 Nov 2023, Robin Murphy wrote: >>> On 11/11/2023 6:45 pm, Chuck Zmudzinski wrote: >>> > Enabling the new option, ARM_DMA_USE_IOMMU_XEN, fixes this error when >>> > attaching the Exynos mi

Re: [PATCH 3/6] automation: fix jessie/stretch images to use archive.debian.org apt repos

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Roger Pau Monne wrote: > Otherwise it's impossible to build the images. > > Signed-off-by: Roger Pau Monné Reviewed-by: Stefano Stabellini > --- > automation/build/debian/jessie-i386.dockerfile | 7 +++ > automation/build/debian/jessie.dockerfile | 7 +++ >

Re: [PATCH 6/6] automation: switch to multi-platform images when possible

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Roger Pau Monne wrote: > Instead of using specific architecture image, switch to using multi-arch ones > and specify the desired architecture using the --platform option. > > Signed-off-by: Roger Pau Monné > --- > I haven't touched the Yocto dockerfile because I'm not sure ho

Re: [PATCH 4/6] automation: update tests to use Debian Bookworm

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Roger Pau Monne wrote: > Switch tests using Stretch to Bookworm, as Stretch is EOL. > > Note the packages are not removed from the Stretch dockerfile, because the > tests in stable branches will run using the old containers. > > Signed-off-by: Roger Pau Monné Reviewed-by: S

Re: [PATCH 2/6] automation: add timestamps to QEMU non-smoke x86-64 test

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Roger Pau Monne wrote: > Signed-off-by: Roger Pau Monné Same here please apply to the other qemu-* scripts too Reviewed-by: Stefano Stabellini > --- > automation/scripts/qemu-alpine-x86_64.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/automa

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Stefano Stabellini wrote: > On Thu, 16 Nov 2023, Roger Pau Monne wrote: > > The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" > > sequence on the web interface used as line returns by the Linux kernel > > serial > > output. This leads to the QEMU te

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Roger Pau Monne wrote: > The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" > sequence on the web interface used as line returns by the Linux kernel serial > output. This leads to the QEMU tests output looking like: > > (XEN) Guest Loglevel: Nothing

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

2023-11-16 Thread Stefano Stabellini
On Fri, 17 Nov 2023, Volodymyr Babchuk wrote: > > I still think, no matter the BDF allocation scheme, that we should try > > to avoid as much as possible to have two different PCI Root Complex > > emulators. Ideally we would have only one PCI Root Complex emulated by > > Xen. Having 2 PCI Root Comp

[linux-linus test] 183773: regressions - FAIL

2023-11-16 Thread osstest service owner
flight 183773 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/183773/ 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. 183766 test-arm64-arm64-li

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

2023-11-16 Thread Stefano Stabellini
On Fri, 17 Nov 2023, Julien Grall wrote: > Hi Stefano, > > On 16/11/2023 23:28, Stefano Stabellini wrote: > > On Thu, 16 Nov 2023, Julien Grall wrote: > > > IIUC, this means that Xen will allocate the BDF. I think this will become > > > a > > > problem quite quickly as some of the PCI may need to

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

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Jan Beulich wrote: > On 16.11.2023 11:02, Nicola Vetrini wrote: > > On 2023-11-16 09:26, Jan Beulich wrote: > >> On 31.10.2023 11:20, Jan Beulich wrote: > >>> On 31.10.2023 11:03, Nicola Vetrini wrote: > On 2023-10-31 09:28, Nicola Vetrini wrote: > > On 2023-10-31 08:4

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > On Thu, 16 Nov 2023, Volodymyr Babchuk wrote: >> Hi Stefano, >> >> Stefano Stabellini writes: >> >> > + Stewart, Vikram >> > >> > On Wed, 15 Nov 2023, Oleksandr Tyshchenko wrote: >> >> On 15.11.23 14:33, Julien Grall wrote: >> >> > Thanks for adding

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

2023-11-16 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > On Thu, 16 Nov 2023, Julien Grall wrote: >> IIUC, this means that Xen will allocate the BDF. I think this will become a >> problem quite quickly as some of the PCI may need to be assigned at a >> specific >> vBDF (I have the intel graphic card in mind)

Re: [XEN PATCH v4 1/2] automation/eclair: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Jan Beulich wrote: > On 16.11.2023 09:45, Nicola Vetrini wrote: > > On 2023-11-15 12:22, Julien Grall wrote: > >> But I noticed you were using gcc-12 and originally thought it was a > >> mistake until I saw the second use. > >> > >> The advantage of a variable CC (and CXX) is

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

2023-11-16 Thread Julien Grall
Hi Stefano, On 16/11/2023 23:28, Stefano Stabellini wrote: On Thu, 16 Nov 2023, Julien Grall wrote: IIUC, this means that Xen will allocate the BDF. I think this will become a problem quite quickly as some of the PCI may need to be assigned at a specific vBDF (I have the intel graphic card in m

Re: Values generated by the ViryaOS uboot-script-gen do not work correctly on the Chromebook Snow

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Chuck Zmudzinski wrote: > On 11/15/2023 7:07 PM, Mario Marietto wrote: > > It didn't work. This is the scr file generated. > > > > ext2load mmc 1:3 0x5100 zImage-6.6.0-xen-iommu-dma-on-xen > > ext2load mmc 1:3 0x6000 xen-4.17-armhf.ub > > When you created the xen-4.17

xen | Successful pipeline for RELEASE-4.18.0 | d75f1e9b

2023-11-16 Thread GitLab
Pipeline #1075582892 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: RELEASE-4.18.0 ( https://gitlab.com/xen-project/xen/-/commits/RELEASE-4.18.0 ) Commit: d75f1e9b ( https://gitlab.com/xen-project/xen/-/commit/d75f1e9b74314cea91ce435730d4e3539ecca77d ) Commit Message

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

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Julien Grall wrote: > IIUC, this means that Xen will allocate the BDF. I think this will become a > problem quite quickly as some of the PCI may need to be assigned at a specific > vBDF (I have the intel graphic card in mind). > > Also, xl allows you to specificy the slot (e.g

Re: [PATCH] arm/mm: add option to prefer IOMMU ops for DMA on Xen

2023-11-16 Thread Stefano Stabellini
My guess is that the issue is one of these two: 1) version mismatch between Xen and Xen tools E.g. Xen from staging and Xen Tools from 4.18 2) missing Xen modules in Linux Dom0 Was /etc/init.d/xencommons run at boot? Is /proc/xen mounted? Are the privcmd, gntdev, xenfs, modules loaded

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Stefano Stabellini
On Thu, 16 Nov 2023, Volodymyr Babchuk wrote: > Hi Stefano, > > Stefano Stabellini writes: > > > + Stewart, Vikram > > > > On Wed, 15 Nov 2023, Oleksandr Tyshchenko wrote: > >> On 15.11.23 14:33, Julien Grall wrote: > >> > Thanks for adding support for virtio-pci in Xen. I have some questions. >

xen | Successful pipeline for staging-4.18 | d75f1e9b

2023-11-16 Thread GitLab
Pipeline #1075579727 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging-4.18 ( https://gitlab.com/xen-project/xen/-/commits/staging-4.18 ) Commit: d75f1e9b ( https://gitlab.com/xen-project/xen/-/commit/d75f1e9b74314cea91ce435730d4e3539ecca77d ) Commit Message: SU

[xen-4.18-testing test] 183772: tolerable FAIL - PUSHED

2023-11-16 Thread osstest service owner
flight 183772 xen-4.18-testing real [real] flight 183776 xen-4.18-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183772/ http://logs.test-lab.xenproject.org/osstest/logs/183776/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): t

Re: [PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Gustavo A. R. Silva
On 11/16/23 15:08, Kees Cook wrote: On Thu, Nov 16, 2023 at 12:54:59PM -0600, Gustavo A. R. Silva wrote: Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in `s

Re: [PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Kees Cook
On Thu, Nov 16, 2023 at 12:54:59PM -0600, Gustavo A. R. Silva wrote: > Fake flexible arrays (zero-length and one-element arrays) are deprecated, > and should be replaced by flexible-array members. So, replace > zero-length array with a flexible-array member in `struct > privcmd_kernel_ioreq`. > >

[PATCH] xenstored: print domain id in traces

2023-11-16 Thread Volodymyr Babchuk
It is very helpful to see domain id why analyzing xenstored traces. Especially when you are trying to understand which exactly domain performs an action. Signed-off-by: Volodymyr Babchuk --- tools/xenstored/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xens

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

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

[PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Gustavo A. R. Silva
Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in `struct privcmd_kernel_ioreq`. Also annotate array `ports` with `__counted_by()` to prepare for the coming imple

xen | Failed pipeline for staging | 6cd046c5

2023-11-16 Thread GitLab
Pipeline #1075032586 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: 6cd046c5 ( https://gitlab.com/xen-project/xen/-/commit/6cd046c501bce48cdc42f597fc7a023aa08853e7 ) Commit Message: xen/arm: Enla

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Julien Grall
Hi Volodymyr, On 16/11/2023 16:53, Volodymyr Babchuk wrote: Julien Grall writes: On 16/11/2023 15:26, Stewart Hildebrand wrote: On 11/16/23 10:12, Julien Grall wrote: Hi Volodymyr, On 16/11/2023 15:07, Volodymyr Babchuk wrote: With my vPCI patch series in place, hypervisor itself assigns B

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Volodymyr Babchuk
Hi Julien, Julien Grall writes: > On 16/11/2023 15:26, Stewart Hildebrand wrote: >> On 11/16/23 10:12, Julien Grall wrote: >>> Hi Volodymyr, >>> >>> On 16/11/2023 15:07, Volodymyr Babchuk wrote: With my vPCI patch series in place, hypervisor itself assigns BDFs for passed-through dev

xen | Failed pipeline for staging | c419d2dd

2023-11-16 Thread GitLab
Pipeline #1074996588 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: c419d2dd ( https://gitlab.com/xen-project/xen/-/commit/c419d2dd351c170ab7b44459b7f121599b23293d ) Commit Message: xen/arm: Skip

Re: [PATCH v2] xen/sched: fix sched_move_domain()

2023-11-16 Thread George Dunlap
On Tue, Nov 14, 2023 at 1:30 PM Juergen Gross wrote: > > When moving a domain out of a cpupool running with the credit2 > scheduler and having multiple run-queues, the following ASSERT() can > be observed: > > (XEN) Xen call trace: > (XEN)[] R credit2.c#csched2_unit_remove+0xe3/0xe7 > (XEN)

Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-16 Thread Andrew Cooper
On 16/11/2023 4:15 pm, James Dingwall wrote: > Hi, > > Per the msr_relaxed documentation: > >"If using this option is necessary to fix an issue, please report a bug." > > After recently upgrading an environment from Xen 4.14.5 to Xen 4.15.5 we > started experiencing a BSOD at boot with one of o

Re: [PATCH for-4.18] SUPPORT.md: Define support lifetime

2023-11-16 Thread Olaf Hering
Wed, 15 Nov 2023 12:16:32 + Julien Grall : > +++ b/SUPPORT.md ... > Release Notes > : href="https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes";>RN This X.YY needs to be adjusted as well. Hopefully this detail is mentioned in the release-process.txt. Olaf pgpTREjV6gAqC.p

xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-16 Thread James Dingwall
Hi, Per the msr_relaxed documentation: "If using this option is necessary to fix an issue, please report a bug." After recently upgrading an environment from Xen 4.14.5 to Xen 4.15.5 we started experiencing a BSOD at boot with one of our Windows guests. We found that enabling `msr_relaxed =

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

2023-11-16 Thread Julien Grall
Hi Volodymyr, This patch was mentioned in another context about allocating the BDF. So I thought I would comment here as well. On 12/10/2023 23:09, Volodymyr Babchuk wrote: From: Oleksandr Andrushchenko Assign SBDF to the PCI devices being passed through with bus 0. The resulting topology i

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Julien Grall
On 16/11/2023 15:26, Stewart Hildebrand wrote: On 11/16/23 10:12, Julien Grall wrote: Hi Volodymyr, On 16/11/2023 15:07, Volodymyr Babchuk wrote: With my vPCI patch series in place, hypervisor itself assigns BDFs for passed-through devices. Toolstack needs to get this information to know wh

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

2023-11-16 Thread osstest service owner
flight 183769 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183769/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-raw 15 saverestore-support-check fail blocked in 183765 test-armhf-armhf-libvirt 16 s

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-11-16 Thread Leo Yan
On Thu, Nov 16, 2023 at 02:21:18PM +, Julien Grall wrote: [...] > I have done the changes and directly committed the series. So no need to > respin. Thanks a lot, Julien! Leo

Re: Values generated by the ViryaOS uboot-script-gen do not work correctly on the Chromebook Snow

2023-11-16 Thread Chuck Zmudzinski
On 11/15/2023 7:07 PM, Mario Marietto wrote: > It didn't work. This is the scr file generated. > > ext2load mmc 1:3 0x5100 zImage-6.6.0-xen-iommu-dma-on-xen > ext2load mmc 1:3 0x6000 xen-4.17-armhf.ub When you created the xen-4.17-armhf.ub file, do you remember what the LOADADDR and entry

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Stewart Hildebrand
On 11/16/23 10:12, Julien Grall wrote: > Hi Volodymyr, > > On 16/11/2023 15:07, Volodymyr Babchuk wrote: >> With my vPCI patch series in place, hypervisor itself assigns BDFs for >> passed-through devices. Toolstack needs to get this information to know >> which BDFs are free and can be used by vi

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > + Stewart, Vikram > > On Wed, 15 Nov 2023, Oleksandr Tyshchenko wrote: >> On 15.11.23 14:33, Julien Grall wrote: >> > Thanks for adding support for virtio-pci in Xen. I have some questions. >> > >> > On 15/11/2023 11:26, Sergiy Kibrik wrote: >> >> From

Re: [PATCH] arm/mm: add option to prefer IOMMU ops for DMA on Xen

2023-11-16 Thread Mario Marietto
I've found a similar error on this post,made on 2012 : https://groups.google.com/g/qubes-devel/c/W1lM4ELuVVI and according to what has been asked there,I want to post some further relevant informations to help you to help me to debug the problem : root@devuan-bunsen:/Dati/xen# xl dmesg ---> ht

Re: [PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Jan Beulich
On 16.11.2023 15:48, Roger Pau Monné wrote: > On Thu, Nov 16, 2023 at 03:05:20PM +0100, Jan Beulich wrote: >> On 16.11.2023 14:54, Roger Pau Monné wrote: >>> On Thu, Nov 16, 2023 at 01:39:27PM +0100, Jan Beulich wrote: On 16.11.2023 12:58, Roger Pau Monne wrote: > --- a/xen/include/public/

Re: [RFC PATCH 2/6] xen/public: arch-arm: reserve resources for virtio-pci

2023-11-16 Thread Julien Grall
Hi Volodymyr, On 16/11/2023 15:07, Volodymyr Babchuk wrote: With my vPCI patch series in place, hypervisor itself assigns BDFs for passed-through devices. Toolstack needs to get this information to know which BDFs are free and can be used by virtio-pci. It sounds a bit odd to let the hyperviso

[PATCH v9 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-11-16 Thread Henry Wang
From: Penny Zheng Current P2M implementation is designed for MMU system only. We move the MMU-specific codes into mmu/p2m.c, and only keep generic codes in p2m.c, like VMID allocator, etc. We also move MMU-specific definitions and declarations to mmu/p2m.h, such as p2m_tlb_flush_sync(). Also expo

[PATCH v9 7/8] xen/arm: Rename init_secondary_pagetables() to prepare_secondary_mm()

2023-11-16 Thread Henry Wang
From: Penny Zheng init_secondary_pagetables() is a function in the common code path of both MMU and future MPU support. Since "page table" is a MMU specific concept, rename init_secondary_pagetables() to a generic name prepare_secondary_mm() as the preparation for MPU support. Reword the in-code

[PATCH v9 4/8] xen/arm: Extract MMU-specific MM code

2023-11-16 Thread Henry Wang
Currently, most of the code is in arm/mm.{c,h} and arm/arm64/mm.c is MMU-specific. To make the MM code extendable, this commit extracts the MMU-specific MM code. Extract the boot CPU MM bringup code from arm/mm.c to mmu/setup.c. While moving, mark pte_of_xenaddr() as __init to make clear that this

[PATCH v9 5/8] xen/arm: Split MMU-specific setup_mm() and related code out

2023-11-16 Thread Henry Wang
setup_mm() is used for Xen to setup memory management subsystem, such as boot allocator, direct-mapping, xenheap initialization, frametable and static memory pages, at boot time. We could inherit some components seamlessly for MPU support, such as the setup of boot allocator, whilst we need to imp

[PATCH v9 2/8] xen/arm: Split MMU system SMP MM bringup code to mmu/smpboot.c

2023-11-16 Thread Henry Wang
Move the code related to secondary page table initialization, clear boot page tables and the global variable definitions of these boot page tables from arch/arm/mm.c to arch/arm/mmu/smpboot.c Since arm32 global variable cpu0_pgtable will be used by both arch/arm/mm.c and arch/arm/mmu/smpboot.c, to

[PATCH v9 0/8] xen/arm: Split MMU code as the prepration of MPU work

2023-11-16 Thread Henry Wang
Based on the discussion in the Xen Summit [1], sending this series out after addressing the comments in v8 [2] as the preparation work to add MPU support. Mostly code movement and function folding, with some of Kconfig and build system (mainly Makefiles) adjustment. This series is based on: 6cd04

[PATCH v9 6/8] xen/arm: Fold pmap and fixmap into MMU system

2023-11-16 Thread Henry Wang
fixmap and pmap are MMU-specific features, so fold them to the MMU system. Do the folding for pmap by moving the HAS_PMAP Kconfig selection under MMU. Since none of the definitions in asm/fixmap.h actually makes sense for the MPU, so do the folding for fixmap by limiting the inclusion of asm/fixmap

[PATCH v9 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S

2023-11-16 Thread Henry Wang
Currently mmu_init_secondary_cpu() only enforces the page table should not contain mapping that are both Writable and eXecutables after boot. To ease the arch/arm/mm.c split work, fold this function to head.S. For arm32, the WXN bit cannot be set early because at the point when the MMU is enabled,

[PATCH v9 1/8] xen/arm: Split page table related code to mmu/pt.c

2023-11-16 Thread Henry Wang
The extraction of MMU related code is the basis of MPU support. This commit starts this work by firstly splitting the page table related code to mmu/pt.c, so that we will not end up with again massive mm.c files. Introduce a mmu specific directory and setup the Makefiles for it. Move the page tabl

Re: [PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Roger Pau Monné
On Thu, Nov 16, 2023 at 03:05:20PM +0100, Jan Beulich wrote: > On 16.11.2023 14:54, Roger Pau Monné wrote: > > On Thu, Nov 16, 2023 at 01:39:27PM +0100, Jan Beulich wrote: > >> On 16.11.2023 12:58, Roger Pau Monne wrote: > >>> --- a/xen/include/public/sysctl.h > >>> +++ b/xen/include/public/sysctl.

xen | Failed pipeline for staging-4.18 | 3ddbddf1

2023-11-16 Thread GitLab
Pipeline #1074767865 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: 3ddbddf1 ( https://gitlab.com/xen-project/xen/-/commit/3ddbddf143fbd164c55e46c5a276f6606e5cc843 ) Commit Message: SU

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-11-16 Thread Julien Grall
Hi Leo, On 06/11/2023 09:45, Leo Yan wrote: Hi Julien, On Mon, Nov 06, 2023 at 09:39:24AM +, Julien Grall wrote: [...] I would like to check if here is anything specific I should follow up on. Based on the discussion in this thread, I've come to the following conclusions: - Remove the f

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

2023-11-16 Thread Julien Grall
On 16/11/2023 14:07, Julien Grall wrote: On 30/10/2023 08:28, Michal Orzel wrote: Hi Ayan, On 27/10/2023 20:07, Ayan Kumar Halder wrote: Before the MMU is turned on, PC uses physical address. Thus, one can use adr_l instead of load_paddr to obtain the physical address of a symbol. The only e

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

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

Re: [PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Jan Beulich
On 16.11.2023 14:54, Roger Pau Monné wrote: > On Thu, Nov 16, 2023 at 01:39:27PM +0100, Jan Beulich wrote: >> On 16.11.2023 12:58, Roger Pau Monne wrote: >>> --- a/xen/include/public/sysctl.h >>> +++ b/xen/include/public/sysctl.h >>> @@ -991,10 +991,7 @@ struct livepatch_func { >>> uint32_t ne

Re: [PATCH v4] xen/arm: Skip memory nodes if not enabled

2023-11-16 Thread Julien Grall
Hi, On 06/11/2023 11:31, Julien Grall wrote: On 06/11/2023 10:32, Leo Yan wrote: Hi Julien, On Mon, Nov 06, 2023 at 09:52:45AM +, Julien Grall wrote: [...] Gentle ping. I don't see this patch is landed in Xen master or staging branch, should anything I need to follow up? The tree

Re: [PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Roger Pau Monné
On Thu, Nov 16, 2023 at 01:39:27PM +0100, Jan Beulich wrote: > On 16.11.2023 12:58, Roger Pau Monne wrote: > > --- a/xen/include/public/sysctl.h > > +++ b/xen/include/public/sysctl.h > > @@ -991,10 +991,7 @@ struct livepatch_func { > > uint32_t new_size; > > uint32_t old_size; > > ui

[PATCH v2 5/5] x86/vPIC: check values loaded from state save record

2023-11-16 Thread Jan Beulich
Loading is_master from the state save record can lead to out-of-bounds accesses via at least the two container_of() uses by vpic_domain() and __vpic_lock(). Make sure the value is consistent with the instance being loaded. For ->int_output (which for whatever reason isn't a 1-bit bitfield), beside

[PATCH v2 4/5] x86/vPIT: check values loaded from state save record

2023-11-16 Thread Jan Beulich
In particular pit_latch_status() and speaker_ioport_read() perform calculations which assume in-bounds values. Several of the state save record fields can hold wider ranges, though. Refuse to load values which cannot result from normal operation, except mode, the init state of which (see also below

[PATCH v2 3/5] x86/HVM: adjust save/restore hook registration for optional check handler

2023-11-16 Thread Jan Beulich
Register NULL uniformly as a first step. Signed-off-by: Jan Beulich --- v2: New. --- a/xen/arch/x86/cpu/mcheck/vmce.c +++ b/xen/arch/x86/cpu/mcheck/vmce.c @@ -374,7 +374,7 @@ static int cf_check vmce_load_vcpu_ctxt( return err ?: vmce_restore_vcpu(v, &ctxt); } -HVM_REGISTER_SAVE_RESTORE(

[PATCH v2 2/5] x86/HVM: split restore state checking from state loading

2023-11-16 Thread Jan Beulich
..., at least as reasonably feasible without making a check hook mandatory (in particular strict vs relaxed/zero-extend length checking can't be done early this way). Note that only one of the two uses of hvm_load() is accompanied with hvm_check(). The other directly consumes hvm_save() output, wh

[PATCH v2 1/5] x86/HVM: introduce hvm_point_entry()

2023-11-16 Thread Jan Beulich
... to accompany hvm_read_entry() when actual copying isn't desirable. This allows to remove open-coded stream accesses from hpet_load(), along with using the helper in hvm_load() itself. Since arch_hvm_load()'s declaration would need changing, and since the function is not used from elsewhere, pu

[PATCH v2 0/5] x86/HVM: load state checking

2023-11-16 Thread Jan Beulich
With the request to convert bounding to actual refusal, and then doing so in new hooks, the two previously separate patches now need to be in a series, with infrastructure work done first. Clearly the checking in other load handlers could (and likely wants to be) moved to separate check handlers as

[PATCH 5/5] x86/HVM: improve CET-IBT pruning of ENDBR

2023-11-16 Thread Jan Beulich
__init{const,data}_cf_clobber can have an effect only for pointers actually populated in the respective tables. While not the case for SVM right now, VMX installs a number of pointers only under certain conditions. Hence the respective functions would have their ENDBR purged only when those conditi

[PATCH 4/5] x86/HVM: drop tsc_scaling.setup() hook

2023-11-16 Thread Jan Beulich
This was used by VMX only, and the intended VMCS write can as well happen from vmx_set_tsc_offset(), invoked (directly or indirectly) almost immediately after the present call sites of the hook. vmx_set_tsc_offset() isn't invoked frequently elsewhere, so the extra VMCS write shouldn't raise perform

[PATCH 3/5] VMX: don't run with CR4.VMXE set when VMX could not be enabled

2023-11-16 Thread Jan Beulich
While generally benign, doing so is still at best misleading. Signed-off-by: Jan Beulich --- Using set_in_cr4() seems favorable over updating mmu_cr4_features despite the resulting redundant CR4 update. But I certainly could be talked into going the alternative route. --- a/xen/arch/x86/hvm/vmx/

[PATCH 2/5] x86/HVM: hide SVM/VMX when their enabling is prohibited by firmware

2023-11-16 Thread Jan Beulich
... or we fail to enable the functionality on the BSP for other reasons. The only place where hardware announcing the feature is recorded is the raw CPU policy/featureset. Inspired by https://lore.kernel.org/all/20230921114940.957141-1-pbonz...@redhat.com/. Signed-off-by: Jan Beulich --- a/xen

[PATCH 1/5] VMX: drop vmx_virt_exception and make vmx_vmfunc static

2023-11-16 Thread Jan Beulich
The variable was introduced by 69b830e5ffb4 ("VMX: VMFUNC and #VE definitions and detection") without any use and - violating Misra C:2012 rule 8.4 - without a declaration. Since no use has appeared, drop it. For vmx_vmfunc the situation is similar, but not identical: It at least has one use. Conv

[PATCH 0/5] x86/HVM: misc tidying

2023-11-16 Thread Jan Beulich
1: VMX: drop vmx_virt_exception and make vmx_vmfunc static 2: x86/HVM: hide SVM/VMX when their enabling is prohibited by firmware 3: VMX: don't run with CR4.VMXE set when VMX could not be enabled 4: x86/HVM: drop tsc_scaling.setup() hook 5: x86/HVM: improve CET-IBT pruning of ENDBR Jan

Re: [GIT PULL] xen: branch for v6.7-rc2

2023-11-16 Thread pr-tracker-bot
The pull request you sent on Thu, 16 Nov 2023 12:42:41 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.7a-rc2-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6eb1acd9766a0dc9d85927843d85787408395e15 Thank you! -- Deet-doot-dot, I

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

2023-11-16 Thread osstest service owner
flight 183766 linux-linus real [real] flight 183771 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183766/ http://logs.test-lab.xenproject.org/osstest/logs/183771/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-

Re: [PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Jan Beulich
On 16.11.2023 12:58, Roger Pau Monne wrote: > --- a/xen/include/public/sysctl.h > +++ b/xen/include/public/sysctl.h > @@ -991,10 +991,7 @@ struct livepatch_func { > uint32_t new_size; > uint32_t old_size; > uint8_t version;/* MUST be LIVEPATCH_PAYLOAD_VERSION. */ > -uint8

Re: [PATCH v2 08/15] xen/asm-generic: introduce generic header percpu.h

2023-11-16 Thread Jan Beulich
On 16.11.2023 13:04, Oleksii wrote: > On Thu, 2023-11-16 at 08:36 +0100, Jan Beulich wrote: >> On 10.11.2023 17:30, Oleksii Kurochko wrote: >>> --- /dev/null >>> +++ b/xen/include/asm-generic/percpu.h >>> @@ -0,0 +1,35 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-only */ >>> +#ifndef __ASM_GENERIC_P

[PATCH 6/6] automation: switch to multi-platform images when possible

2023-11-16 Thread Roger Pau Monne
Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option. Signed-off-by: Roger Pau Monné --- I haven't touched the Yocto dockerfile because I'm not sure how it's used. --- automation/build/alpine/3.18-arm64v8.d

[PATCH 1/6] automation: remove CR characters from QEMU serial

2023-11-16 Thread Roger Pau Monne
The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like: (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial i

[PATCH 0/6] automation: minor fixes and improvements

2023-11-16 Thread Roger Pau Monne
Hello, Some assorted minor fixes and improvements, as a result of work I'm doing to expand the tests. I've done a full run with the updated containers, and found no major issues: https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137 There's however one tests that fails with th

[PATCH 5/6] automation: set architecture in docker files

2023-11-16 Thread Roger Pau Monne
Pass the desired architecture of the image in the FROM instruction if the image is possibly multi-platform. This allows using the x86 Dockerfiles on OS X on arm64 hardware. No functional change intended. Signed-off-by: Roger Pau Monné --- I haven't touched the Yocto dockerfile because I'm not s

[PATCH 2/6] automation: add timestamps to QEMU non-smoke x86-64 test

2023-11-16 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- automation/scripts/qemu-alpine-x86_64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh index a1c41c030a47..8e398dcea34b 100755 --- a/automation/scripts/qem

[PATCH 3/6] automation: fix jessie/stretch images to use archive.debian.org apt repos

2023-11-16 Thread Roger Pau Monne
Otherwise it's impossible to build the images. Signed-off-by: Roger Pau Monné --- automation/build/debian/jessie-i386.dockerfile | 7 +++ automation/build/debian/jessie.dockerfile | 7 +++ automation/build/debian/stretch-i386.dockerfile | 7 +++ automation/build/debian/stretch

[PATCH 4/6] automation: update tests to use Debian Bookworm

2023-11-16 Thread Roger Pau Monne
Switch tests using Stretch to Bookworm, as Stretch is EOL. Note the packages are not removed from the Stretch dockerfile, because the tests in stable branches will run using the old containers. Signed-off-by: Roger Pau Monné --- The Bookworm container needs to be updated to contain the required

Re: [PATCH v2 08/15] xen/asm-generic: introduce generic header percpu.h

2023-11-16 Thread Oleksii
On Thu, 2023-11-16 at 08:36 +0100, Jan Beulich wrote: > On 10.11.2023 17:30, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/include/asm-generic/percpu.h > > @@ -0,0 +1,35 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef __ASM_GENERIC_PERCPU_H__ > > +#define __ASM_GENERIC_PE

[PATCH] livepatch: do not use .livepatch.funcs section to store internal state

2023-11-16 Thread Roger Pau Monne
Currently the livepatch logic inside of Xen will use fields of struct livepatch_func in order to cache internal state of patched functions. Note this is a field that is part of the payload, and is loaded as an ELF section (.livepatch.funcs), taking into account the SHF_* flags in the section heade

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

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

[GIT PULL] xen: branch for v6.7-rc2

2023-11-16 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-6.7a-rc2-tag xen: branch for v6.7-rc2 It contains the following patches: - A fix in the Xen events driver avoiding to use RCU after the call of rcu_report_dead() when taking a cpu

Re: 4.18 vs mini-os

2023-11-16 Thread Juergen Gross
On 16.11.23 12:03, Julien Grall wrote: + Juergen On 16/11/2023 07:52, Jan Beulich wrote: All, Hi Jan, may I ask on what basis the xen-RELEASE-4.18.0 tag placement was chosen? It matches the 4.17 ones, despite there having been new commits from Jürgen dating back to January / February. (My o

Re: 4.18 vs mini-os

2023-11-16 Thread Julien Grall
+ Juergen On 16/11/2023 07:52, Jan Beulich wrote: All, Hi Jan, may I ask on what basis the xen-RELEASE-4.18.0 tag placement was chosen? It matches the 4.17 ones, despite there having been new commits from Jürgen dating back to January / February. (My own build fix would have been nice to hav

Re: [PATCH for-4.18] SUPPORT.md: Define support lifetime

2023-11-16 Thread Julien Grall
Hi Jan, On 16/11/2023 08:32, Jan Beulich wrote: On 15.11.2023 13:35, Julien Grall wrote: Hi Henry, On 15/11/2023 12:27, Henry Wang wrote: On Nov 15, 2023, at 20:16, Julien Grall wrote: From: Julien Grall Signed-off-by: Julien Grall --- SUPPORT.md | 8 1 file changed, 4 insertions

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

2023-11-16 Thread Jan Beulich
On 16.11.2023 11:02, Nicola Vetrini wrote: > On 2023-11-16 09:26, Jan Beulich wrote: >> On 31.10.2023 11:20, Jan Beulich wrote: >>> On 31.10.2023 11:03, Nicola Vetrini wrote: On 2023-10-31 09:28, Nicola Vetrini wrote: > On 2023-10-31 08:43, Jan Beulich wrote: >> On 30.10.2023 23:44, St

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

2023-11-16 Thread Nicola Vetrini
On 2023-11-16 09:26, Jan Beulich wrote: On 31.10.2023 11:20, Jan Beulich wrote: On 31.10.2023 11:03, Nicola Vetrini wrote: On 2023-10-31 09:28, Nicola Vetrini wrote: On 2023-10-31 08:43, Jan Beulich wrote: On 30.10.2023 23:44, Stefano Stabellini wrote: On Mon, 30 Oct 2023, Jan Beulich wrote:

Re: [Discussion]: Making "LIBXL_HOTPLUG_TIMEOUT" configurable through 'xl.conf'

2023-11-16 Thread Olaf Hering
Thu, 16 Nov 2023 09:21:06 + Luca Fancellu : > I see your patch is handling this issue but maybe was not meant to be > upstreamed, > so I would like to ask if you are willing to make it upstream-able or if it’s > not planned > to do so. Right now I do not have the time to work on this. Firs

  1   2   >