Re: Xen 4.20 release schedule

2024-11-21 Thread Jan Beulich
On 21.11.2024 13:53, Frediano Ziglio wrote: > On Wed, Oct 30, 2024 at 1:25 PM Andrew Cooper > wrote: >> >> On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: >>> Hello everyone, >>> >>> As there were no objections to the proposed release schedule >>> (https://lore.kernel.org/xen-devel/CAMac

Re: [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 11:14:23AM +, Andrew Cooper wrote: > On 21/11/2024 11:08 am, Roger Pau Monné wrote: > > On Thu, Nov 21, 2024 at 11:54:49AM +0100, Jan Beulich wrote: > >> On 20.11.2024 12:35, Roger Pau Monne wrote: > >>> Do not return early in the PVH/HVM case, so that the number of pIRQ

Re: [PATCH] 9p/xen: fix init sequence

2024-11-21 Thread Jürgen Groß
On 19.11.24 22:16, Alexander Merritt wrote: From: Alex Zenla Large amount of mount hangs observed during hotplugging of 9pfs devices. The 9pfs Xen driver attempts to initialize itself more than once, causing the frontend and backend to disagree: the backend listens on a channel that the fronten

Re: [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs

2024-11-21 Thread Jan Beulich
On 21.11.2024 12:04, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 11:49:44AM +0100, Jan Beulich wrote: >> On 20.11.2024 12:35, Roger Pau Monne wrote: >>> The current calculation of PV dom0 pIRQs uses: >>> >>> n = min(fls(num_present_cpus()), dom0_max_vcpus()); >>> >>> The usage of fls() is wron

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 11:26:19AM +, Andrew Cooper wrote: > On 21/11/2024 11:12 am, Roger Pau Monne wrote: > > The allocation of the paging structures in the per-domain area for mapping > > the > > guest GDT and LDT can be limited to the maximum number of vCPUs the guest > > can > > have. T

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Andrew Cooper
On 21/11/2024 11:12 am, Roger Pau Monne wrote: > The allocation of the paging structures in the per-domain area for mapping the > guest GDT and LDT can be limited to the maximum number of vCPUs the guest can > have. The maximum number of vCPUs is available at domain creation since > commit > 4737

Re: [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH

2024-11-21 Thread Jan Beulich
On 21.11.2024 12:24, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 11:14:23AM +, Andrew Cooper wrote: >> On 21/11/2024 11:08 am, Roger Pau Monné wrote: >>> On Thu, Nov 21, 2024 at 11:54:49AM +0100, Jan Beulich wrote: On 20.11.2024 12:35, Roger Pau Monne wrote: > Do not return early

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 05:35:16PM +, Andrew Cooper wrote: > On 21/11/2024 4:32 pm, Roger Pau Monné wrote: > > On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: > >> diff --git a/xen/common/bitops.c b/xen/common/bitops.c > >> index 91ae961440af..0edd62d25c28 100644 > >> --- a/xen/c

Re: [PATCH] vpci: Add resizable bar support

2024-11-21 Thread Roger Pau Monné
On Fri, Nov 22, 2024 at 04:04:05AM +, Chen, Jiqian wrote: > On 2024/11/21 17:52, Roger Pau Monné wrote: > > On Thu, Nov 21, 2024 at 03:05:14AM +, Chen, Jiqian wrote: > >> On 2024/11/20 17:01, Roger Pau Monné wrote: > >>> On Wed, Nov 20, 2024 at 03:01:57AM +, Chen, Jiqian wrote: > T

Re: [PATCH] 9p/xen: fix release of IRQ

2024-11-21 Thread Jürgen Groß
On 21.11.24 23:51, Alexander Merritt wrote: From: Alex Zenla Kernel logs indicate an IRQ was double-freed. Pass correct device ID during IRQ release. Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend") Signed-off-by: Alex Zenla Signed-off-by: Alexander Merritt Signed-off-by: Ariadne C

Re: [PATCH] vpci: Add resizable bar support

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 03:05:14AM +, Chen, Jiqian wrote: > On 2024/11/20 17:01, Roger Pau Monné wrote: > > On Wed, Nov 20, 2024 at 03:01:57AM +, Chen, Jiqian wrote: > >> The only difference between our methods is the timing of updating the size. > >> Yours is later than mine because you up

Re: [PATCH V4 12/15] xen/arm32: mm: Rename 'first' to 'root' in init_secondary_pagetables()

2024-11-21 Thread Michal Orzel
On 11/11/2024 14:11, Elias El Yandouzi wrote: > > > From: Julien Grall > > The arm32 version of init_secondary_pagetables() will soon be re-used > for arm64 as well where the root table starts at level 0 rather than level 1. > > So rename 'first' to 'root'. > > Signed-off-by: Julien Grall

Re: [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs

2024-11-21 Thread Jan Beulich
On 20.11.2024 12:35, Roger Pau Monne wrote: > The current calculation of PV dom0 pIRQs uses: > > n = min(fls(num_present_cpus()), dom0_max_vcpus()); > > The usage of fls() is wrong, as num_present_cpus() already returns the number > of present CPUs, not the bitmap mask of CPUs. Hmm. Perhaps that

Re: [PATCH] x86/ucode: Only rescan features on successful microcode load

2024-11-21 Thread Jan Beulich
On 20.11.2024 14:50, Andrew Cooper wrote: > On 20/11/2024 10:50 am, Jan Beulich wrote: >> On 19.11.2024 22:58, Andrew Cooper wrote: >>> There's no point rescanning if we didn't load something new. Take the >>> opportunity to make the comment a bit more concise. >>> >>> Signed-off-by: Andrew Cooper

Re: [PATCH] x86/boot: Load microcode much earlier on boot

2024-11-21 Thread Jan Beulich
On 20.11.2024 12:24, Andrew Cooper wrote: > On 20/11/2024 10:44 am, Jan Beulich wrote: >> On 19.11.2024 22:57, Andrew Cooper wrote: >>> Following commit cd7cc5320bb2 ("x86/boot: add start and size fields to >>> struct >>> boot_module"), bootstrap_map*() works as soon as boot_info is populated. >>

Re: [PATCH] 9p/xen: fix init sequence

2024-11-21 Thread Juergen Gross
On 21.11.24 13:23, Dominique Martinet wrote: Alexander Merritt wrote on Tue, Nov 19, 2024 at 09:16:33PM +: From: Alex Zenla Large amount of mount hangs observed during hotplugging of 9pfs devices. The 9pfs Xen driver attempts to initialize itself more than once, causing the frontend and ba

[PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
for_each_set_bit()'s use of a double for loop had an accidental bug with a break in the inner loop leading to an infinite outer loop. Adjust for_each_set_bit() to avoid this behaviour, and add extend test_for_each_set_bit() with a test case for this. Fixes: ed26376f20bf ("xen/bitops: Introduce fo

Re: [PATCH v10 06/12] tools: add support for cache coloring configuration

2024-11-21 Thread Carlo Nonato
Hi Anthony, On Wed, Nov 20, 2024 at 5:25 PM Anthony PERARD wrote: > > Hi Carlo, > > On Tue, Nov 19, 2024 at 03:13:23PM +0100, Carlo Nonato wrote: > > diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c > > index e3538ec0ba..4ed339e6e4 100644 > > --- a/tools/libs/ctrl/xc_domain.

Re: [PATCH v4] drivers/char: rename arm-uart.c to uart-init.c

2024-11-21 Thread Michal Orzel
On 19/11/2024 15:55, Oleksii Kurochko wrote: > > > Rename the file containing uart_init() to enable reuse across other > architectures that utilize device trees or SPCR tables to locate UART > information. > After locating UART data, {acpi}_device_init() is called to initialize > the UART. >

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Jan Beulich
On 21.11.2024 12:12, Roger Pau Monne wrote: > The allocation of the paging structures in the per-domain area for mapping the > guest GDT and LDT can be limited to the maximum number of vCPUs the guest can > have. The maximum number of vCPUs is available at domain creation since > commit > 4737fa5

Re: [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 11:49:44AM +0100, Jan Beulich wrote: > On 20.11.2024 12:35, Roger Pau Monne wrote: > > The current calculation of PV dom0 pIRQs uses: > > > > n = min(fls(num_present_cpus()), dom0_max_vcpus()); > > > > The usage of fls() is wrong, as num_present_cpus() already returns the

Re: [PATCH] 9p/xen: fix init sequence

2024-11-21 Thread Dominique Martinet
Alexander Merritt wrote on Tue, Nov 19, 2024 at 09:16:33PM +: > From: Alex Zenla > > Large amount of mount hangs observed during hotplugging of 9pfs devices. The > 9pfs Xen driver attempts to initialize itself more than once, causing the > frontend and backend to disagree: the backend listens

[PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Roger Pau Monne
The allocation of the paging structures in the per-domain area for mapping the guest GDT and LDT can be limited to the maximum number of vCPUs the guest can have. The maximum number of vCPUs is available at domain creation since commit 4737fa52ce86. Limiting to the actual number of vCPUs avoids w

Re: [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH

2024-11-21 Thread Jan Beulich
On 20.11.2024 12:35, Roger Pau Monne wrote: > Do not return early in the PVH/HVM case, so that the number of pIRQs is also > printed. What you're printing ... > Fixes: 17f6d398f765 ('cmdline: document and enforce "extra_guest_irqs" upper > bounds') > Signed-off-by: Roger Pau Monné > --- > xen/

Re: Xen 4.20 release schedule

2024-11-21 Thread Jan Beulich
On 30.10.2024 14:25, Andrew Cooper wrote: > On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: >> Hello everyone, >> >> As there were no objections to the proposed release schedule >> (https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=nwg3he8eqn39aiaxzcw3bqf7i4ycmj...@mail.gmail.com/ >> ),

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Frediano Ziglio
On Thu, Nov 21, 2024 at 2:50 PM Andrew Cooper wrote: > > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() with a te

Re: [PATCH 3/4] x86/uaccess: rework user access speculative harden guards

2024-11-21 Thread Roger Pau Monné
On Tue, Nov 19, 2024 at 03:29:58PM +0100, Jan Beulich wrote: > On 19.11.2024 11:34, Roger Pau Monne wrote: > > The current guards to select whether user accesses should be speculative > > hardened violate Misra rule 20.7, as the UA_KEEP() macro doesn't (and can't) > > parenthesize the 'args' argume

Re: [PATCH 2/4] x86/msi: fix Misra Rule 20.7 in msi.h

2024-11-21 Thread Andrew Cooper
On 19/11/2024 10:34 am, Roger Pau Monne wrote: > Prune unused macros and adjust the remaining ones to parenthesize macro > arguments. > > No functional change intended. > > Singed-off-by: Roger Pau Monné It's a little early for carol season, isn't it? It would help to identify which macros are b

Re: [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH

2024-11-21 Thread Andrew Cooper
On 21/11/2024 11:08 am, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 11:54:49AM +0100, Jan Beulich wrote: >> On 20.11.2024 12:35, Roger Pau Monne wrote: >>> Do not return early in the PVH/HVM case, so that the number of pIRQs is also >>> printed. >> What you're printing ... >> >>> Fixes: 17f6d3

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 3:19 pm, Frediano Ziglio wrote: > On Thu, Nov 21, 2024 at 2:50 PM Andrew Cooper > wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this behaviou

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Jan Beulich
On 21.11.2024 16:56, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 12:12:18PM +0100, Roger Pau Monne wrote: >> The allocation of the paging structures in the per-domain area for mapping >> the >> guest GDT and LDT can be limited to the maximum number of vCPUs the guest can >> have. The maximum

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 12:12:18PM +0100, Roger Pau Monne wrote: > The allocation of the paging structures in the per-domain area for mapping the > guest GDT and LDT can be limited to the maximum number of vCPUs the guest can > have. The maximum number of vCPUs is available at domain creation sinc

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Jan Beulich
On 21.11.2024 15:50, Andrew Cooper wrote: > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() with a test case for t

Re: Xen 4.20 release schedule

2024-11-21 Thread Frediano Ziglio
On Thu, Nov 21, 2024 at 1:40 PM Jan Beulich wrote: > > On 21.11.2024 13:53, Frediano Ziglio wrote: > > On Wed, Oct 30, 2024 at 1:25 PM Andrew Cooper > > wrote: > >> > >> On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: > >>> Hello everyone, > >>> > >>> As there were no objections to the

Re: [PATCH] x86/boot: Load microcode much earlier on boot

2024-11-21 Thread Andrew Cooper
On 20/11/2024 10:44 am, Jan Beulich wrote: > On 19.11.2024 22:57, Andrew Cooper wrote: >> Resolve the todo, and move microcode loading to be the eariest action after >> establishing a console. > So yes, this is merely strengthening a dependency we already have: > bootstrap_map_addr() arranging to a

Re: Xen 4.20 release schedule

2024-11-21 Thread Andrew Cooper
On 21/11/2024 1:47 pm, Frediano Ziglio wrote: > On Thu, Nov 21, 2024 at 1:40 PM Jan Beulich wrote: >> On 21.11.2024 13:53, Frediano Ziglio wrote: >>> On Wed, Oct 30, 2024 at 1:25 PM Andrew Cooper >>> wrote: On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: > Hello everyone, >

Re: Xen 4.20 release schedule

2024-11-21 Thread Frediano Ziglio
On Wed, Oct 30, 2024 at 1:25 PM Andrew Cooper wrote: > > On 21/10/2024 1:02 pm, oleksii.kuroc...@gmail.com wrote: > > Hello everyone, > > > > As there were no objections to the proposed release schedule > > (https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=nwg3he8eqn39aiaxzcw3bqf7i4ycmj...@mail

Re: [PATCH v4] xen/common: Move gic_dt_preinit() to common code

2024-11-21 Thread Michal Orzel
On 19/11/2024 15:56, Oleksii Kurochko wrote: > > > Introduce intc_dt_preinit() in the common codebase, as it is not > architecture-specific and can be reused by both PPC and RISC-V. > This function identifies the node with the interrupt-controller property > in the device tree and calls device

Re: [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 11:54:49AM +0100, Jan Beulich wrote: > On 20.11.2024 12:35, Roger Pau Monne wrote: > > Do not return early in the PVH/HVM case, so that the number of pIRQs is also > > printed. > > What you're printing ... > > > Fixes: 17f6d398f765 ('cmdline: document and enforce "extra_gu

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() w

Re: [PATCH] x86/pv: limit GDT and LDT mappings areas to max number of vCPUs

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 05:03:21PM +0100, Jan Beulich wrote: > On 21.11.2024 16:56, Roger Pau Monné wrote: > > On Thu, Nov 21, 2024 at 12:12:18PM +0100, Roger Pau Monne wrote: > >> The allocation of the paging structures in the per-domain area for mapping > >> the > >> guest GDT and LDT can be lim

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 4:32 pm, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this be

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 4:07 pm, Jan Beulich wrote: > On 21.11.2024 15:50, Andrew Cooper wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this behaviour, and add extend >

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-21 Thread Stefano Stabellini
On Thu, 21 Nov 2024, Volodymyr Babchuk wrote: > Hi Stefano, > > Stefano Stabellini writes: > > > On Wed, 20 Nov 2024, Volodymyr Babchuk wrote: > >> Hi Stefano, > >> > >> (sorry, hit wrong Reply-To option, re-sending for wider audience) > >> > >> Stefano Stabellini writes: > >> > >> > On Tue,

Re: [PATCH] vpci: Add resizable bar support

2024-11-21 Thread Chen, Jiqian
On 2024/11/21 17:52, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 03:05:14AM +, Chen, Jiqian wrote: >> On 2024/11/20 17:01, Roger Pau Monné wrote: >>> On Wed, Nov 20, 2024 at 03:01:57AM +, Chen, Jiqian wrote: The only difference between our methods is the timing of updating the siz

Re: [PATCH] 9p/xen: fix release of IRQ

2024-11-21 Thread Dominique Martinet
Alexander Merritt wrote on Thu, Nov 21, 2024 at 10:51:00PM +: > From: Alex Zenla > > Kernel logs indicate an IRQ was double-freed. Nit: if you still have the log it'd be great to include it in the commit message, rather than paragraphing it. The rationale is that someone with the same probl

Re: [RFC PATCH] xen: add libafl-qemu fuzzer support

2024-11-21 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > On Wed, 20 Nov 2024, Volodymyr Babchuk wrote: >> Hi Stefano, >> >> (sorry, hit wrong Reply-To option, re-sending for wider audience) >> >> Stefano Stabellini writes: >> >> > On Tue, 19 Nov 2024, Volodymyr Babchuk wrote: >> >> Hi Stefano, >> >> >> >> S

[PATCH] 9p/xen: fix release of IRQ

2024-11-21 Thread Alexander Merritt
From: Alex Zenla Kernel logs indicate an IRQ was double-freed. Pass correct device ID during IRQ release. Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend") Signed-off-by: Alex Zenla Signed-off-by: Alexander Merritt Signed-off-by: Ariadne Conill --- net/9p/trans_xen.c | 3 ++- 1 file

Re: [RFC PATCH 00/25] Introduce xenbindgen to autogen hypercall structs

2024-11-21 Thread Anthony PERARD
Hi Alejandro, Nice work :-). On Fri, Nov 15, 2024 at 11:51:29AM +, Alejandro Vallejo wrote: > This series is the result of my "Interfacing Rust with Xen" talk in Xen > Summit. > It adds a hypercall ABI IDL parser and generator to the xen tree, replaces a > couple of existing hypercalls, crea

[PATCH] x86/pv: don't populate the GDT/LDT L3 slot at domain creation

2024-11-21 Thread Roger Pau Monne
The current code in pv_domain_initialise() populates the L3 slot used for the GDT/LDT, however that's not needed, since the create_perdomain_mapping() in pv_create_gdt_ldt_l1tab() will already take care of allocating an L2 and populating the L3 entry if not present. No functional change intended.