Re: [PATCH v1 1/4] kasan: Avoid sleepable page allocation from atomic context

2025-04-10 Thread Nicholas Piggin
On Tue Apr 8, 2025 at 1:11 AM AEST, Alexander Gordeev wrote: > apply_to_page_range() enters lazy MMU mode and then invokes > kasan_populate_vmalloc_pte() callback on each page table walk > iteration. The lazy MMU mode may only be entered only under > protection of the page table lock. However, the

Re: [PATCH v1 3/4] mm: Protect kernel pgtables in apply_to_pte_range()

2025-04-10 Thread Nicholas Piggin
On Tue Apr 8, 2025 at 1:11 AM AEST, Alexander Gordeev wrote: > The lazy MMU mode can only be entered and left under the protection > of the page table locks for all page tables which may be modified. > Yet, when it comes to kernel mappings apply_to_pte_range() does not > take any locks. That does n

Re: [PATCH v1 2/4] mm: Cleanup apply_to_pte_range() routine

2025-04-10 Thread Nicholas Piggin
On Tue Apr 8, 2025 at 1:11 AM AEST, Alexander Gordeev wrote: > Reverse 'create' vs 'mm == &init_mm' conditions and move > page table mask modification out of the atomic context. > > Signed-off-by: Alexander Gordeev > --- > mm/memory.c | 28 +--- > 1 file changed, 17 insert

Re: [PATCH v1 1/4] kasan: Avoid sleepable page allocation from atomic context

2025-04-10 Thread Nicholas Piggin
On Tue Apr 8, 2025 at 1:11 AM AEST, Alexander Gordeev wrote: > apply_to_page_range() enters lazy MMU mode and then invokes > kasan_populate_vmalloc_pte() callback on each page table walk > iteration. The lazy MMU mode may only be entered only under > protection of the page table lock. However, the

Re: [PATCH v2 2/8] vpci/header: Emulate legacy capability list for host

2025-04-10 Thread Chen, Jiqian
On 2025/4/10 20:40, Jan Beulich wrote: > On 09.04.2025 08:45, Jiqian Chen wrote: >> Current logic of init_header() only emulates legacy capability list >> for guest, expand it to emulate for host too. So that it will be >> easy to hide a capability whose initialization fails and no need >> to disti

Re: [PATCH v2 1/8] driver/pci: Get next capability without passing caps

2025-04-10 Thread Chen, Jiqian
On 2025/4/10 20:34, Jan Beulich wrote: > On 09.04.2025 08:45, Jiqian Chen wrote: >> --- a/xen/drivers/pci/pci.c >> +++ b/xen/drivers/pci/pci.c >> @@ -40,7 +40,7 @@ unsigned int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned >> int cap) >> } >> >> unsigned int pci_find_next_cap_ttl(pci_sbdf_t sb

Re: [PATCH 2/4] Overhaul how Argo is built and packged

2025-04-10 Thread Denis Mukhin
On Thursday, April 10th, 2025 at 2:37 PM, Andrew Cooper wrote: > > > Right now, the argo artefacts are a pile of files which the test has to turn > back into something which resembles a filesystem. Furthermore, because we do > not build modules for the main kernel, it is extra important to mak

Re: [PATCH] x86/mem-sharing: short-circuit p2m_is_shared() when MEM_SHARING=n

2025-04-10 Thread Tamas K Lengyel
On Thu, Apr 3, 2025 at 4:42 AM Jan Beulich wrote: > > Some of the uses of dom_cow aren't easily DCE-able (without extra > #ifdef-ary), and hence it being constantly NULL when MEM_SHARING=n > misguides Coverity into thinking that there may be a NULL deref in > > if ( p2m_is_shared(t) ) >

Re: [RFC PATCH v1 10/15] KVM: VMX: Use WRMSRNS or its immediate form when available

2025-04-10 Thread Sean Christopherson
On Mon, Mar 31, 2025, Xin Li (Intel) wrote: > Signed-off-by: Xin Li (Intel) > --- > arch/x86/include/asm/msr-index.h | 6 ++ > arch/x86/kvm/vmx/vmenter.S | 28 > 2 files changed, 30 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/include/asm/msr-in

Re: [PATCH] x86/HVM: improve local variable use in hvm_hap_nested_page_fault()

2025-04-10 Thread Andrew Cooper
On 09/04/2025 2:17 pm, Jan Beulich wrote: > First gfn can be set just once, rather than (conditionally) twice. This wants a comma after First, or you're implying "the first gfn can be..." which not the meaning you're trying to convey.  You also don't really want one before "rather". > And then gf

Re: [PATCH v3 13/16] x86/hyperlaunch: specify dom0 mode with device tree

2025-04-10 Thread Jan Beulich
On 08.04.2025 18:07, Alejandro Vallejo wrote: > --- a/xen/arch/x86/domain-builder/fdt.c > +++ b/xen/arch/x86/domain-builder/fdt.c > @@ -193,6 +193,25 @@ static int __init process_domain_node( > bd->domid = (domid_t)val; > printk(" domid: %d\n", bd->domid); > } >

[PATCH v3 0/4] Add support for R-Car Gen4 PCI host controller

2025-04-10 Thread Mykyta Poturai
This series adds support for R-Car Gen4 PCI host controller. To fully support the controller, the following changes were made: - Generic mechanism to support PCI child buses is added. - Private data for PCI host bridge and means to access it are added. The series was tested as a part of the pci-p

[PATCH v3 10/16] x86/hyperlaunch: obtain cmdline from device tree

2025-04-10 Thread Alejandro Vallejo
From: "Daniel P. Smith" Add support to read the command line from the hyperlauunch device tree. The device tree command line is located in the "bootargs" property of the "multiboot,kernel" node. A boot loader command line, e.g. a grub module string field, takes precendence ove the device tree on

Re: [PATCH v2 7/7] arm/mpu: Implement setup_mpu for MPU system

2025-04-10 Thread Ayan Kumar Halder
On 08/04/2025 14:51, Luca Fancellu wrote: Hi Ayan, Hi Luca, On 8 Apr 2025, at 14:32, Ayan Kumar Halder wrote: Hi Luca, On 07/04/2025 10:14, Luca Fancellu wrote: CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments

Re: [PATCH v2] xen/riscv: Increase XEN_VIRT_SIZE

2025-04-10 Thread Jan Beulich
On 09.04.2025 11:06, Oleksii Kurochko wrote: > On 4/8/25 4:04 PM, Jan Beulich wrote: >> On 08.04.2025 15:46, Oleksii Kurochko wrote: >>> On 4/8/25 2:02 PM, Jan Beulich wrote: On 08.04.2025 13:51, Oleksii Kurochko wrote: > On 4/7/25 12:09 PM, Jan Beulich wrote: >> On 04.04.2025 18:04, O

[PATCH 3/8] Fix container user setup

2025-04-10 Thread Andrew Cooper
Use USER (and 'user' as normal), rather than specifying configuration from the outside. This also fixes the fact that root-needing containers need to override the default. Signed-off-by: Andrew Cooper --- CC: Roger Pau Monné CC: Stefano Stabellini CC: Michal Orzel CC: Marek Marczykowski-Górec

Re: [PATCH 2/2] x86/hvm: fix write emulation of RO ranges

2025-04-10 Thread Roger Pau Monné
On Tue, Apr 08, 2025 at 03:00:28PM +0100, Andrew Cooper wrote: > On 08/04/2025 10:31 am, Roger Pau Monne wrote: > > When running on AMD hardware in HVM mode the guest linear address (GLA) > > will not be provided to hvm_emulate_one_mmio(), and instead is > > unconditionally set of ~0. As a consequ

Re: Ping: [PATCH] libxc/PM: correct (not just) error handling in xc_get_cpufreq_para()

2025-04-10 Thread Jan Beulich
On 07.04.2025 17:23, Anthony PERARD wrote: > On Mon, Apr 07, 2025 at 03:23:48PM +0200, Jan Beulich wrote: >> On 07.04.2025 14:45, Anthony PERARD wrote: >>> On Mon, Apr 07, 2025 at 01:38:24PM +0200, Jan Beulich wrote: On 27.03.2025 14:32, Jan Beulich wrote: > From their introduction all xc_

[PATCH v2 1/3] kasan: Avoid sleepable page allocation from atomic context

2025-04-10 Thread Alexander Gordeev
apply_to_page_range() enters lazy MMU mode and then invokes kasan_populate_vmalloc_pte() callback on each page table walk iteration. The lazy MMU mode may only be entered only under protection of the page table lock. However, the callback can go into sleep when trying to allocate a single page. Ch

[PATCH 5/6] Infrastructure for arm64 linux builds

2025-04-10 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Roger Pau Monné CC: Stefano Stabellini CC: Michal Orzel CC: Marek Marczykowski-Górecki CC: Anthony PERARD v2: * Drop musl-dev. It's brought in by build-base. * Include findutils to fix build warnings. --- .gitlab-ci.yml| 7

[PATCH v3 03/16] x86/boot: add cmdline to struct boot_domain

2025-04-10 Thread Alejandro Vallejo
From: "Daniel P. Smith" Add a container for the "cooked" command line for a domain. This provides for the backing memory to be directly associated with the domain being constructed. This is done in anticipation that the domain construction path may need to be invoked multiple times, thus ensurin

Re: [PATCH v3 09/16] x86/hyperlaunch: locate dom0 kernel with hyperlaunch

2025-04-10 Thread Jan Beulich
On 08.04.2025 18:07, Alejandro Vallejo wrote: > From: "Daniel P. Smith" > > Look for a subnode of type `multiboot,kernel` within a domain node. If > found, locate it using the multiboot module helper to generically ensure > it lives in the module list. If the bootargs property is present and > th

[PATCH] x86/xen: disable CPU idle and frequency drivers for PVH dom0

2025-04-10 Thread Roger Pau Monne
When running as a PVH dom0 the ACPI tables exposed to Linux are (mostly) the native ones, thus exposing the C and P states, that can lead to attachment of CPU idle and frequency drivers. However the entity in control of the CPU C and P states is Xen, as dom0 doesn't have a full view of the system

Re: [PATCH v3 03/16] x86/boot: add cmdline to struct boot_domain

2025-04-10 Thread Alejandro Vallejo
On Wed Apr 9, 2025 at 7:48 AM BST, Jan Beulich wrote: > On 08.04.2025 18:07, Alejandro Vallejo wrote: >> From: "Daniel P. Smith" >> >> Add a container for the "cooked" command line for a domain. This >> provides for the backing memory to be directly associated with the >> domain being constructed

[PATCH v3 16/16] x86/hyperlaunch: add capabilities to boot domain

2025-04-10 Thread Alejandro Vallejo
From: "Daniel P. Smith" Introduce the ability to assign capabilities to a domain via its definition in device tree. The first capability enabled to select is the control domain capability. The capability property is a bitfield in both the device tree and `struct boot_domain`. Signed-off-by: Dani

Re: [PATCH v2 3/3] mm: Protect kernel pgtables in apply_to_pte_range()

2025-04-10 Thread Andrew Morton
On Thu, 10 Apr 2025 16:50:33 +0200 Alexander Gordeev wrote: > On Tue, Apr 08, 2025 at 06:07:32PM +0200, Alexander Gordeev wrote: > > Hi Andrew, > > > The lazy MMU mode can only be entered and left under the protection > > of the page table locks for all page tables which may be modified. > >

[PATCH v5 2/3] xen/arm32: Create the same boot-time MPU regions as arm64

2025-04-10 Thread Ayan Kumar Halder
We have created the same boot-time MPU protection regions as Armv8-R AArch64. Also, we have defined *_PRBAR macros for arm32. The only difference from arm64 is that XN is 1-bit for arm32. The macros have been defined in mpu/cpregs.h. Also defined WRITE_SYSREG_ASM() to write to system registers in

Re: [PATCH v3 05/16] kconfig: introduce domain builder config option

2025-04-10 Thread Jan Beulich
On 10.04.2025 14:52, Alejandro Vallejo wrote: > On Thu Apr 10, 2025 at 10:08 AM BST, Jan Beulich wrote: >> On 08.04.2025 18:07, Alejandro Vallejo wrote: >>> --- /dev/null >>> +++ b/xen/arch/x86/domain-builder/Kconfig >> >> This really looks to be the first patch where it needs settling on whether >

Re: [PATCH TEST-ARTEFACTS 0/8] Cleanup and Linux ARM64 support

2025-04-10 Thread Jason Andryuk
On 2025-04-10 17:16, Jason Andryuk wrote: On 2025-04-10 05:17, Andrew Cooper wrote: On 10/04/2025 1:09 am, Jason Andryuk wrote: On 2025-04-09 13:01, Andrew Cooper wrote: On 09/04/2025 5:36 pm, Andrew Cooper wrote: 6.6.74 is broken too.  (That's the revision that the ARM tests want). So it br

Re: [RFC PATCH] x86/xen: Fix PVH dom0 xen_hypercall detection

2025-04-10 Thread Andrew Cooper
On 10/04/2025 8:50 pm, Jason Andryuk wrote: > A Xen PVH dom0 on an AMD processor triple faults early in boot on > 6.6.86. CPU detection appears to fail, as the faulting instruction is > vmcall in xen_hypercall_intel() and not vmmcall in xen_hypercall_amd(). > > Detection fails because __xen_hyperc

[PATCH v5 0/3] Enable early bootup of Armv8-R AArch32 systems

2025-04-10 Thread Ayan Kumar Halder
Enable early booting of Armv8-R AArch32 based systems. Ayan Kumar Halder (3): xen/arm: Move some of the functions to common file xen/arm32: Create the same boot-time MPU regions as arm64 xen/arm32: mpu: Stubs to build MPU for arm32 xen/arch/arm/arm32/Makefile | 1 + xen/arch

Re: [PATCH v3 13/16] x86/hyperlaunch: specify dom0 mode with device tree

2025-04-10 Thread Jan Beulich
On 10.04.2025 00:24, Denis Mukhin wrote: > On Tuesday, April 8th, 2025 at 9:07 AM, Alejandro Vallejo > wrote: >> --- a/xen/arch/x86/domain-builder/fdt.c >> +++ b/xen/arch/x86/domain-builder/fdt.c >> @@ -193,6 +193,25 @@ static int __init process_domain_node( >> bd->domid = (domid_t)val; >> >> pri

[PATCH 3/4] Switch to fixed Argo

2025-04-10 Thread Andrew Cooper
https://github.com/OpenXT/linux-xen-argo/pull/21 Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Michal Orzel CC: Doug Goldstein CC: Marek Marczykowski-Górecki CC: Jason Andryuk CC: Daniel P. Smith Probably not for applying, but it would be really good if we

[PATCH XEN 4/4] CI: Switch to new argo artefact

2025-04-10 Thread Andrew Cooper
xen-argo.ko has moved into the standard location. In the short term, simply unpack argo.cpio.gz, but this can be simply concatinated with the base rootfs when it is constructed in a more convenient way. No practical change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabel

[PATCH 2/4] Overhaul how Argo is built and packged

2025-04-10 Thread Andrew Cooper
Right now, the argo artefacts are a pile of files which the test has to turn back into something which resembles a filesystem. Furthermore, because we do not build modules for the main kernel, it is extra important to make sure that xen-argo.ko doesn't get out of sync. Build argo unconditionally

[PATCH TEST-ARTEFACTS 0/4] Argo artefact

2025-04-10 Thread Andrew Cooper
Part 2 of the cleanup, reworking Argo. https://gitlab.com/xen-project/hardware/xen-staging/-/jobs/9690063969 Andrew Cooper (3): Rename and adjust x86 containers Overhaul how Argo is built and packged Switch to fixed Argo .gitlab-ci.yml| 6 +- containerize

[PATCH 1/4] Rename and adjust x86 containers

2025-04-10 Thread Andrew Cooper
Insert the Alpine version as we'll need a newer version in due course, and rename 'rootfs' to 'base' as the container really is not a rootfs on it's own. In base, add bash. It's added later by the rootfs generation anyway, but this way we can write the generation script in bash too. In build, gr

Re: [PATCH 7/8] Infrastructure for arm64 linux builds

2025-04-10 Thread Andrew Cooper
On 09/04/2025 5:37 pm, Andrew Cooper wrote: > diff --git a/images/alpine/3.18-arm64-build.dockerfile > b/images/alpine/3.18-arm64-build.dockerfile > new file mode 100644 > index ..c76ac435e8dd > --- /dev/null > +++ b/images/alpine/3.18-arm64-build.dockerfile > @@ -0,0 +1,27 @@ > +# syn

Re: [PATCH] x86/AMD: Convert rdmsr_amd_safe() to use asm goto()

2025-04-10 Thread Jan Beulich
On 07.04.2025 17:35, Andrew Cooper wrote: > Unlike the WRMSR side, we can't use asm goto() unconditionally, because our > toolchain baseline doesn't support asm goto with outputs. Is there actually a benefit we gain from now needing to maintain two different pieces of logic fulfilling the same pur

Re: [PATCH 2/8] Port containerise

2025-04-10 Thread Anthony PERARD
On Wed, Apr 09, 2025 at 05:36:56PM +0100, Andrew Cooper wrote: > +BASE="registry.gitlab.com/xen-project/hardware/test-artifacts" > +case "_${CONTAINER}" in > +_alpine-x86_64-base) CONTAINER="${BASE}/alpine:x86_64-base" ;; There's no "images/alpine/x86_64-base.dockerfile" in the repo, do you me

Re: [PATCH v4 1/3] xen/arm: Move some of the functions to common file

2025-04-10 Thread Ayan Kumar Halder
Hi Luca, On 04/04/2025 10:06, Luca Fancellu wrote: Hi Ayan, On 3 Apr 2025, at 18:12, Ayan Kumar Halder wrote: Added a new file prepare_xen_region.inc to hold the common earlyboot MPU regions configurations across arm64 and arm32. prepare_xen_region, fail_insufficient_regions() will be used

Re: [PATCH v3 06/16] x86/hyperlaunch: introduce the domain builder

2025-04-10 Thread Jan Beulich
On 08.04.2025 18:07, Alejandro Vallejo wrote: > --- a/xen/arch/x86/Makefile > +++ b/xen/arch/x86/Makefile > @@ -1,6 +1,7 @@ > obj-y += acpi/ > obj-y += boot/ > obj-y += cpu/ > +obj-y += domain-builder/ I continue to be irritated that this isn't obj-$(DOMAIN_BUILDER). The sole function in core.c

Re: [PATCH TEST-ARTEFACTS 0/8] Cleanup and Linux ARM64 support

2025-04-10 Thread Jason Andryuk
On 2025-04-10 05:17, Andrew Cooper wrote: On 10/04/2025 1:09 am, Jason Andryuk wrote: On 2025-04-09 13:01, Andrew Cooper wrote: On 09/04/2025 5:36 pm, Andrew Cooper wrote: 6.6.74 is broken too.  (That's the revision that the ARM tests want). So it broke somewhere between .56 and .74 which nar

Re: [RFC] xen/x86: allow overlaps with non-RAM regions

2025-04-10 Thread Jason Andryuk
On 2025-04-04 06:28, Roger Pau Monné wrote: On Thu, Apr 03, 2025 at 06:01:42PM -0700, Stefano Stabellini wrote: On one Sapphire AMD x86 board, I see this: (XEN) [003943ca6ff2] [f000, f7ff] (reserved) (XEN) [0039460886d9] [fd00, ] (r

Re: [PATCH v3 01/16] x86/boot: introduce boot domain

2025-04-10 Thread Jason Andryuk
On 2025-04-10 11:01, Jan Beulich wrote: On 10.04.2025 15:09, Daniel P. Smith wrote: On 4/9/25 02:24, Jan Beulich wrote: On 08.04.2025 18:07, Alejandro Vallejo wrote: From: "Daniel P. Smith" To begin moving toward allowing the hypervisor to construct more than one domain at boot, a container

Re: [PATCH v3 01/16] x86/boot: introduce boot domain

2025-04-10 Thread Jason Andryuk
On 2025-04-10 09:13, Daniel P. Smith wrote: On 4/9/25 06:28, Alejandro Vallejo wrote: On Wed Apr 9, 2025 at 7:24 AM BST, Jan Beulich wrote: On 08.04.2025 18:07, Alejandro Vallejo wrote: --- /dev/null +++ b/xen/arch/x86/include/asm/boot-domain.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL

Re: [RFC] xen/x86: allow overlaps with non-RAM regions

2025-04-10 Thread Jason Andryuk
On 2025-04-04 04:07, Jan Beulich wrote: On 04.04.2025 03:01, Stefano Stabellini wrote: On one Sapphire AMD x86 board, I see this: (XEN) [003943ca6ff2] [f000, f7ff] (reserved) (XEN) [0039460886d9] [fd00, ] (reserved) [...] (XEN) [

[PATCH] x86/msr: Standardize on 'u32' MSR indices in

2025-04-10 Thread Ingo Molnar
* Xin Li wrote: > On 4/1/2025 12:52 AM, Ingo Molnar wrote: > > > Should we rename the *msrl() functions to *msrq() as part of this > > > overhaul? > > Yeah, that's a good idea, and because talk is cheap I just implemented > > this in the tip:WIP.x86/msr branch with a couple of other cleanups in

[PATCH v4 0/2] Enable MC/DC support for GCC/GCOV

2025-04-10 Thread Volodymyr Babchuk
This series enables MC/DC for Xen when building with GCC. Condition coverage, also known as MC/DC (modified condition/decision coverage) is a coverage metric that tracks separate outcomes in boolean expressions. This metric is used in critical software components, so it natural to collect it for X

RE: [PATCH v3 12/15] xen/x86: implement EPP support for the amd-cppc driver in active mode

2025-04-10 Thread Penny, Zheng
[Public] Hi, > -Original Message- > From: Jan Beulich > Sent: Friday, March 28, 2025 3:18 PM > To: Penny, Zheng > Cc: Huang, Ray ; Andrew Cooper > ; Anthony PERARD ; > Orzel, Michal ; Julien Grall ; Roger > Pau Monné ; Stefano Stabellini ; > xen-devel@lists.xenproject.org > Subject: Re:

[PATCH v2 0/7] First chunk for Arm R82 and MPU support

2025-04-10 Thread Luca Fancellu
Hi all, This is the first chunk of work to support MPU and R82 on Xen, this serie reaches the early boot stages until setup_pagetables() which is not used for MPU but it is just to give an idea about which stage of the boot is reached. v2 changes for this serie: - rebased serie on the MPU skelet

[PATCH v2 3/8] vpci/header: Emulate extended capability list for host

2025-04-10 Thread Jiqian Chen
Add a new function to emulate extended capability list for host, and call it in init_header(). So that, it will be easy to hide a capability whose initialization fails. As for the extended capability list of guest, keep hiding it. Signed-off-by: Jiqian Chen --- cc: "Roger Pau Monné" --- v1->v2

Re: [PATCH v1 02/14] xen/riscv: introduce smp_clear_cpu_maps()

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > Initialize cpu_{possible, online, present}_map by using smp_clear_cpu_maps(). > > Drop DEFINE_PER_CPU(unsigned int, cpu_id) from stubs.c as this variable isn't > expected to be used in RISC-V at all. > > Move declaration of cpu_{possible,online,prese

[PATCH 2/2] x86/hvm: fix write emulation of RO ranges

2025-04-10 Thread Roger Pau Monne
When running on AMD hardware in HVM mode the guest linear address (GLA) will not be provided to hvm_emulate_one_mmio(), and instead is unconditionally set of ~0. As a consequence mmio_ro_emulated_write() will always report an error, as the fault GLA generated by the emulation of the access won't b

Re: New Defects reported by Coverity Scan for XenProject

2025-04-10 Thread Andrew Cooper
On 07/04/2025 8:26 am, Jan Beulich wrote: > On 06.04.2025 13:36, scan-ad...@coverity.com wrote: >> Hi, >> >> Please find the latest report on new defect(s) introduced to XenProject >> found with Coverity Scan. >> >> 1 new defect(s) introduced to XenProject found with Coverity Scan. >> >> >> New de

[PATCH v3 15/16] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree

2025-04-10 Thread Alejandro Vallejo
From: "Daniel P. Smith" Introduce the `cpus` property, named as such for dom0less compatibility, that represents the maximum number of vpcus to allocate for a domain. In the device tree, it will be encoded as a u32 value. Signed-off-by: Daniel P. Smith Reviewed-by: Jason Andryuk --- xen/arch/

Re: [XEN PATCH] automation/eclair: Remove bespoke service B.UNEVALEFF

2025-04-10 Thread Andrew Cooper
On 10/04/2025 9:17 pm, Nicola Vetrini wrote: > On 2025-04-10 22:08, Andrew Cooper wrote: >> On 10/04/2025 8:32 pm, Nicola Vetrini wrote: >>> The service is now part of the updated ECLAIR runner, therefore >>> redefining will result in an error. >>> >>> No functional change. >>> >>> Signed-off-by: N

Re: [XEN PATCH] automation/eclair: Remove bespoke service B.UNEVALEFF

2025-04-10 Thread Andrew Cooper
On 10/04/2025 8:32 pm, Nicola Vetrini wrote: > The service is now part of the updated ECLAIR runner, therefore > redefining will result in an error. > > No functional change. > > Signed-off-by: Nicola Vetrini Acked-by: Andrew Cooper Presumably this will be needed on all branches using Eclair ?

Re: [XEN PATCH] automation/eclair: Remove bespoke service B.UNEVALEFF

2025-04-10 Thread Nicola Vetrini
On 2025-04-10 22:08, Andrew Cooper wrote: On 10/04/2025 8:32 pm, Nicola Vetrini wrote: The service is now part of the updated ECLAIR runner, therefore redefining will result in an error. No functional change. Signed-off-by: Nicola Vetrini Acked-by: Andrew Cooper Presumably this will be ne

[RFC PATCH] x86/xen: Fix PVH dom0 xen_hypercall detection

2025-04-10 Thread Jason Andryuk
A Xen PVH dom0 on an AMD processor triple faults early in boot on 6.6.86. CPU detection appears to fail, as the faulting instruction is vmcall in xen_hypercall_intel() and not vmmcall in xen_hypercall_amd(). Detection fails because __xen_hypercall_setfunc() returns the full kernel mapped address

[XEN PATCH] automation/eclair: Remove bespoke service B.UNEVALEFF

2025-04-10 Thread Nicola Vetrini
The service is now part of the updated ECLAIR runner, therefore redefining will result in an error. No functional change. Signed-off-by: Nicola Vetrini --- To be applied after updating the ECLAIR runners --- automation/eclair_analysis/ECLAIR/B.UNEVALEFF.ecl | 10 -- automation/eclair_a

[PATCH] x86/xen: Fix __xen_hypercall_setfunc

2025-04-10 Thread Jason Andryuk
Hypercall detection is failing with xen_hypercall_intel() chosen even on an AMD processor. Looking at the disassembly, the call to xen_get_vendor() was removed. The check for boot_cpu_has(X86_FEATURE_CPUID) was used as a proxy for the x86_vendor having been set. When CONFIG_X86_REQUIRED_FEATURE_

Re: [PATCH v2 06/12] CI: consistently use DOCKER_CMD in makefiles

2025-04-10 Thread Andrew Cooper
On 07/04/2025 1:31 pm, Marek Marczykowski-Górecki wrote: > This allows rebuilding containers using podman too. > > Signed-off-by: Marek Marczykowski-Górecki > Reviewed-by: Stefano Stabellini > --- > automation/build/Makefile | 4 ++-- > automation/tests-artifacts/Makefile | 4 ++-- > 2

Re: [PATCH v2 2/7] arm/mpu: Provide access to the MPU region from the C code

2025-04-10 Thread Luca Fancellu
Hi Ayan, > On 8 Apr 2025, at 15:02, Ayan Kumar Halder wrote: > > Hi Luca, > >> >> +static void prepare_selector(uint8_t sel) >> +{ >> +/* >> + * {read,write}_protection_region works using the direct access to the >> 0..15 >> + * regions, so in order to save the isb() overhead, cha

Re: [PATCH TEST-ARTEFACTS] Fix adduser --shell path

2025-04-10 Thread Andrew Cooper
On 10/04/2025 6:18 pm, Marek Marczykowski-Górecki wrote: > On Thu, Apr 10, 2025 at 05:57:23PM +0100, Andrew Cooper wrote: >> On 10/04/2025 5:38 pm, Anthony PERARD wrote: >>> And by the way, you might want to add `gawk` as >>> well to replace busybox's awk, to make the linux build a bit more happy,

Re: [PATCH v3 08/16] x86/hyperlaunch: Add helpers to locate multiboot modules

2025-04-10 Thread Jan Beulich
On 08.04.2025 18:07, Alejandro Vallejo wrote: > --- a/xen/arch/x86/domain-builder/fdt.c > +++ b/xen/arch/x86/domain-builder/fdt.c > @@ -13,6 +13,148 @@ > > #include "fdt.h" > > +/* > + * Unpacks a "reg" property into its address and size constituents. > + * > + * @param prop Pointer t

Re: [PATCH TEST-ARTEFACTS 0/8] Cleanup and Linux ARM64 support

2025-04-10 Thread Alejandro Vallejo
On Thu Apr 10, 2025 at 7:20 PM BST, Alejandro Vallejo wrote: > On Thu Apr 10, 2025 at 10:17 AM BST, Andrew Cooper wrote: >> On 10/04/2025 1:09 am, Jason Andryuk wrote: >>> On 2025-04-09 13:01, Andrew Cooper wrote: On 09/04/2025 5:36 pm, Andrew Cooper wrote: > Various bits of cleanup, and s

Re: [PATCH TEST-ARTEFACTS 0/8] Cleanup and Linux ARM64 support

2025-04-10 Thread Alejandro Vallejo
On Thu Apr 10, 2025 at 10:17 AM BST, Andrew Cooper wrote: > On 10/04/2025 1:09 am, Jason Andryuk wrote: >> On 2025-04-09 13:01, Andrew Cooper wrote: >>> On 09/04/2025 5:36 pm, Andrew Cooper wrote: Various bits of cleanup, and support for arm64 Linux builds. Run using the new Linux 6.

[PATCH test-artifacts v2 13/12] scripts: add rc_verbose=yes to /etc/rc.conf

2025-04-10 Thread Marek Marczykowski-Górecki
This is done in every single test job, so do it at the initrd build time. Signed-off-by: Marek Marczykowski-Górecki --- scripts/x86_64-rootfs-alpine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/x86_64-rootfs-alpine.sh b/scripts/x86_64-rootfs-alpine.sh index f8b04c5..b70b3a5 100

[PATCH v2 6/7] arm/mpu: Implement early_fdt_map support in MPU systems

2025-04-10 Thread Luca Fancellu
Implement early_fdt_map() function, that is responsible to map the device tree blob in the early stages of the boot process, since at this stage the MPU C data structure are not yet initialised, it is using low level APIs to write into the MPU registers at a fixed MPU region number. The MPU memory

Re: [PATCH v2 2/7] arm/mpu: Provide access to the MPU region from the C code

2025-04-10 Thread Ayan Kumar Halder
On 09/04/2025 11:21, Luca Fancellu wrote: Hi Ayan, Hi, On 9 Apr 2025, at 11:07, Ayan Kumar Halder wrote: On 09/04/2025 09:26, Luca Fancellu wrote: Hi Ayan, Hi Luca, The point of the code was to don’t issue an isb() every time we change the selector, of course the code would be easier

Re: [PATCH v1 1/3] xen/console: cleanup conring management

2025-04-10 Thread Jan Beulich
On 03.04.2025 02:06, dm...@proton.me wrote: > From: Denis Mukhin > > Move console_locks_busted handling inside conring_puts() to remove > tasklet code duplication. I for one wouldn't expect tasklet scheduling to happen in a function of this name. IOW I think the little bit of duplication is warr

Re: [PATCH] x86/cpu: Validate CPUID leaf 0x2 EDX output

2025-04-10 Thread Andrew Cooper
On 19/03/2025 11:24 am, Jan Beulich wrote: > From: Ahmed S. Darwish > > CPUID leaf 0x2 emits one-byte descriptors in its four output registers > EAX, EBX, ECX, and EDX. For these descriptors to be valid, the most > significant bit (MSB) of each register must be clear. > > Leaf 0x2 parsing at inte

Re: [PATCH test-artifacts v2 14/12] scripts: build initrd cpio

2025-04-10 Thread Marek Marczykowski-Górecki
On Mon, Apr 07, 2025 at 05:22:05PM +0100, Andrew Cooper wrote: > On 07/04/2025 5:17 pm, Andrew Cooper wrote: > > On 07/04/2025 1:31 pm, Marek Marczykowski-Górecki wrote: > >> Build initrd format directly digestable by the kernel. Additionally, > >> include it itself inside as boot/initrd-domU file,

[PATCH v1 06/14] xen/riscv: riscv_of_processor_hartid() implementation

2025-04-10 Thread Oleksii Kurochko
Implements riscv_of_processor_hartid() to get the hart ID of the given device tree node and do some checks if CPU is available and given device tree node has proper riscv,isa property. As a helper function of_get_cpu_hwid() is introduced to deal specifically with reg propery of a CPU device node.

Re: [PATCH] tools/libxl: do not use `-c -E` compiler options together

2025-04-10 Thread Anthony PERARD
On Mon, Apr 07, 2025 at 01:09:38PM +0200, Roger Pau Monne wrote: > It makes no sense to request for preprocessor only output and also request > object file generation. Fix the _libxl.api-for-check target to only use > -E (preprocessor output). > > Also Clang 20.0 reports an error if both options a

[PATCH v2 0/3] mm: Fix apply_to_pte_range() vs lazy MMU mode

2025-04-10 Thread Alexander Gordeev
Hi All, Chages since v1: - left fixes only, improvements will be posted separately; - Fixes: and -stable tags added to patch descriptions; This series is an attempt to fix the violation of lazy MMU mode context requirement as described for arch_enter_lazy_mmu_mode(): This mode can only be en

[PATCH v2 5/7] arm/mpu: Introduce MPU memory mapping flags

2025-04-10 Thread Luca Fancellu
Introduce the MPU memory mapping flags in asm/page.h. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/page.h | 25 + 1 file changed, 25 insertions(+) diff --git a/xen/arch/arm/include/asm/page.h b/xen/arch/arm/include/asm/page.h index 69f817d1e68a..22f7d2c6cb30

[PATCH] tools/libxl: Skip invalid IRQs

2025-04-10 Thread Jason Andryuk
A PCI device's irq field is an 8-bit number. A value of 0xff indicates that the device is not connected. Additionally, the Linux ACPI code can convert these 0xff values to IRQ_NOTCONNECTED(0x8000) because "0x8000 is guaranteed to be outside the available range of interrupts and easy to di

Re: [PATCH] xen: fix multicall debug feature

2025-04-10 Thread Borislav Petkov
On Thu, Mar 27, 2025 at 08:06:02PM +0100, Juergen Gross wrote: > Initializing a percpu variable with the address of a struct tagged as > .initdata is breaking the build with CONFIG_SECTION_MISMATCH_WARN_ONLY > not set to "y". > > Fix that by using an access function instead returning the .initdata

Re: [PATCH v3 07/16] x86/hyperlaunch: initial support for hyperlaunch device tree

2025-04-10 Thread Jan Beulich
On 08.04.2025 18:07, Alejandro Vallejo wrote: > --- a/xen/arch/x86/domain-builder/core.c > +++ b/xen/arch/x86/domain-builder/core.c > @@ -44,6 +44,21 @@ void __init builder_init(struct boot_info *bi) > break; > } > } > + > +if ( bi->hyperlaunch_enabled ) > +{ Not

[PATCH v5 3/5] ARM: sa1100: Switch to new sys-off handler API

2025-04-10 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis --- arch/arm/mach-sa1100/generic

Re: [PATCH v1 06/14] xen/riscv: riscv_of_processor_hartid() implementation

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > @@ -13,3 +16,68 @@ void __init smp_clear_cpu_maps(void) > cpumask_set_cpu(0, &cpu_online_map); > cpumask_copy(&cpu_present_map, &cpu_possible_map); > } > + > +/** > + * of_get_cpu_hwid - Get the hardware ID from a CPU device node > + * > + *

Re: [PATCH TEST-ARTEFACTS] Fix adduser --shell path

2025-04-10 Thread Marek Marczykowski-Górecki
On Thu, Apr 10, 2025 at 05:57:23PM +0100, Andrew Cooper wrote: > On 10/04/2025 5:38 pm, Anthony PERARD wrote: > > And by the way, you might want to add `gawk` as > > well to replace busybox's awk, to make the linux build a bit more happy, > > even if it doesn't seems to be an issue right now. > >

Re: [PATCH TEST-ARTEFACTS] Fix adduser --shell path

2025-04-10 Thread Andrew Cooper
On 10/04/2025 5:38 pm, Anthony PERARD wrote: > On Thu, Apr 10, 2025 at 04:58:59PM +0100, Andrew Cooper wrote: >> On 10/04/2025 4:56 pm, Anthony PERARD wrote: >>> We need the full path to a shell in `/etc/passwd`, otherwise `su user` >>> doesn't work. >>> >>> $ su user >>> su: can't execute

Re: [PATCH v1 04/14] xen/riscv: introduce init_IRQ()

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/irq.h > +++ b/xen/arch/riscv/include/asm/irq.h > @@ -3,6 +3,28 @@ > #define ASM__RISCV__IRQ_H > > #include > +#include > + > +#define NR_IRQS 1024 > + > +/* > + * TODO: Should IRQ_TYPE_* be moved to xen/irq.h and

Re: [PATCH 1/6] Port containerise

2025-04-10 Thread Anthony PERARD
On Thu, Apr 10, 2025 at 12:46:23PM +0100, Andrew Cooper wrote: > While it pains me to keep the wrong spelling, do so for consistency. > > Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions we

Re: [PATCH v3 02/16] x86/boot: introduce domid field to struct boot_domain

2025-04-10 Thread Jason Andryuk
On 2025-04-09 06:33, Alejandro Vallejo wrote: On Wed Apr 9, 2025 at 7:34 AM BST, Jan Beulich wrote: On 08.04.2025 18:07, Alejandro Vallejo wrote: @@ -1010,15 +1010,15 @@ static struct domain *__init create_dom0(struct boot_info *bi) dom0_cfg.flags |= XEN_DOMCTL_CDF_iommu; /*

[PATCH] Arm: cpu_*_map adjustments

2025-04-10 Thread Jan Beulich
First, they all start out zeroed. There's no point doing an initial cpumask_clear() on them. Next, only cpu_online_map may be altered post-boot, and even that only rarely. Add respective placement attributes. Finally, cpu_present_map really isn't anything more than an alias of cpu_possible_map. A

Re: [PATCH v1 05/14] xen/riscv: introduce platform_get_irq()

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > @@ -21,6 +22,22 @@ static struct intc_info __ro_after_init aplic_info = { > .hw_version = INTC_APLIC, > }; > > +static int aplic_irq_xlate(const uint32_t *intspec, unsigned int intsize, As you start adding functions calling indirectly, please

[PATCH] xen: mapcache: Fix finding matching entry

2025-04-10 Thread Aleksandr Partanen
If we have request without lock and hit unlocked or invalid entry during the search, we remap it immediately, even if we have matching entry in next entries in bucket. This leads to duplication of mappings of the same size, and to possibility of selecting the wrong element during invalidation and u

Re: [PATCH v2 0/5] Fix lazy mmu mode

2025-04-10 Thread Alexander Gordeev
On Mon, Mar 03, 2025 at 02:15:34PM +, Ryan Roberts wrote: Hi Ryan, > I'm planning to implement lazy mmu mode for arm64 to optimize vmalloc. As part > of that, I will extend lazy mmu mode to cover kernel mappings in vmalloc table > walkers. While lazy mmu mode is already used for kernel mappin

Re: [PATCH v1 07/14] xen/riscv: Introduce intc_hw_operations abstraction

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/intc.h > +++ b/xen/arch/riscv/include/asm/intc.h > @@ -17,6 +17,29 @@ struct intc_info { > const struct dt_device_node *node; > }; > > +struct intc_hw_operations { > +/* Hold intc hw information */ > +co

Re: [PATCH TEST-ARTEFACTS] Fix adduser --shell path

2025-04-10 Thread Andrew Cooper
On 10/04/2025 4:56 pm, Anthony PERARD wrote: > We need the full path to a shell in `/etc/passwd`, otherwise `su user` > doesn't work. > > $ su user > su: can't execute 'bash': No such file or directory > > Signed-off-by: Anthony PERARD Acked-by: Andrew Cooper Would you like me to pick t

Re: [PATCH 3/6] Adjust Linux build script to work with other major versions

2025-04-10 Thread Marek Marczykowski-Górecki
On Thu, Apr 10, 2025 at 12:46:25PM +0100, Andrew Cooper wrote: > Simply the tar expression, as 'tar xf' can figure out the compression > automatically. > > Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki > --- > CC: Roger Pau Monné > CC: Stefano Stabellini > CC: Michal O

Re: [PATCH v3 06/16] x86/hyperlaunch: introduce the domain builder

2025-04-10 Thread Alejandro Vallejo
On Wed Apr 9, 2025 at 7:53 PM BST, Denis Mukhin wrote: > On Tuesday, April 8th, 2025 at 9:07 AM, Alejandro Vallejo > wrote: > >> >> >> From: "Daniel P. Smith" dpsm...@apertussolutions.com >> >> >> Introduce the domain builder which is capable of consuming a device tree as >> the >> first boo

Re: [PATCH v1 03/14] xen/riscv: introduce ioremap()

2025-04-10 Thread Jan Beulich
On 08.04.2025 17:57, Oleksii Kurochko wrote: > Based on RISC-V unpriviliged spec ( Version 20240411 ): > ``` > For implementations that conform to the RISC-V Unix Platform Specification, > I/O devices and DMA operations are required to access memory coherently and > via strongly ordered I/O channel

Re: [PATCH v2 1/3] kasan: Avoid sleepable page allocation from atomic context

2025-04-10 Thread Alexander Gordeev
On Wed, Apr 09, 2025 at 04:56:29PM +0200, Andrey Ryabinin wrote: Hi Andrey, ... > >>> - page = __get_free_page(GFP_KERNEL); > >>> + page = __get_free_page(GFP_ATOMIC); > >>> if (!page) > >> I think a better way to fix this would be moving out allocation from > >> atomic context. Allocate page

Re: [PATCH 3/3] CI: Drop stale test-artifacts/alpine/3.18.dockerfile

2025-04-10 Thread Marek Marczykowski-Górecki
On Thu, Apr 10, 2025 at 01:05:20PM +0100, Andrew Cooper wrote: > This should have been dropped too, as the authoritative copy lives in another > repo now. > > Fixes: babe11b46c1a ("CI: Drop alpine-3.18-rootfs-export and use > test-artefacts") > Signed-off-by: Andrew Cooper Reviewed-by: Marek Ma

Re: [PATCH 2/3] CI: Update ARM64 tests from Linux 6.6.74 to 6.6.86

2025-04-10 Thread Marek Marczykowski-Górecki
On Thu, Apr 10, 2025 at 01:05:19PM +0100, Andrew Cooper wrote: > Switch over to test-artifacts. > > Drop the associated export job, and dockerfile. > > Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab sign

  1   2   >