[PATCH v2 1/1] x86: Rename __{start,end}_init_task to __{start,end}_init_stack

2024-03-18 Thread Xin Li (Intel)
The stack of a task has been separated from the memory of a task_struct struture for a long time on x86, as a result __{start,end}_init_task no longer mark the start and end of the init_task structure, but its stack only. Rename __{start,end}_init_task to __{start,end}_init_stack. Note other arch

Re: [PATCH v2 1/1] x86: Rename __{start,end}_init_task to __{start,end}_init_stack

2024-03-18 Thread Jürgen Groß
On 18.03.24 08:14, Xin Li (Intel) wrote: The stack of a task has been separated from the memory of a task_struct struture for a long time on x86, as a result __{start,end}_init_task no longer mark the start and end of the init_task structure, but its stack only. Rename __{start,end}_init_task to

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

2024-03-18 Thread osstest service owner
flight 185069 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/185069/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 185062 test-amd64-amd64-xl-qemuu-win7-amd64

Re: [PATCH] do_multicall and MISRA Rule 8.3

2024-03-18 Thread Jan Beulich
On 15.03.2024 15:45, George Dunlap wrote: > On Fri, Mar 15, 2024 at 2:13 PM Jan Beulich wrote: >> On 15.03.2024 14:55, Julien Grall wrote: >>> On 15/03/2024 13:24, Jan Beulich wrote: On 15.03.2024 13:17, George Dunlap wrote: > On Fri, Mar 15, 2024 at 11:57 AM Jan Beulich wrote: >>> I

Re: [PATCH v6 02/20] xen/riscv: disable unnecessary configs

2024-03-18 Thread Jan Beulich
On 15.03.2024 19:05, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/configs/tiny64_defconfig > +++ b/xen/arch/riscv/configs/tiny64_defconfig > @@ -7,6 +7,23 @@ > # CONFIG_GRANT_TABLE is not set > # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set > # CONFIG_MEM_ACCESS is not set > +# CONFIG_ARGO is no

Re: [PATCH v3 2/3] x86/svm: Drop the suffix _guest from vmcb bit

2024-03-18 Thread Vaishali Thakkar
On 3/14/24 17:04, Jan Beulich wrote: On 13.03.2024 17:41, Vaishali Thakkar wrote: The suffix _guest is redundant for asid bit. Drop it to avoid adding extra code volume. While we're here, replace 0/1 with false/true and use VMCB accessors instead of open coding. Suggested-by: Andrew Cooper Si

Re: [XEN PATCH v3 03/16] misra: add deviations for direct inclusion guards

2024-03-18 Thread Jan Beulich
On 16.03.2024 01:43, Stefano Stabellini wrote: > On Fri, 15 Mar 2024, Jan Beulich wrote: >> On 14.03.2024 23:59, Stefano Stabellini wrote: >>> On Mon, 11 Mar 2024, Simone Ballarin wrote: On 11/03/24 14:56, Jan Beulich wrote: > On 11.03.2024 13:00, Simone Ballarin wrote: >> On 11/03/24

Re: [PATCH v2] docs/misra: document the expected sizes of integer types

2024-03-18 Thread Jan Beulich
On 16.03.2024 01:07, Stefano Stabellini wrote: > On Fri, 15 Mar 2024, Jan Beulich wrote: >> On 14.03.2024 23:17, Stefano Stabellini wrote: >>> Xen makes assumptions about the size of integer types on the various >>> architectures. Document these assumptions. >> >> My prior reservation wrt exact vs

Re: [PATCH 6/7] xen: Swap find_first_set_bit() for ffsl() - 1

2024-03-18 Thread Jan Beulich
On 14.03.2024 19:51, Andrew Cooper wrote: > On 14/03/2024 6:47 pm, Andrew Cooper wrote: >> On 14/03/2024 2:30 pm, Jan Beulich wrote: >>> On 13.03.2024 18:27, Andrew Cooper wrote: --- a/xen/drivers/passthrough/x86/iommu.c +++ b/xen/drivers/passthrough/x86/iommu.c @@ -641,7 +641,7 @@ s

Re: [PATCH] x86/boot: Improve the boot watchdog determination of stuck cpus

2024-03-18 Thread Roger Pau Monné
On Fri, Mar 15, 2024 at 07:57:04PM +, Andrew Cooper wrote: > Right now, check_nmi_watchdog() has two processing loops over all online CPUs > using prev_nmi_count as storage. > > Use a cpumask_t instead (1/32th as much initdata) and have wait_for_nmis() > make the determination of whether it is

Re: [PATCH] xen/vpci: Improve code generation in mask_write()

2024-03-18 Thread Roger Pau Monné
On Fri, Mar 15, 2024 at 12:13:22PM +, Andrew Cooper wrote: > The use of __clear_bit() forces dmask to be spilled to the stack, and > interferes with the compiler heuristcs for some upcoming improvements to the > ffs() code generation. > > First, shrink dmask to just the active vectors by makin

Re: [OSSTEST PATCH v2 0/3] Switch to Linux 6.1 by default on x86

2024-03-18 Thread Roger Pau Monné
On Fri, Mar 15, 2024 at 03:48:46PM +, Anthony PERARD wrote: > Patch series available in this git branch: > https://xenbits.xen.org/git-http/people/aperard/osstest.git br.linux-6.1-v2 > > Hi, > > A set of patch which lead to using Linux 6.1 instead of 4.19 as a default > kernel on x86. > > I'

[PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock()

2024-03-18 Thread Jan Beulich
I can only guess that using block_speculation() there was a leftover from, earlier on, SPECULATIVE_HARDEN_LOCK depending on SPECULATIVE_HARDEN_BRANCH. Fixes: 197ecd838a2a ("locking: attempt to ensure lock wrappers are always inline") Signed-off-by: Jan Beulich --- Noticed while backporting to 4.

[PATCH 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-03-18 Thread Andrew Cooper
The start/stop1/etc linkage scheme predates struct virtual_region, and as setup_virtual_regions() shows, it's awkward to express in the new scheme. Change the linker to provide explicit start/stop symbols for each bugframe type, and change virtual_region to have a stop pointer rather than a count.

[PATCH 1/4] xen/link: Introduce a common BUGFRAMES definition

2024-03-18 Thread Andrew Cooper
Bugframe linkage is identical in all architectures. This is not surprising given that it is (now) only consumed by common/virtual_region.c Introduce a common BUGFRAMES define in xen.lds.h ahead of rearranging their structure. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beuli

[PATCH 4/4] xen/virtual-region: Drop setup_virtual_regions()

2024-03-18 Thread Andrew Cooper
All other actions it used to perform have been converted to build-time initialisation. The extable setup can done at build time too. This is one fewer setup step required to get exceptions working. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano S

[PATCH 3/4] xen/virtual-region: Link the list build time

2024-03-18 Thread Andrew Cooper
Given 3 statically initialised objects, its easy to link the list at build time. There's no need to do it during runtime at boot (and with IRQs-off, even). As a consequence, register_virtual_region() can now move inside ifdef CONFIG_LIVEPATCH like unregister_virtual_region(). Signed-off-by: Andr

[PATCH 0/4] xen/arch: Simplify virtual_region setup

2024-03-18 Thread Andrew Cooper
There is nothing that setup_virtual_regions() does which can't be done at build time. Make this happen. Importantly, this removes logic from needed prior to setting up exceptions. Andrew Cooper (4): xen/link: Introduce a common BUGFRAMES definition xen/virtual-region: Rework how bugframe lin

[XEN PATCH 01/10] x86/cpufeature: add parentheses to comply with Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 04/10] xen/device_tree: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 10/10] xen/sched: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 00/10] address some violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
Hi all, this series aims to refactor some macros that cause violations of MISRA C Rule 20.7 ("Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses"). All the macros touched by these patches are in some way involved in violations, and the strategy adopted to

[XEN PATCH 06/10] xen/arm: smmu: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 09/10] xen/wait: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 08/10] xen/notifier: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 05/10] EFI: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 07/10] xen/efi: efibind: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 02/10] AMD/IOMMU: guest: address violations of MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

[XEN PATCH 03/10] xen/xsm: add parentheses to comply with MISRA C Rule 20.7

2024-03-18 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly alter

Re: [XEN PATCH 10/10] xen/sched: address violations of MISRA C Rule 20.7

2024-03-18 Thread George Dunlap
On Mon, Mar 18, 2024 at 11:54 AM Nicola Vetrini wrote: > > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future use

Re: [OSSTEST PATCH v2 0/3] Switch to Linux 6.1 by default on x86

2024-03-18 Thread Anthony PERARD
On Mon, Mar 18, 2024 at 11:42:43AM +0100, Roger Pau Monné wrote: > On Fri, Mar 15, 2024 at 03:48:46PM +, Anthony PERARD wrote: > > Anthony PERARD (3): > > make-fligh: Fix freebsd guest test test-id > > mfi-common: Rework toolstack-disk_format test matrix > > ap-common: Switch to Linux 6.1

Re: [PATCH] x86/mm: use block_lock_speculation() in _mm_write_lock()

2024-03-18 Thread Andrew Cooper
On 18/03/2024 10:54 am, Jan Beulich wrote: > I can only guess that using block_speculation() there was a leftover > from, earlier on, SPECULATIVE_HARDEN_LOCK depending on > SPECULATIVE_HARDEN_BRANCH. > > Fixes: 197ecd838a2a ("locking: attempt to ensure lock wrappers are always > inline") > Signed-

Re: [PATCH 6/7] xen: Swap find_first_set_bit() for ffsl() - 1

2024-03-18 Thread Andrew Cooper
On 18/03/2024 9:13 am, Jan Beulich wrote: > On 14.03.2024 19:51, Andrew Cooper wrote: >> On 14/03/2024 6:47 pm, Andrew Cooper wrote: >>> On 14/03/2024 2:30 pm, Jan Beulich wrote: On 13.03.2024 18:27, Andrew Cooper wrote: > --- a/xen/drivers/passthrough/x86/iommu.c > +++ b/xen/drivers/p

[linux-5.4 test] 185071: regressions - FAIL

2024-03-18 Thread osstest service owner
flight 185071 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/185071/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 18 guest-start/debian.repeat fail in 185063 REGR. vs. 184921 Tests whic

Re: [XEN PATCH v3] amd/iommu: clean up unused guest iommu related functions

2024-03-18 Thread Jan Beulich
On 15.03.2024 16:55, Nicola Vetrini wrote: > Delete unused functions from 'iommu_guest.c'. > > No functional change. > > Signed-off-by: Nicola Vetrini > --- > guest_iommu_add_ptr_log has still one caller, but even that seems > suspicious. As said, it should be dropped. You remove ... > -/* Dom

Re: [PATCH 1/4] xen/link: Introduce a common BUGFRAMES definition

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:04, Andrew Cooper wrote: > Bugframe linkage is identical in all architectures. This is not surprising > given that it is (now) only consumed by common/virtual_region.c > > Introduce a common BUGFRAMES define in xen.lds.h ahead of rearranging their > structure. > > No functional

Re: [PATCH 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:04, Andrew Cooper wrote: > The start/stop1/etc linkage scheme predates struct virtual_region, and as > setup_virtual_regions() shows, it's awkward to express in the new scheme. > > Change the linker to provide explicit start/stop symbols for each bugframe > type, and change virtua

Re: [PATCH 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-03-18 Thread Andrew Cooper
On 18/03/2024 1:17 pm, Jan Beulich wrote: > On 18.03.2024 12:04, Andrew Cooper wrote: >> The start/stop1/etc linkage scheme predates struct virtual_region, and as >> setup_virtual_regions() shows, it's awkward to express in the new scheme. >> >> Change the linker to provide explicit start/stop symb

Re: [PATCH 3/4] xen/virtual-region: Link the list build time

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:04, Andrew Cooper wrote: > Given 3 statically initialised objects, its easy to link the list at build > time. There's no need to do it during runtime at boot (and with IRQs-off, > even). Hmm, technically that's correct, but isn't the overall result more fragile, in being more err

Re: [PATCH 4/4] xen/virtual-region: Drop setup_virtual_regions()

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:04, Andrew Cooper wrote: > --- a/xen/common/virtual_region.c > +++ b/xen/common/virtual_region.c > @@ -39,6 +39,11 @@ static struct virtual_region core = { > { __start_bug_frames_2, __stop_bug_frames_2 }, > { __start_bug_frames_3, __stop_bug_frames_3 }, > },

Re: [PATCH 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-03-18 Thread Jan Beulich
On 18.03.2024 14:24, Andrew Cooper wrote: > On 18/03/2024 1:17 pm, Jan Beulich wrote: >> On 18.03.2024 12:04, Andrew Cooper wrote: >>> --- a/xen/common/virtual_region.c >>> +++ b/xen/common/virtual_region.c >>> @@ -9,12 +9,25 @@ >>> #include >>> #include >>> >>> +extern const struct bug_frame

Re: [PATCH v2 1/2] IOMMU: store name for extra reserved device memory

2024-03-18 Thread Jan Beulich
On 12.03.2024 17:25, Marek Marczykowski-Górecki wrote: > It will be useful for error reporting in a subsequent patch. > > Signed-off-by: Marek Marczykowski-Górecki In principle Acked-by: Jan Beulich However, ... > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c >

Re: [PATCH v2 2/2] drivers/char: mark extra reserved device memory in memory map

2024-03-18 Thread Jan Beulich
On 12.03.2024 17:25, Marek Marczykowski-Górecki wrote: > The IOMMU driver checks if RMRR/IVMD are marked as reserved in memory > map. This should be true for addresses coming from the firmware, but > when extra pages used by Xen itself are included in the mapping, those > are taken from usable RAM

Re: [PATCH 4/4] xen/virtual-region: Drop setup_virtual_regions()

2024-03-18 Thread Andrew Cooper
On 18/03/2024 1:29 pm, Jan Beulich wrote: > On 18.03.2024 12:04, Andrew Cooper wrote: >> --- a/xen/common/virtual_region.c >> +++ b/xen/common/virtual_region.c >> @@ -39,6 +39,11 @@ static struct virtual_region core = { >> { __start_bug_frames_2, __stop_bug_frames_2 }, >> { __star

Re: [PATCH 3/4] xen/virtual-region: Link the list build time

2024-03-18 Thread Andrew Cooper
On 18/03/2024 1:25 pm, Jan Beulich wrote: > On 18.03.2024 12:04, Andrew Cooper wrote: >> Given 3 statically initialised objects, its easy to link the list at build >> time. There's no need to do it during runtime at boot (and with IRQs-off, >> even). > Hmm, technically that's correct, but isn't th

Re: [PATCH v2 1/3] x86: Move SVM features exposed to guest into hvm_max_cpu_policy

2024-03-18 Thread Jan Beulich
On 13.03.2024 13:24, George Dunlap wrote: > Currently (nested) SVM features we're willing to expose to the guest > are defined in calculate_host_policy, and stored in host_cpu_policy. > This is the wrong place for this; move it into > calculate_hvm_max_policy(), and store it in hvm_max_cpu_policy.

Re: [PATCH v2 2/3] nestedsvm: Disable TscRateMSR

2024-03-18 Thread Jan Beulich
On 13.03.2024 13:24, George Dunlap wrote: > The primary purpose of TSC scaling, from our perspective, is to > maintain the fiction of an "invariant TSC" across migrates between > platforms with different clock speeds. > > On AMD, the TscRateMSR CPUID bit is unconditionally enabled in the > "host c

Re: [PATCH v2 3/3] svm/nestedsvm: Introduce nested capabilities bit

2024-03-18 Thread Jan Beulich
On 13.03.2024 13:24, George Dunlap wrote: > In order to make implementation and testing tractable, we will require > specific host functionality. Add a nested_virt bit to hvm_funcs.caps, > and return an error if a domain is created with nested virt and this > bit isn't set. Create VMX and SVM cal

Re: [PATCH 4/4] xen/virtual-region: Drop setup_virtual_regions()

2024-03-18 Thread Jan Beulich
On 18.03.2024 14:49, Andrew Cooper wrote: > On 18/03/2024 1:29 pm, Jan Beulich wrote: >> On 18.03.2024 12:04, Andrew Cooper wrote: >>> --- a/xen/common/virtual_region.c >>> +++ b/xen/common/virtual_region.c >>> @@ -39,6 +39,11 @@ static struct virtual_region core = { >>> { __start_bug_fram

Re: [PATCH 3/4] xen/virtual-region: Link the list build time

2024-03-18 Thread Jan Beulich
On 18.03.2024 14:54, Andrew Cooper wrote: > On 18/03/2024 1:25 pm, Jan Beulich wrote: >> On 18.03.2024 12:04, Andrew Cooper wrote: >>> Given 3 statically initialised objects, its easy to link the list at build >>> time. There's no need to do it during runtime at boot (and with IRQs-off, >>> even).

Re: [PATCH v5 02/13] xen/spinlock: introduce new type for recursive spinlocks

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > Introduce a new type "rspinlock_t" to be used for recursive spinlocks. > > For now it is only an alias of spinlock_t, so both types can still be > used for recursive spinlocks. This will be changed later, though. > > Switch all recursive spinlocks to th

Re: [PATCH v6 02/20] xen/riscv: disable unnecessary configs

2024-03-18 Thread Oleksii
On Mon, 2024-03-18 at 08:54 +0100, Jan Beulich wrote: > On 15.03.2024 19:05, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/configs/tiny64_defconfig > > +++ b/xen/arch/riscv/configs/tiny64_defconfig > > @@ -7,6 +7,23 @@ > >  # CONFIG_GRANT_TABLE is not set > >  # CONFIG_SPECULATIVE_HARDEN_ARRAY i

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > Instead of special casing rspin_lock_irqsave() and > rspin_unlock_irqrestore() for the console lock, add those functions > to spinlock handling and use them where needed. > > Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich with two remarks: > -

Re: [PATCH v5 07/13] xen/spinlock: add another function level

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > Add another function level in spinlock.c hiding the spinlock_t layout > from the low level locking code. > > This is done in preparation of introducing rspinlock_t for recursive > locks without having to duplicate all of the locking code. > > Signed-off

Re: [PATCH v5 08/13] xen/spinlock: add missing rspin_is_locked() and rspin_barrier()

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > --- a/xen/common/spinlock.c > +++ b/xen/common/spinlock.c > @@ -395,14 +395,7 @@ static bool always_inline spin_is_locked_common(const > spinlock_tickets_t *t) > > int _spin_is_locked(const spinlock_t *lock) > { > -/* > - * Recursive locks ma

Re: [PATCH v5 09/13] xen/spinlock: split recursive spinlocks from normal ones

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > Recursive and normal spinlocks are sharing the same data structure for > representation of the lock. This has two major disadvantages: > > - it is not clear from the definition of a lock, whether it is intended > to be used recursive or not, while a mi

Re: [PATCH v5 10/13] xen/spinlock: let all is_locked and trylock variants return bool

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > Switch the remaining trylock and is_locked variants to return bool. > > Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich

Re: [PATCH v5 11/13] xen/spinlock: support higher number of cpus

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > --- a/xen/include/xen/spinlock.h > +++ b/xen/include/xen/spinlock.h > @@ -8,16 +8,16 @@ > #include > #include > > -#define SPINLOCK_CPU_BITS 12 > +#define SPINLOCK_CPU_BITS 16 > > #ifdef CONFIG_DEBUG_LOCKS > union lock_debug { > -uint16_t

Re: [PATCH v5 08/13] xen/spinlock: add missing rspin_is_locked() and rspin_barrier()

2024-03-18 Thread Jürgen Groß
On 18.03.24 15:57, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -395,14 +395,7 @@ static bool always_inline spin_is_locked_common(const spinlock_tickets_t *t) int _spin_is_locked(const spinlock_t *lock) { -/*

Re: [PATCH v5 12/13] xen/rwlock: raise the number of possible cpus

2024-03-18 Thread Jan Beulich
On 14.03.2024 08:20, Juergen Gross wrote: > The rwlock handling is limiting the number of cpus to 4095 today. The > main reason is the use of the atomic_t data type for the main lock > handling, which needs 2 bits for the locking state (writer waiting or > write locked), 12 bits for the id of a pos

Re: [PATCH v5 08/13] xen/spinlock: add missing rspin_is_locked() and rspin_barrier()

2024-03-18 Thread Jan Beulich
On 18.03.2024 16:31, Jürgen Groß wrote: > On 18.03.24 15:57, Jan Beulich wrote: >> On 14.03.2024 08:20, Juergen Gross wrote: >>> --- a/xen/common/spinlock.c >>> +++ b/xen/common/spinlock.c >>> @@ -395,14 +395,7 @@ static bool always_inline spin_is_locked_common(const >>> spinlock_tickets_t *t) >>>

Re: [PATCH v5 08/13] xen/spinlock: add missing rspin_is_locked() and rspin_barrier()

2024-03-18 Thread Jürgen Groß
On 18.03.24 16:44, Jan Beulich wrote: On 18.03.2024 16:31, Jürgen Groß wrote: On 18.03.24 15:57, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -395,14 +395,7 @@ static bool always_inline spin_is_locked_common(const spin

Re: [PATCH v2 1/2] IOMMU: store name for extra reserved device memory

2024-03-18 Thread Roger Pau Monné
On Mon, Mar 18, 2024 at 02:40:21PM +0100, Jan Beulich wrote: > On 12.03.2024 17:25, Marek Marczykowski-Górecki wrote: > > It will be useful for error reporting in a subsequent patch. > > > > Signed-off-by: Marek Marczykowski-Górecki > > In principle > Acked-by: Jan Beulich > However, ... > > >

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jürgen Groß
On 18.03.24 15:43, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: Instead of special casing rspin_lock_irqsave() and rspin_unlock_irqrestore() for the console lock, add those functions to spinlock handling and use them where needed. Signed-off-by: Juergen Gross Reviewed-by: Jan

Re: [PATCH v5 11/13] xen/spinlock: support higher number of cpus

2024-03-18 Thread Jürgen Groß
On 18.03.24 16:08, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -8,16 +8,16 @@ #include #include -#define SPINLOCK_CPU_BITS 12 +#define SPINLOCK_CPU_BITS 16 #ifdef CONFIG_DEBUG_LOCKS union lo

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jan Beulich
On 18.03.2024 16:55, Jürgen Groß wrote: > On 18.03.24 15:43, Jan Beulich wrote: >> On 14.03.2024 08:20, Juergen Gross wrote: >>> Instead of special casing rspin_lock_irqsave() and >>> rspin_unlock_irqrestore() for the console lock, add those functions >>> to spinlock handling and use them where nee

Re: [PATCH v5 12/13] xen/rwlock: raise the number of possible cpus

2024-03-18 Thread Jürgen Groß
On 18.03.24 16:39, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: The rwlock handling is limiting the number of cpus to 4095 today. The main reason is the use of the atomic_t data type for the main lock handling, which needs 2 bits for the locking state (writer waiting or write loc

Re: [PATCH v5 12/13] xen/rwlock: raise the number of possible cpus

2024-03-18 Thread Jan Beulich
On 18.03.2024 17:00, Jürgen Groß wrote: > On 18.03.24 16:39, Jan Beulich wrote: >> On 14.03.2024 08:20, Juergen Gross wrote: >>> @@ -36,14 +36,16 @@ void queue_write_lock_slowpath(rwlock_t *lock); >>> >>> static inline bool _is_write_locked_by_me(unsigned int cnts) >>> { >>> -BUILD_BUG_O

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jürgen Groß
On 18.03.24 16:59, Jan Beulich wrote: On 18.03.2024 16:55, Jürgen Groß wrote: On 18.03.24 15:43, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: Instead of special casing rspin_lock_irqsave() and rspin_unlock_irqrestore() for the console lock, add those functions to spinlock handl

Re: [PATCH v5 12/13] xen/rwlock: raise the number of possible cpus

2024-03-18 Thread Jürgen Groß
On 18.03.24 17:05, Jan Beulich wrote: On 18.03.2024 17:00, Jürgen Groß wrote: On 18.03.24 16:39, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: @@ -36,14 +36,16 @@ void queue_write_lock_slowpath(rwlock_t *lock); static inline bool _is_write_locked_by_me(unsigned int cnts)

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jan Beulich
On 18.03.2024 17:05, Jürgen Groß wrote: > On 18.03.24 16:59, Jan Beulich wrote: >> On 18.03.2024 16:55, Jürgen Groß wrote: >>> On 18.03.24 15:43, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: > Instead of special casing rspin_lock_irqsave() and > rspin_unlock_irqrestore(

Re: [PATCH v5 04/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2024-03-18 Thread Jürgen Groß
On 18.03.24 17:08, Jan Beulich wrote: On 18.03.2024 17:05, Jürgen Groß wrote: On 18.03.24 16:59, Jan Beulich wrote: On 18.03.2024 16:55, Jürgen Groß wrote: On 18.03.24 15:43, Jan Beulich wrote: On 14.03.2024 08:20, Juergen Gross wrote: Instead of special casing rspin_lock_irqsave() and rspin

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

2024-03-18 Thread osstest service owner
flight 185081 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185081/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

[xen-unstable test] 185072: tolerable FAIL

2024-03-18 Thread osstest service owner
flight 185072 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/185072/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-libvirt-raw 17 guest-start/debian.repeat fail in 185061 pass in 185072 test-amd64-amd64-xl-qe

[PATCH 0/7] xen/trace: Treewide API cleanup

2024-03-18 Thread Andrew Cooper
Rework the trace API to unify it (remove the HVM specific obfuscation), and remove MISRA violations. v3: * Delete TRACE_PARAM64() Andrew Cooper (7): xen/trace: Introduce new API xen/credit2: Clean up trace handling xen/rt: Clean up trace handling xen/sched: Clean up trace handling xen:

[PATCH 4/7] xen/sched: Clean up trace handling

2024-03-18 Thread Andrew Cooper
There is no need for bitfields anywhere - use more sensible types. There is also no need to cast 'd' to (unsigned char *) before passing it to a function taking void *. Switch to new trace_time() API. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Dario Faggioli --- CC: Georg

[PATCH 2/7] xen/credit2: Clean up trace handling

2024-03-18 Thread Andrew Cooper
There is no need for bitfields anywhere - use more sensible types. There is also no need to cast 'd' to (unsigned char *) before passing it to a function taking void *. Switch to new trace_time() API. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Dar

[PATCH 6/7] xen/trace: Update final {__,}trace_var() users to the new API

2024-03-18 Thread Andrew Cooper
This logically drops the cycles parameter, as it's now encoded directly in the event code. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: George Dunlap CC: Stefano Stabellini CC: Julien Grall CC: Nicola Vetrini CC: consult...@bugseng.com v3

[PATCH 1/7] xen/trace: Introduce new API

2024-03-18 Thread Andrew Cooper
trace() and trace_time(), in function form for struct arguments, and macro form for simple uint32_t list arguments. This will be used to clean up the mess of macros which exists throughout the codebase, as well as eventually dropping __trace_var(). There is intentionally no macro to split a 64-bi

[PATCH 3/7] xen/rt: Clean up trace handling

2024-03-18 Thread Andrew Cooper
Most uses of bitfields and __packed are unnecessary. There is also no need to cast 'd' to (unsigned char *) before passing it to a function taking void *. Switch to new trace_time() API. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Dario Faggioli --- CC: George Dunlap CC: J

[PATCH 5/7] xen: Switch to new TRACE() API

2024-03-18 Thread Andrew Cooper
(Almost) no functional change. irq_move_cleanup_interrupt() changes two smp_processor_id() calls to the 'me' local variable which manifests as a minor code improvement. All other differences in the compiled binary are to do with line numbers changing. Some conversion notes: * HVMTRACE_LONG_[234

[PATCH 7/7] xen/trace: Drop old trace API

2024-03-18 Thread Andrew Cooper
With all users updated to the new API, drop the old API. This includes all of asm/hvm/trace.h, which allows us to drop some includes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: George Dunlap CC: Stefano Stabellini CC: Julien Grall CC: Nicola Vetrini CC: consul

Re: [XEN PATCH 01/10] x86/cpufeature: add parentheses to comply with Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

Re: [XEN PATCH 02/10] AMD/IOMMU: guest: address violations of MISRA C Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

Re: [XEN PATCH 05/10] EFI: address violations of MISRA C Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

Re: [XEN PATCH 07/10] xen/efi: efibind: address violations of MISRA C Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

Re: [XEN PATCH 08/10] xen/notifier: address violations of MISRA C Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

Re: [XEN PATCH 09/10] xen/wait: address violations of MISRA C Rule 20.7

2024-03-18 Thread Jan Beulich
On 18.03.2024 12:53, Nicola Vetrini wrote: > MISRA C Rule 20.7 states: "Expressions resulting from the expansion > of macro parameters shall be enclosed in parentheses". Therefore, some > macro definitions should gain additional parentheses to ensure that all > current and future users will be safe

[OSSTEST PATCH 00/36] Switch to Debian Bookworm

2024-03-18 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/osstest.git br.bookworm-v1 Hi, I intend to push this series in two waves. First, push up to commit "Temporally switch "qemu-mainline" branch to Bookworm". This is to test that osstest still works fine if w

[OSSTEST PATCH 06/36] ts-host-install: fix ntp server setting

2024-03-18 Thread Anthony PERARD
The Debian #778564 bug report is still open, the ntp.conf file doesn't contain the setting from NtpServer after installation, so we still need to edit ntp.conf on Bookworm. Signed-off-by: Anthony PERARD --- ts-host-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-ho

[OSSTEST PATCH 08/36] preseed_create: Use new "d-i grub-installer/update-nvram" for UEFI installation

2024-03-18 Thread Anthony PERARD
Instead of "grub-installer/no-nvram" proposed in Debian bug #789798, we have "grub-installer/update-nvram". Make use of it, and remove workaround. Signed-off-by: Anthony PERARD --- Osstest/Debian.pm | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Osstest/Debian.pm

[OSSTEST PATCH 05/36] ts-host-install: fix ntp.conf path on bookworm

2024-03-18 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- ts-host-install | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts-host-install b/ts-host-install index f79a1beb..61433e64 100755 --- a/ts-host-install +++ b/ts-host-install @@ -151,7 +151,13 @@ END my $ntpserver = get_target_pro

[OSSTEST PATCH 03/36] mgi-common: Fix fetch_debian_package error message

2024-03-18 Thread Anthony PERARD
$@ expand to two or more words, but fail() only take one argument. So if there's more than one argument left, fail() only shows the first one, and don't event display "not found". Signed-off-by: Anthony PERARD --- mgi-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgi

[OSSTEST PATCH 10/36] preseed_create: Workaround fail grub-install on arndale

2024-03-18 Thread Anthony PERARD
grub-installer on arndale-* machine fails with Debian Bookworm. It tries to install "grub-pc" which doesn't exist. Skip installation. Somehow, cubietruck-* installation works fine. Signed-off-by: Anthony PERARD --- Osstest/Debian.pm | 8 1 file changed, 8 insertions(+) diff --git a/Os

[OSSTEST PATCH 01/36] production-config: Add bookworm debian install media filename

2024-03-18 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- production-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/production-config b/production-config index 2c44805c..6345c40c 100644 --- a/production-config +++ b/production-config @@ -101,6 +101,8 @@ DebianImageVersion_jessie 8.2.0 DebianImageVersion_s

[OSSTEST PATCH 02/36] ts-xen-build-prep: Only force git protocol v2 on buster

2024-03-18 Thread Anthony PERARD
Newer version of Debian and thus git would use this automatically, no need to force it. Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index f0e087aa..0dded9b2 100644 ---

[OSSTEST PATCH 13/36] Disable persistent net generator on Bookworm

2024-03-18 Thread Anthony PERARD
This schema doesn't work. Even if the udev rule is there, the name of the different NIC are different from one boot to the next. On a machine (sabro*) with 3 different NIC, the name of each interface is basically random and could take on of three name, "eth[0-2]". net.ifnames=0 does still mean tha

[OSSTEST PATCH 07/36] ts-host-install: Restart ntp service

2024-03-18 Thread Anthony PERARD
Otherwise, the change to the config file isn't taken into account until the next reboot. Signed-off-by: Anthony PERARD --- ts-host-install | 5 + 1 file changed, 5 insertions(+) diff --git a/ts-host-install b/ts-host-install index 00277485..43ed9285 100755 --- a/ts-host-install +++ b/ts-hos

[OSSTEST PATCH 04/36] mg-debian-installer-update: Download non-free firmware from new repo.

2024-03-18 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- mg-debian-installer-update | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mg-debian-installer-update b/mg-debian-installer-update index 4fb4bc21..31b8a192 100755 --- a/mg-debian-installer-update +++ b/mg-debian-installer-update @@ -10

[OSSTEST PATCH 18/36] ts-xen-install: remove "libc6-xen" package installation

2024-03-18 Thread Anthony PERARD
libc6-xen packaged have been removed from Debian Bookworm. Signed-off-by: Anthony PERARD --- ts-xen-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-xen-install b/ts-xen-install index bf55d4e5..3a913fce 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -64,7 +64,7

  1   2   >