[PATCH v3 3/5] CI: Merge categories in debian/12-x86_64.dockerfile

2025-09-20 Thread Andrew Cooper
cpio needs to be in Tools (general) now that it's used by the general build script. Merge the rest of the test phase jobs into one group, to avoid being overly fine-grain. No functional change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: J

[PATCH v4 3/8] CI: Merge categories in debian/12-x86_64.dockerfile

2025-09-20 Thread Andrew Cooper
cpio needs to be in Tools (general) now that it's used by the general build script. Merge the rest of the test phase jobs into one group, to avoid being overly fine-grain. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orze

Re: [PATCH 2/5] CI: Update ppc64 to use Debian Trixie

2025-09-20 Thread Andrew Cooper
On 13/08/2025 4:16 pm, Anthony PERARD wrote: > On Sat, Aug 09, 2025 at 11:12:03PM +0100, Andrew Cooper wrote: >> diff --git a/automation/gitlab-ci/build.yaml >> b/automation/gitlab-ci/build.yaml >> index ab5211f77e5e..3fe539dc5683 100644 >> --- a/automation/gi

Re: domU reboot claim failed

2025-09-20 Thread Andrew Cooper
On 10/09/2025 7:58 pm, Jason Andryuk wrote: > Hi, > > We're running Android as a guest and it's running the Compatibility > Test Suite.  During the CTS, the Android domU is rebooted multiple times. > > In the middle of the CTS, we've seen reboot fail.  xl -vvv shows: > domainbuilder: detail: Could

Re: [PATCH v2 2/3] CI: Update x86 to use Debian Trixie

2025-09-19 Thread Andrew Cooper
On 11/09/2025 4:06 am, Marek Marczykowski-Górecki wrote: > On Wed, Sep 10, 2025 at 11:23:12PM +0100, Andrew Cooper wrote: >> diff --git a/automation/build/debian/13-x86_64.dockerfile >> b/automation/build/debian/13-x86_64.dockerfile >> new file mode 100644 >> index

[PATCH v4 8/8] CHANGELOG: Notes about distro changes in CI

2025-09-18 Thread Andrew Cooper
Also state the RISC-V baseline now it's been set, as it's the reason why RISC-V Bullseye got dropped. Signed-off-by: Andrew Cooper Acked-by: Oleksii Kurochko Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné C

Re: [PATCH] xen/domain: introduce DOMID_ANY

2025-09-16 Thread Andrew Cooper
On 16/09/2025 1:05 pm, Jan Beulich wrote: > On 16.09.2025 19:37, dmuk...@xen.org wrote: >> --- a/xen/include/public/xen.h >> +++ b/xen/include/public/xen.h >> @@ -608,6 +608,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t); >> /* DOMID_INVALID is used to identify pages with unknown owner. */ >> #define

Re: [PATCH] xen/domain: introduce DOMID_ANY

2025-09-16 Thread Andrew Cooper
On 16/09/2025 10:37 am, dmuk...@xen.org wrote: > From: Denis Mukhin > > Add a new symbol DOMID_ANY aliasing DOMID_INVALID to improve the readability > of the code. > > Update all relevant domid_alloc() call sites. > > Amends: 2d5065060710 ("xen/domain: unify domain ID allocation") > Signed-off-by

Re: [XEN][PATCH 1/2] x86: hvm: vmx: fix runtime vmx presence check for !CONFIG_INTEL_VMX case

2025-09-16 Thread Andrew Cooper
On 16/09/2025 9:57 am, Grygorii Strashko wrote: > Hi Jan, > > On 16.09.25 17:34, Jan Beulich wrote: >> On 16.09.2025 12:32, Grygorii Strashko wrote: >>> From: Grygorii Strashko >>> >>> Since commit b99227347230 ("x86: Fix AMD_SVM and INTEL_VMX >>> dependency") the >>> HVM Intel VT-x support can be

Re: [XEN][PATCH] x86: hvm: hypercall: use define instead of const in hvm_hypercall()

2025-09-16 Thread Andrew Cooper
On 12/09/2025 10:47 am, Grygorii Strashko wrote: > From: Grygorii Strashko > > Use define X86_MODE_64BIT instead of constant in hvm_hypercall() for "mode" > conditional check to improve code readability. > > Signed-off-by: Grygorii Strashko Acked-by: Andrew Coope

[PATCH v4 6/8] CI: Use pipefail in scripts/build

2025-09-13 Thread Andrew Cooper
orted-by: Marek Marczykowski-Górecki Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Shawn Anastasio CC: Oleksii Kurochko CC: Doug Goldstein CC: Marek Marczykowski-Górecki CC: Victor Lira v4:

Re: [PATCH][for-4.21] xen/arm: Reorder SCI resource cleanup in domain destruction

2025-09-13 Thread Andrew Cooper
On 13/09/2025 3:07 pm, Oleksandr Tyshchenko wrote: > > > On Sat, Sep 13, 2025 at 1:31 PM Oleksii Moisieiev > wrote: > > Hello Oleksii > > Move the SCI (System Control and Management Interface) resource > cleanup > earlier in the domain_relinquish_resources() sequence to ensure proper >

Re: [PATCH] xen/domctl: Fix double domid_free in XEN_DOMCTL_createdomain error path

2025-09-13 Thread Andrew Cooper
("xen/domain: unify domain ID allocation") > Signed-off-by: Oleksii Moisieiev Reviewed-by: Andrew Cooper the tl;dr is that domain_create() either inserts the domain into the domlist, or cleans up after itself. The domid alloc infrastructure is problematic in multiple ways, not leas

[PATCH v4 0/8] CI: Add Debian Trixie

2025-09-12 Thread Andrew Cooper
Refresh the Trixie series. A few more bugfixes found by randconfig and log inspection. These containers are already built and deployed for people to test with. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2036687955 Andrew Cooper (8): CI: Use the Debian Trixie container

Re: [PATCH v4 5/8] x86/emul: Make condition coverage warning non-fatal

2025-09-12 Thread Andrew Cooper
On 12/09/2025 3:44 pm, Andrew Cooper wrote: > Randconfig with GCC-14 (Debian Trixie) found: > > In file included from arch/x86/x86_emulate/x86_emulate.c:11, >from arch/x86/x86_emulate.c:27: > arch/x86/x86_emulate/x86_emulate.c: In function 'x86_em

Re: [PATCH v3] tools/libs: Use superpages where possible on migrate/resume

2025-09-12 Thread Andrew Cooper
te space. > > Signed-off-by: Frediano Ziglio > Release-Acked-by: Oleksii Kurochko Reviewed-by: Andrew Cooper Thanks, this is far easier to follow.  A couple of minor things. > --- > Changes since v1: > - updated commit message and subject; > - change the implementation de

[PATCH v4 5/8] x86/emul: Make condition coverage warning non-fatal

2025-09-12 Thread Andrew Cooper
ion_if' 1283 | generate_exception_if((mode_vif() && | ^ which is a consequence of having a new enough compiler to allow CONFIG_CONDITIONAL_COVERAGE in to the mix. In the short term make warning non-fatal. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger P

[PATCH v4 7/8] CI: Update x86 to use Debian Trixie

2025-09-12 Thread Andrew Cooper
With the exception of the custom IBT job, copy all Debian 12 jobs making Debian 13 versions, then trim the Debian 12 ranconfig jobs. Update the test jobs using Debian 12 to use 13. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich

[PATCH v4 2/8] CI: Update ppc64 to use Debian Trixie

2025-09-12 Thread Andrew Cooper
Everything works fine with Debian 13. Provide two new build jobs (for a total of 6), and update the test jobs. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC

[PATCH v4 1/8] CI: Use the Debian Trixie container for RISC-V test jobs

2025-09-12 Thread Andrew Cooper
This was missed when introducing Trixie. Fixes: aad6ebf0596f ("CI: Update riscv64 to use Debian Trixie") Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini

[PATCH v4 4/8] CI: Make qemu-smoke-x86-64-gcc-efi compatible with Debian Trixie

2025-09-12 Thread Andrew Cooper
The OVMF package in Debian Trixie has _4M suffixes on the files. Have scripts/include/xtf-x86-64-efi check for this before falling back to no suffix. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger

Re: [PATCH v3 3.5/5] CI: Make qemu-smoke-x86-64-gcc-efi compatible with Debian Trixie

2025-09-12 Thread Andrew Cooper
On 12/09/2025 3:39 am, dmuk...@xen.org wrote: > On Fri, Sep 12, 2025 at 02:15:34AM +0100, Andrew Cooper wrote: >> The OVMF package in Debian Trixie has _4M suffixes on the files. Have >> scripts/include/xtf-x86-64-efi check for this before falling back to no >> suffix. >&g

[PATCH] CI: Switch the alpine containers to be non-root

2025-09-12 Thread Andrew Cooper
t the initrd. staging-4.20 and later do not repack the initrd in this way, so are not affected. Switch both alpine containers to being non-root. This is still slightly fragile, but better than depending on using root containers for both. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: St

Re: [PATCH] CI: Switch the alpine containers to be non-root

2025-09-11 Thread Andrew Cooper
On 10/09/2025 2:11 pm, Andrew Cooper wrote: > On 10/09/2025 12:57 pm, Marek Marczykowski-Górecki wrote: >> On Wed, Sep 10, 2025 at 12:34:16PM +0100, Andrew Cooper wrote: >>> Testing on staging-4.19 is hitting a reliable failure, caused by alpine/3.18 >>> being a root bui

Re: [PATCH 1/2] x86/IO-APIC: drop setup_ioapic_ids_from_mpc()

2025-09-11 Thread Andrew Cooper
ility detracts from an otherwise clear patch. With a very strong preference to have the commit message be only the first paragraph, Reviewed-by: Andrew Cooper

Re: [PATCH v2 1/2] libacpi: Prevent CPU hotplug AML from corrupting memory

2025-09-11 Thread Andrew Cooper
On 11/09/2025 12:53 pm, Alejandro Vallejo wrote: > CPU hotplug relies on the online CPU bitmap being provided on PIO 0xaf00 > by the device model. The GPE handler checks this and compares it against > the "online" flag on each MADT LAPIC entry, setting the flag to its > related bit in the bitmap an

[PATCH v3 3.5/5] CI: Make qemu-smoke-x86-64-gcc-efi compatible with Debian Trixie

2025-09-11 Thread Andrew Cooper
The OVMF package in Debian Trixie has _4M suffixes on the files. Have scripts/include/xtf-x86-64-efi check for this before falling back to no suffix. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano

[PATCH v3 2/5] CI: Update ppc64 to use Debian Trixie

2025-09-11 Thread Andrew Cooper
Everything works fine with Debian 13. Provide two new build jobs (for a total of 6), and update the test jobs. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Shawn Anastasio CC: Oleksii

[PATCH v3 4/5] CI: Update x86 to use Debian Trixie

2025-09-11 Thread Andrew Cooper
With the exception of the custom IBT job, copy all Debian 12 jobs making Debian 13 versions, then trim the Debian 12 ranconfig jobs. Update the test jobs using Debian 12 to use 13. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC

[PATCH v3 1/5] CI: Use the Debian Trixie container for RISC-V test jobs

2025-09-11 Thread Andrew Cooper
This was missed when introducing Trixie. Fixes: aad6ebf0596f ("CI: Update riscv64 to use Debian Trixie") Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Shawn Anastasio C

[PATCH v3 5/5] CHANGELOG: Notes about distro changes in CI

2025-09-11 Thread Andrew Cooper
Also state the RISC-V baseline now it's been set, as it's the reason why RISC-V Bullseye got dropped. Signed-off-by: Andrew Cooper Acked-by: Oleksii Kurochko --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini C

[PATCH v3 0/5] CI: Add Debian Trixie

2025-09-11 Thread Andrew Cooper
Refreshed the Trixie series. See patches for details. These containers are already built and deployed for people to test with. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2035442869 Andrew Cooper (5): CI: Use the Debian Trixie container for RISC-V test jobs CI: Update

Re: domU reboot claim failed

2025-09-11 Thread Andrew Cooper
[Resend from an account which will let me...] On 11/09/2025 4:46 pm, Alejandro Vallejo wrote: > On Thu Sep 11, 2025 at 9:55 AM CEST, Jan Beulich wrote: >> On 10.09.2025 23:57, Andrew Cooper wrote: >>> On 10/09/2025 7:58 pm, Jason Andryuk wrote: >>>> Hi, >>>

Re: [PATCH v2 1/2] libacpi: Prevent CPU hotplug AML from corrupting memory

2025-09-11 Thread Andrew Cooper
On 11/09/2025 1:35 pm, Alejandro Vallejo wrote: > On Thu Sep 11, 2025 at 2:03 PM CEST, Andrew Cooper wrote: >> On 11/09/2025 12:53 pm, Alejandro Vallejo wrote: >>> CPU hotplug relies on the online CPU bitmap being provided on PIO 0xaf00 >>> by the device model. The

Re: [PATCH v1] coverage: add missing include for macro

2025-09-10 Thread Andrew Cooper
> Add the missing include. > > Signed-off-by: Victor Lira Acked-by: Andrew Cooper , although > --- > example of the problem: > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 7ad870e382c..4d27f16e8ef 100644 > --- a/xen/arch/arm/setup.c > ++

[PATCH v2 2/3] CI: Update x86 to use Debian Trixie

2025-09-10 Thread Andrew Cooper
With the exception of the custom IBT job, copy all Debian 12 jobs making Debian 13 versions, then trim the Debian 12 ranconfig jobs. Update the test jobs using Debian 12 to use 13. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC

[PATCH v2 1/3] CI: Update ppc64 to use Debian Trixie

2025-09-10 Thread Andrew Cooper
Everything works fine with Debian 13. Provide two new build jobs (for a total of 6), and update the test job. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko CC: Marek

[PATCH v2 3/3] CHANGELOG: Notes about distro changes in CI

2025-09-10 Thread Andrew Cooper
Also state the RISC-V baseline now it's been set, as it's the reason why RISC-V Bullseye got dropped. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko

[PATCH v2 0/3] CI: Add Debian Trixie

2025-09-10 Thread Andrew Cooper
Refreshed the Trixie series. Update containerize, and change one x86 container to be rootless. Add some changelog notes. These containers are already built and deployed for people to test with. Andrew Cooper (3): CI: Update ppc64 to use Debian Trixie CI: Update x86 to use Debian Trixie

Re: [PATCH 2/2] x86/IO-APIC: drop io_apic_get_unique_id()

2025-09-10 Thread Andrew Cooper
as with the previous patch, albeit about the middle 3 paragraphs.  Again with a strong preference for those to be removed, Reviewed-by: Andrew Cooper I'd not even spotted that APIC_XAPIC() existed.  This being explicit conformation of where XAPIC starts would have been helpful when doing archaeology.

Re: [PATCH] CI: Switch the alpine containers to be non-root

2025-09-10 Thread Andrew Cooper
On 10/09/2025 12:57 pm, Marek Marczykowski-Górecki wrote: > On Wed, Sep 10, 2025 at 12:34:16PM +0100, Andrew Cooper wrote: >> Testing on staging-4.19 is hitting a reliable failure, caused by alpine/3.18 >> being a root build container, but debian/12-x86_64 being a non-root te

[PATCH] CI: Create initrd fragments explicitly as root

2025-09-09 Thread Andrew Cooper
itrds, irrespective of the rootness of the container the test is running in. No practical change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Marek Marczykowski-Górecki Best reviewed with `git show --colour-words` I'm intending to backport this all trees

[PATCH TEST-ARTEFACTS] Be explicit about root in scripts/alpine-rootfs.sh

2025-09-09 Thread Andrew Cooper
The container is running as root, but be explicit anyway. No functional change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Marek Marczykowski-Górecki --- scripts/alpine-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts

Re: [PATCH] symbols: fix xensyms_read() hitting the final "end" symbol

2025-09-08 Thread Andrew Cooper
On 08/09/2025 10:22 am, Jan Beulich wrote: > A new "no (more) symbol" path there was lacking a necessary unlock. > > Fixes: d3b637fba31b ("symbols: arrange to know where functions end") > Coverity ID: 1665212 > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper

Re: [misra] Re: [PATCH v3 1/2] efi: Add a function to check if Secure Boot mode is enabled

2025-09-07 Thread Andrew Cooper
On 05/09/2025 11:44 am, Jan Beulich wrote: > On 05.09.2025 12:36, Andrew Cooper wrote: >> On 05/09/2025 11:05 am, Gerald Elder-Vass wrote: >>> diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c >>> index e12fa1a7ec04..e7e3dffa7ddc 100644 >>> --- a/xen/co

Re: [PATCH v4 2/2] efi: Support using Shim's LoadImage protocol

2025-09-05 Thread Andrew Cooper
On 05/09/2025 1:10 pm, Gerald Elder-Vass wrote: > diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c > index ccbfc401f7ba..0a72c293301d 100644 > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -1047,6 +1056,46 @@ static UINTN __init > efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PR

Re: [PATCH v2] tools/libs: Use superpages where possible on migrate/resume

2025-09-05 Thread Andrew Cooper
On 02/09/2025 11:56 am, Frediano Ziglio wrote: > Try to allocate larger order pages. > With some test memory program stressing TLB (many small random > memory accesses) you can get 15% performance improves. > On the first memory iteration the sender is currently sending > memory in 4mb aligned chun

Re: [PATCH v4 1/2] efi: Add a function to check if Secure Boot mode is enabled

2025-09-05 Thread Andrew Cooper
On 05/09/2025 1:10 pm, Gerald Elder-Vass wrote: > From: Ross Lagerwall > > Also cache it to avoid needing to repeatedly ask the firmware. > > Signed-off-by: Ross Lagerwall > Signed-off-by: Gerald Elder-Vass Reviewed-by: Andrew Cooper

[misra] Re: [PATCH v3 1/2] efi: Add a function to check if Secure Boot mode is enabled

2025-09-05 Thread Andrew Cooper
On 05/09/2025 11:05 am, Gerald Elder-Vass wrote: > diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c > index e12fa1a7ec04..e7e3dffa7ddc 100644 > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -901,6 +901,28 @@ static void __init pre_parse(const struct file *file) >

Re: [PATCH] build: avoid absolute paths in executables

2025-09-03 Thread Andrew Cooper
On 03/09/2025 5:12 pm, Jan Beulich wrote: > On 03.09.2025 17:26, Andrew Cooper wrote: >> On 03/09/2025 4:13 pm, Jan Beulich wrote: >>> For in-tree builds relative paths are used, whereas for out-of-tree builds >>> in various situations absolute ones come into play. The

Re: xen | Failed pipeline for staging-4.19 | dabd7193

2025-09-03 Thread Andrew Cooper
n/-/commits/staging-4.19 ) >> >> Commit: dabd7193 ( >> https://gitlab.com/xen-project/hardware/xen/-/commit/dabd719321b652286b9d0b0c23e29c8427eb7da5 >> ) >> Commit Message: x86/gen-cpuid: Fix debugging for cycle detectio... >> Commit Author: Andrew Cooper ( htt

Re: [PATCH] build: avoid absolute paths in executables

2025-09-03 Thread Andrew Cooper
On 03/09/2025 4:13 pm, Jan Beulich wrote: > For in-tree builds relative paths are used, whereas for out-of-tree builds > in various situations absolute ones come into play. The extra paths can be > long, wasting space and e.g. serial line bandwidth. They would also get in > the way of location-inde

Re: [PATCH v2 07/23] x86/boot: Use RSTORSSP to establish SSP

2025-09-03 Thread Andrew Cooper
On 01/09/2025 10:28 am, Jan Beulich wrote: > On 28.08.2025 17:03, Andrew Cooper wrote: >> @@ -908,7 +909,29 @@ static void __init noreturn reinit_bsp_stack(void) >> if ( cpu_has_xen_shstk ) >> { >> wrmsrl(MSR_S_CET, xen_msr_s_cet_value()); >>

Re: [PATCH v2 20/23] x86/pv: Exception handling in FRED mode

2025-09-03 Thread Andrew Cooper
On 01/09/2025 1:57 pm, Jan Beulich wrote: > On 28.08.2025 17:04, Andrew Cooper wrote: >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -2265,9 +2265,83 @@ void asmlinkage check_ist_exit(const struct >> cpu_user_regs *regs, bool ist_exit) >>

Re: [PATCH v2] x86/gen-cpuid: correct cycle detection

2025-09-03 Thread Andrew Cooper
> Fixes: fe4408d180f4 ("xen/x86: Generate deep dependencies of features") > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper , with one further minor adjustment. > --- a/xen/tools/gen-cpuid.py > +++ b/xen/tools/gen-cpuid.py > @@ -379,14 +379,17 @@ def crunch_numbers(state)

Re: issue with dom0_pvh on Xen 4.20

2025-09-03 Thread Andrew Cooper
On 02/09/2025 1:52 pm, Andrew Cooper wrote: > On 02/09/2025 1:24 pm, Manuel Bouyer wrote: >> On Tue, Sep 02, 2025 at 01:14:29PM +0100, Andrew Cooper wrote: >>> On 02/09/2025 12:23 pm, Manuel Bouyer wrote: >>>> On Tue, Sep 02, 2025 at 12:13:27PM +0100, Andrew Cooper wr

Re: issue with dom0_pvh on Xen 4.20

2025-09-03 Thread Andrew Cooper
On 02/09/2025 11:17 am, Manuel Bouyer wrote: > Hello, > I'm trying to boot a NetBSD PVH dom0 on Xen 4.20. > The same NetBSD kernel works fine with Xen 4.18 > > The boot options are: > menu=Boot netbsd-current PVH Xen420:dev hd0f:;load /netbsd-PVH console=com0 > root=wd0f; multiboot /xen420-debug.g

Re: [RFC PATCH v1] imagebuilder: Add a script to check the sanity of device tree

2025-09-03 Thread Andrew Cooper
On 01/09/2025 1:31 pm, Ayan Kumar Halder wrote: > diff --git a/scripts/dt_sanity.py b/scripts/dt_sanity.py > new file mode 100644 > index 000..171947f > --- /dev/null > +++ b/scripts/dt_sanity.py > @@ -0,0 +1,33 @@ Shebang > +import argparse > +from pydevicetree import Devicetree pydevicetre

[PATCH 1/2] Tidy up .gitignore

2025-09-02 Thread Andrew Cooper
ols/misc/xen-tmem-list-parse was dropped in commit c588c002cc19 ("tools: remove tmem code and commands") (2018). No functional change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellin

[PATCH 2/2] tools/misc: Move ignores into local .gitignore

2025-09-02 Thread Andrew Cooper
... instead of having them split across multiple. No functional change. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Juergen Gross --- .gitignore| 15

Re: issue with dom0_pvh on Xen 4.20

2025-09-02 Thread Andrew Cooper
On 02/09/2025 12:23 pm, Manuel Bouyer wrote: > On Tue, Sep 02, 2025 at 12:13:27PM +0100, Andrew Cooper wrote: >> On 02/09/2025 11:56 am, Manuel Bouyer wrote: >>> On Tue, Sep 02, 2025 at 11:44:36AM +0100, Andrew Cooper wrote: >>>> On 02/09/2025 11:17 am, Manuel Bouyer

Re: [PATCH v2] releases: use newer compression methods for tarballs

2025-09-02 Thread Andrew Cooper
OOT xen-version" >exit 1 > @@ -21,14 +13,20 @@ fi > xen_root="$1" > desc="$2" > > -tdir="$xen_root/dist/tmp.src-tarball" > +tdir="$xen_root/dist" > > -rm -rf $tdir > +rm -f $tdir/xen-$desc.tar.[glx]z This is as

Re: [PATCH v2] releases: use newer compression methods for tarballs

2025-09-02 Thread Andrew Cooper
On 02/09/2025 5:15 pm, Andrew Cooper wrote: > On 25/08/2025 2:54 pm, Jan Beulich wrote: >> Other projects have long switched to xz and/or lzip. >> >> Tidy things some as well: With the removal of qemu from the tarball, >> intermediately extracting the tarball agai

Re: [PATCH 1/2] Tidy up .gitignore

2025-09-02 Thread Andrew Cooper
On 02/09/2025 4:03 pm, Jan Beulich wrote: > On 02.09.2025 16:49, Andrew Cooper wrote: >> Drop unused or stale lines. >> >> * While it's necessary to have .git and .hg in each others ignore files if >>using multiple SCMs (as we did for a while), they should not

Re: issue with dom0_pvh on Xen 4.20

2025-09-02 Thread Andrew Cooper
On 02/09/2025 2:41 pm, Manuel Bouyer wrote: > On Tue, Sep 02, 2025 at 02:28:27PM +0200, Juergen Gross wrote: >>> What puzzles me is that: >>> >>> - %cr2 is 0, so probably the first fault wasn't a page fault >>> - RIP is %ebx + 8, so maybe the code was just clobbered by the loop? >>> >>> Could it be

Re: issue with dom0_pvh on Xen 4.20

2025-09-02 Thread Andrew Cooper
On 02/09/2025 1:24 pm, Manuel Bouyer wrote: > On Tue, Sep 02, 2025 at 01:14:29PM +0100, Andrew Cooper wrote: >> On 02/09/2025 12:23 pm, Manuel Bouyer wrote: >>> On Tue, Sep 02, 2025 at 12:13:27PM +0100, Andrew Cooper wrote: >>>> On 02/09/2025 11:56 am, Manuel Bouy

Re: issue with dom0_pvh on Xen 4.20

2025-09-02 Thread Andrew Cooper
On 02/09/2025 11:56 am, Manuel Bouyer wrote: > On Tue, Sep 02, 2025 at 11:44:36AM +0100, Andrew Cooper wrote: >> On 02/09/2025 11:17 am, Manuel Bouyer wrote: >>> Hello, >>> I'm trying to boot a NetBSD PVH dom0 on Xen 4.20. >>> The same NetBSD kernel

Re: [PATCH v2 07/23] x86/boot: Use RSTORSSP to establish SSP

2025-09-01 Thread Andrew Cooper
On 01/09/2025 4:41 pm, Jan Beulich wrote: > On 01.09.2025 17:33, Andrew Cooper wrote: >> On 01/09/2025 10:28 am, Jan Beulich wrote: >>> On 28.08.2025 17:03, Andrew Cooper wrote: >>>> @@ -908,7 +909,29 @@ static void __init noreturn reinit_bsp_stack(void) &g

[PATCH] x86/hvm: Rationalise CS limit handling in arch_set_info_hvm_guest()

2025-09-01 Thread Andrew Cooper
ll be no change in practice whether .g is set or not. Reported-by: Roger Pau Monné Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné Slightly RFC as this is an ABI change, but I don't anticipate any breakge from this change. --- xen/arch/x86/hvm/domain.c | 8 ++-

Re: [PATCH v2 06/23] x86/traps: Set MSR_PL0_SSP in load_system_tables()

2025-09-01 Thread Andrew Cooper
On 01/09/2025 10:23 am, Jan Beulich wrote: > On 28.08.2025 17:03, Andrew Cooper wrote: >> FRED and IDT differ by a Supervisor Token on the base of the shstk. This >> means that the value they load into MSR_PL0_SSP differs by 8. >> >> s3_resume() in particular h

Re: [PATCH v2 11/23] x86/traps: Make an IDT-specific #PF helper

2025-09-01 Thread Andrew Cooper
On 01/09/2025 10:46 am, Jan Beulich wrote: > On 28.08.2025 17:03, Andrew Cooper wrote: >> FRED provides %cr2 in the the stack frame, avoiding the need to read %cr2 >> manually. >> >> Rename do_page_fault() to handle_PF(), and update it to take cr2, still na

Re: [PATCH v2] x86/bitops: Optimise arch_ffs{,l}() some more on AMD

2025-09-01 Thread Andrew Cooper
On 01/09/2025 3:26 pm, Jan Beulich wrote: > On 01.09.2025 16:21, Andrew Cooper wrote: >> On 27/08/2025 8:52 am, Jan Beulich wrote: >>> On 26.08.2025 19:41, Andrew Cooper wrote: >>>> --- a/xen/common/bitops.c >>>> +++ b/xen/common/bitops.c &

Re: [PATCH v2] x86/bitops: Optimise arch_ffs{,l}() some more on AMD

2025-09-01 Thread Andrew Cooper
On 27/08/2025 8:52 am, Jan Beulich wrote: > On 26.08.2025 19:41, Andrew Cooper wrote: >> --- a/xen/common/bitops.c >> +++ b/xen/common/bitops.c >> @@ -97,14 +97,14 @@ static void __init test_for_each_set_bit(void) >> if ( ui != ui_res ) >> panic(&qu

Re: [PATCH 1/2] x86/apic: Get rid of get_physical_broadcast()

2025-09-01 Thread Andrew Cooper
On 01/09/2025 9:33 am, Jan Beulich wrote: > On 29.08.2025 18:17, Andrew Cooper wrote: >> This is a port of Linux commit 517234446c1a ("x86/apic: Get rid of >> get_physical_broadcast()") to Xen. Thomas Gleixner notes: >> >> There is no point for this function

Re: [PATCH v2] x86/gen-cpuid: correct cycle detection

2025-09-01 Thread Andrew Cooper
On 01/09/2025 12:02 pm, Jan Beulich wrote: > On 01.09.2025 12:31, Andrew Cooper wrote: >> On 01/09/2025 9:56 am, Jan Beulich wrote: >>> With the processing done linearly (rather than recursively), checking >>> whether any of the features was previously seen is wrong:

Re: [PATCH] x86/gen-cpuid: correct cycle detection

2025-08-29 Thread Andrew Cooper
On 16/07/2025 7:59 am, Jan Beulich wrote: > With the processing done linearly (rather than recursively), checking > whether any of the features was previously seen is wrong: That would > e.g. trigger for this simple set of dependencies > > X: [A, B] > A: [C] > B: [C] > > (observed in re

[PATCH] x86/gen-cpuid: Fix debugging for cycle detection

2025-08-29 Thread Andrew Cooper
onally, remove trailing whitepsace from the debug print. Reported-by: Jan Beulich Fixes: ce8c930851a5 ("x86/cpu-policy: MSR_ARCH_CAPS feature names") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/tools/gen-cpuid.py | 8 ++-- 1 file changed, 6 insertions(

[PATCH 0/2] x86/apic: Drop vestigial pieces (Intel VFM cleanup)

2025-08-29 Thread Andrew Cooper
Found while doing the Intel VFM cleanup. This diffstat seems preforable to simply dropping the x86_ prefixes on the field name. Andrew Cooper (2): x86/apic: Get rid of get_physical_broadcast() x86/apic: Drop sync_Arb_IDs() xen/arch/x86/apic.c | 40

[PATCH 1/2] x86/apic: Get rid of get_physical_broadcast()

2025-08-29 Thread Andrew Cooper
dcast ID of 0xf. The only other user is __print_IO_APIC() for diagnostics, which can simply drop the check. No functional change. Link: https://lore.kernel.org/r/20240212154639.057209...@linutronix.de Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné add/remove: 0/1 grow/shri

[PATCH 2/2] x86/apic: Drop sync_Arb_IDs()

2025-08-29 Thread Andrew Cooper
: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-166 (-166) Function old new delta setup_IO_APIC 29922987 -5 sync_Arb_IDs 161

Re: [PATCH] Optimise restore memory allocation

2025-08-29 Thread Andrew Cooper
On 27/08/2025 6:23 pm, Andrew Cooper wrote: > Subject wants to be at least tools/libxc, and probably "Use superpages > where possible on migrate/resume" > > > On 27/08/2025 1:33 pm, Frediano Ziglio wrote: >> Try to allocate larger order pages. >> With some te

[PATCH v2 00/23] x86: FRED support

2025-08-28 Thread Andrew Cooper
en is using FRED. Some work here has influenced earlier patches. See patches for details. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2009286102 This series is still based on the MSR cleaup series posted previously. Andrew Cooper (23): x86: FRED enumerations x86/traps: E

[PATCH v2 22/23] x86/pv: System call handling in FRED mode

2025-08-28 Thread Andrew Cooper
ay to maintain the prior behaviour. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New --- xen/arch/x86/include/asm/domain.h| 5 ++ xen/arch/x86/include/asm/hypercall.h | 5 ++ xen/arch/x86/pv/traps.c | 33 + xen/arch/x86/tr

[PATCH v2 03/23] x86/traps: Introduce opt_fred

2025-08-28 Thread Andrew Cooper
functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * Fix check for warning. * Drop check for LKGS. --- docs/misc/xen-command-line.pandoc | 10 + xen/arch/x86/include/asm/traps.h | 4 xen/arch/x86/traps-setup.c

Re: [PATCH v2 01/23] x86: FRED enumerations

2025-08-28 Thread Andrew Cooper
On 28/08/2025 4:03 pm, Andrew Cooper wrote: > Of note, CR4.FRED is bit 32 and cannot enabled outside of 64bit mode. > > Most supported toolchains don't understand the FRED instructions yet. ERETU > and ERETS are easy to wrap (they encoded as REPZ/REPNE CLAC), while LKGS is >

[PATCH v2 01/23] x86: FRED enumerations

2025-08-28 Thread Andrew Cooper
d the FRED MSRs differently to the spec. In the spec, the stack pointer names alias the TSS fields of the same name, despite very different semantics. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné v2: * Drop CONFIG_HAS_AS_FRED --- xen/arch/x86/includ

[PATCH v2 17/23] x86/entry: Drop the pre exception table infrastructure

2025-08-28 Thread Andrew Cooper
It is no longer used. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New --- xen/arch/x86/extable.c | 14 -- xen/arch/x86/include/asm/asm_defns.h | 11 --- xen/arch/x86/include/asm/uaccess.h | 2 -- xen/arch/x86/xen.lds.S

[PATCH v2 12/23] x86/fsgsbase: Make gskern accesses safe under FRED

2025-08-28 Thread Andrew Cooper
ED is expected to have some kind of non-serialising access to these registers. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * Broken out of subsequent patch. Rebased over MSR cleanup. In principle, the following can also be used for read_registers() diff --git

[PATCH v2 15/23] x86/pv: Deduplicate is_canonical_address() in do_set_segment_base()

2025-08-28 Thread Andrew Cooper
This is really a rearrangement to make adding FRED support easier. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New There is a marginal code size improvement: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-46 (-46) Function

[PATCH v2 02/23] x86/traps: Extend struct cpu_user_regs/cpu_info with FRED fields

2025-08-28 Thread Andrew Cooper
undoing the saving we made by dropping the vm86 data segment selectors. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * .lm -> .l * Tweak comments --- xen/arch/x86/include/asm/cpu-user-regs.h | 71 ++-- xen/arch/x86

[PATCH v2 11/23] x86/traps: Make an IDT-specific #PF helper

2025-08-28 Thread Andrew Cooper
. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New --- xen/arch/x86/traps.c| 26 ++ xen/arch/x86/x86_64/entry.S | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c

[PATCH v2 05/23] x86/S3: Switch to using RSTORSSP to recover SSP on resume

2025-08-28 Thread Andrew Cooper
slot on the shadow stack rather than pointing at itself. In the short term, this logic still needs to load MSR_PL0_SSP. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/acpi/wakeup_prot.S | 31

[PATCH v2 19/23] x86/pv: Adjust GS handling for FRED mode

2025-08-28 Thread Andrew Cooper
(decades before FRED) so under FRED needs to be a simple MOV %gs. Simply skip the SWAPGSes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New I think this functions, but it's not ideal. The conditions are asymmetric and awkward. In principle, MSR_IM

[PATCH v2 10/23] x86/traps: Make an IDT-specific #DB helper

2025-08-28 Thread Andrew Cooper
FRED provides PENDING_DBG in the the stack frame, avoiding the need to read %dr6 manually. Rename do_debug() to handle_DB(), and update it to take a dbg field using positive polarity. Introduce a new handle_DB_IDT() which reads %dr6. No functional change. Signed-off-by: Andrew Cooper --- CC

[PATCH v2 18/23] x86/entry: Rework the comment about SYSCALL and DF

2025-08-28 Thread Andrew Cooper
It's soon going to be needed in a second location. Right now it's misleading saying that nothing else would be cleared. It's missing the more important point that SYSCALLs are treated like all other interrupts and exceptions, and undergo normal flags handling there. Signed-off-by

[PATCH v2 04/23] x86/boot: Adjust CR4 handling around percpu_early_traps_init()

2025-08-28 Thread Andrew Cooper
d we can store the result in the cr4 field too. For s3_resume(), explicitly re-load XEN_MINIMAL_CR4. Later when loading all features, use the mmu_cr4_features variable which is how the rest of Xen performs this operation. No functional change, yet. Signed-off-by: Andrew Cooper Reviewed-by: Jan

[PATCH v2 21/23] x86/pv: ERETU error handling

2025-08-28 Thread Andrew Cooper
ned-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New --- xen/arch/x86/traps.c | 115 +++ xen/arch/x86/x86_64/entry-fred.S | 13 2 files changed, 128 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 72

[PATCH v2 06/23] x86/traps: Set MSR_PL0_SSP in load_system_tables()

2025-08-28 Thread Andrew Cooper
AP path too. Updating reinit_bsp_stack() is deferred until later. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * Extend comment about clearing the busy bit. * Move reinit_bsp_stack() hunk into this patch. --- xen/arch/x86/acpi

[PATCH v2 16/23] x86/entry: Alter how IRET faults are recognised

2025-08-28 Thread Andrew Cooper
t in !PV builds. Later in exception_with_ints_disabled(), it suffices to load %ecx rather than %rcx, and remove a stray semi-colon from the rep movsq. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New --- xen/arch/x86/x86_64/compat/entry.

[PATCH v2 23/23] x86/pv: Adjust eflags handling for FRED mode

2025-08-28 Thread Andrew Cooper
. This is a minor ABI change, but by the same argument as commit 9f892f84c279 ("x86/domctl: Stop using XLAT_cpu_user_regs()"), this change will happen naturally when the vCPU schedules. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v2: * New The handlin

  1   2   3   4   5   6   7   8   9   10   >