Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-20 Thread James Dingwall
On Fri, Nov 17, 2023 at 10:56:30AM +0100, Jan Beulich wrote: > On 17.11.2023 10:18, James Dingwall wrote: > > On Thu, Nov 16, 2023 at 04:32:47PM +, Andrew Cooper wrote: > >> On 16/11/2023 4:15 pm, James Dingwall wrote: > >>> Hi, > >>> > >>> Per the msr_relaxed documentation: > >>> > >>>"If

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-20 Thread Nicola Vetrini
On 2023-11-17 20:15, Julien Grall wrote: Hi Nicola, On 16/11/2023 09:15, Nicola Vetrini wrote: On 2023-11-16 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. Add missing 'xen/c

Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-20 Thread James Dingwall
On Fri, Nov 17, 2023 at 11:17:46AM +0100, Roger Pau Monné wrote: > On Fri, Nov 17, 2023 at 09:18:39AM +, James Dingwall wrote: > > On Thu, Nov 16, 2023 at 04:32:47PM +, Andrew Cooper wrote: > > > On 16/11/2023 4:15 pm, James Dingwall wrote: > > > > Hi, > > > > > > > > Per the msr_relaxed do

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-20 Thread Jan Beulich
On 20.11.2023 09:39, Nicola Vetrini wrote: > I do have a folder with all my in-flight patches. Please note that this > big backlog has partly been the result of patches being acked, but not > committed. Which in turn is a result of there having been too many patches while the tree was closed. Ye

Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-20 Thread Jan Beulich
On 20.11.2023 09:27, James Dingwall wrote: > On Fri, Nov 17, 2023 at 10:56:30AM +0100, Jan Beulich wrote: >> On 17.11.2023 10:18, James Dingwall wrote: >>> On Thu, Nov 16, 2023 at 04:32:47PM +, Andrew Cooper wrote: On 16/11/2023 4:15 pm, James Dingwall wrote: > Hi, > > Per the

Re: [PATCH v6 17/17] docs: update numa command line to support Arm

2023-11-20 Thread Jan Beulich
On 20.11.2023 03:54, Henry Wang wrote: > --- a/CHANGELOG.md > +++ b/CHANGELOG.md > @@ -12,6 +12,7 @@ The format is based on [Keep a > Changelog](https://keepachangelog.com/en/1.0.0/) > - On x86: > - Introduce a new x2APIC driver that uses Cluster Logical addressing mode > for IPIs and

Re: [PATCH v6 17/17] docs: update numa command line to support Arm

2023-11-20 Thread Henry Wang
Hi Jan, > On Nov 20, 2023, at 16:55, Jan Beulich wrote: > > On 20.11.2023 03:54, Henry Wang wrote: >> --- a/CHANGELOG.md >> +++ b/CHANGELOG.md >> @@ -12,6 +12,7 @@ The format is based on [Keep a >> Changelog](https://keepachangelog.com/en/1.0.0/) >> - On x86: >>- Introduce a new x2APIC dri

Re: [XEN PATCH 3/5] xen/sort: address violations of MISRA C:2012 Rule 8.2

2023-11-20 Thread Jan Beulich
On 17.11.2023 09:40, Federico Serafini wrote: > --- a/xen/include/xen/sort.h > +++ b/xen/include/xen/sort.h > @@ -23,8 +23,8 @@ > extern gnu_inline > #endif > void sort(void *base, size_t num, size_t size, > - int (*cmp)(const void *, const void *), > - void (*swap)(void *, voi

Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 08:44:41AM +, James Dingwall wrote: > On Fri, Nov 17, 2023 at 11:17:46AM +0100, Roger Pau Monné wrote: > > On Fri, Nov 17, 2023 at 09:18:39AM +, James Dingwall wrote: > > > On Thu, Nov 16, 2023 at 04:32:47PM +, Andrew Cooper wrote: > > > > On 16/11/2023 4:15 pm,

Re: xen 4.15.5: msr_relaxed required for MSR 0x1a2

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 08:27:36AM +, James Dingwall wrote: > On Fri, Nov 17, 2023 at 10:56:30AM +0100, Jan Beulich wrote: > > On 17.11.2023 10:18, James Dingwall wrote: > > > On Thu, Nov 16, 2023 at 04:32:47PM +, Andrew Cooper wrote: > > >> On 16/11/2023 4:15 pm, James Dingwall wrote: > >

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Jan Beulich
On 17.11.2023 12:55, Andrew Cooper wrote: > On 17/11/2023 9:47 am, Roger Pau Monne wrote: >> Using different page table levels for HVM or PV guest is not helpful, and is >> not inline with the IOMMU implementation used by the other architecture >> vendor >> (VT-d). >> >> Switch to uniformly use DE

[xen-unstable test] 183795: FAIL

2023-11-20 Thread osstest service owner
flight 183795 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183795/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm broken in 183791 Tes

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-20 Thread Julien Grall
Hi Stefano, On 18/11/2023 02:47, Stefano Stabellini wrote: On Fri, 17 Nov 2023, Julien Grall wrote: On 16/11/2023 09:15, Nicola Vetrini wrote: On 2023-11-16 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute,

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 10:45:29AM +0100, Jan Beulich wrote: > On 17.11.2023 12:55, Andrew Cooper wrote: > > On 17/11/2023 9:47 am, Roger Pau Monne wrote: > >> Using different page table levels for HVM or PV guest is not helpful, and > >> is > >> not inline with the IOMMU implementation used by th

Re: [XEN PATCH v3] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-20 Thread Julien Grall
Hi Nicola, On 20/11/2023 08:39, Nicola Vetrini wrote: On 2023-11-17 20:15, Julien Grall wrote: Hi Nicola, On 16/11/2023 09:15, Nicola Vetrini wrote: On 2023-11-16 10:08, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-att

Re: [PATCH 3/3] x86/iommu: use a rangeset for hwdom setup

2023-11-20 Thread Jan Beulich
On 17.11.2023 10:47, Roger Pau Monne wrote: > --- a/xen/arch/x86/hvm/io.c > +++ b/xen/arch/x86/hvm/io.c > @@ -364,9 +364,20 @@ static const struct hvm_mmcfg *vpci_mmcfg_find(const > struct domain *d, > return NULL; > } > > -bool vpci_is_mmcfg_address(const struct domain *d, paddr_t addr) >

Re: [PATCH] stubdom: remove caml-stubdom

2023-11-20 Thread Juergen Gross
On 01.11.23 17:08, Juergen Gross wrote: In order to build caml-stubdom, it must be explicitly enabled via "configure --enable-caml-stubdom". The build process is failing due to stubdom/ocaml.patch failing to apply. Since the patched file has been modified in 2014 the last time, it seems nobody ca

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Jan Beulich
On 20.11.2023 11:27, Roger Pau Monné wrote: > On Mon, Nov 20, 2023 at 10:45:29AM +0100, Jan Beulich wrote: >> On 17.11.2023 12:55, Andrew Cooper wrote: >>> On 17/11/2023 9:47 am, Roger Pau Monne wrote: /* - * Choose the number of levels for the IOMMU page tables. - * - P

Re: [PATCH 3/3] x86/iommu: use a rangeset for hwdom setup

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 11:30:16AM +0100, Jan Beulich wrote: > On 17.11.2023 10:47, Roger Pau Monne wrote: > > --- a/xen/arch/x86/hvm/io.c > > +++ b/xen/arch/x86/hvm/io.c > > @@ -364,9 +364,20 @@ static const struct hvm_mmcfg *vpci_mmcfg_find(const > > struct domain *d, > > return NULL; > >

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 11:37:43AM +0100, Jan Beulich wrote: > On 20.11.2023 11:27, Roger Pau Monné wrote: > > On Mon, Nov 20, 2023 at 10:45:29AM +0100, Jan Beulich wrote: > >> On 17.11.2023 12:55, Andrew Cooper wrote: > >>> On 17/11/2023 9:47 am, Roger Pau Monne wrote: > /* > -

xen | Failed pipeline for staging | cfb77779

2023-11-20 Thread GitLab
Pipeline #1078515214 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: cfb9 ( https://gitlab.com/xen-project/xen/-/commit/cfb91d39e025cf625ba1fa080597d4defef6 ) Commit Message: amd/iommu: fu

Re: Devise macros to encapsulate (x & -x)

2023-11-20 Thread Julien Grall
On 18/11/2023 02:46, Stefano Stabellini wrote: On Fri, 17 Nov 2023, Andrew Cooper wrote: On 17/11/2023 10:17 am, Nicola Vetrini wrote: Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /*

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

2023-11-20 Thread Roger Pau Monné
On Fri, Nov 17, 2023 at 06:27:50PM -0800, Stefano Stabellini wrote: > On Fri, 17 Nov 2023, Roger Pau Monné wrote: > > On Thu, Nov 16, 2023 at 05:14:23PM -0800, Stefano Stabellini wrote: > > > On Thu, 16 Nov 2023, Roger Pau Monne wrote: > > > > Instead of using specific architecture image, switch to

Re: xen | Failed pipeline for staging | cfb77779

2023-11-20 Thread Jan Beulich
On 20.11.2023 12:07, GitLab wrote: > > > Pipeline #1078515214 has failed! > > Project: xen ( https://gitlab.com/xen-project/xen ) > Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) > > Commit: cfb9 ( > https://gitlab.com/xen-project/xen/-/commit/cfb91d39e025cf62

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Jan Beulich
On 20.11.2023 11:50, Roger Pau Monné wrote: > On Mon, Nov 20, 2023 at 11:37:43AM +0100, Jan Beulich wrote: >> On 20.11.2023 11:27, Roger Pau Monné wrote: >>> On Mon, Nov 20, 2023 at 10:45:29AM +0100, Jan Beulich wrote: On 17.11.2023 12:55, Andrew Cooper wrote: > On 17/11/2023 9:47 am, Roge

[PATCH v3 01/13] xen/spinlock: fix coding style issues

2023-11-20 Thread Juergen Gross
Fix some coding style issues in spinlock coding: - Instead of u64 etc. use the preferred uint64_t etc. types - Remove some trailing spaces - Add missing spaces in "if" statements - Add some missing blank lines While modifying the line, add const for the observed_head() parameter. Signed-off-by:

[PATCH v3 00/13] xen/spinlock: make recursive spinlocks a dedicated type

2023-11-20 Thread Juergen Gross
Instead of being able to use normal spinlocks as recursive ones, too, make recursive spinlocks a special lock type. This will make the spinlock structure smaller in production builds and add type-safety. This allows to increase the maximum number of physical cpus from 8191 to 65535 without increa

[PATCH v3 03/13] xen/spinlock: make spinlock initializers more readable

2023-11-20 Thread Juergen Gross
Use named member initializers instead of positional ones for the macros used to initialize structures. Signed-off-by: Juergen Gross Acked-by: Jan Beulich --- V2: - new patch --- xen/include/xen/spinlock.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/xen/i

[PATCH v3 02/13] xen/spinlock: reduce lock profile ifdefs

2023-11-20 Thread Juergen Gross
With some small adjustments to the LOCK_PROFILE_* macros some #ifdefs can be dropped from spinlock.c. Signed-off-by: Juergen Gross --- V2: - new patch V3: - add variable name to macros parameter (Jan Beulich) --- xen/common/spinlock.c | 49 +++ 1 file chan

[PATCH v3 05/13] xen/spinlock: rename recursive lock functions

2023-11-20 Thread Juergen Gross
Rename the recursive spin_lock() functions by replacing the trailing "_recursive" with a leading "r". Switch the parameter to be a pointer to rspinlock_t. Remove the indirection through a macro, as it is adding only complexity without any gain. Suggested-by: Jan Beulich Signed-off-by: Juergen G

[PATCH v3 07/13] xen/spinlock: make struct lock_profile rspinlock_t aware

2023-11-20 Thread Juergen Gross
Struct lock_profile contains a pointer to the spinlock it is associated with. Prepare support of differing spinlock_t and rspinlock_t types by adding a type indicator of the pointer. Use the highest bit of the block_cnt member for this indicator in order to not grow the struct while hurting only th

[PATCH v3 04/13] xen/spinlock: introduce new type for recursive spinlocks

2023-11-20 Thread Juergen Gross
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 the new type. Define the initializer helpers and use th

[PATCH v3 09/13] xen/spinlock: add another function level

2023-11-20 Thread Juergen Gross
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-by: Juergen Gross --- V2: - new patch --- xen/common/

[PATCH v3 06/13] xen/spinlock: add rspin_[un]lock_irq[save|restore]()

2023-11-20 Thread Juergen Gross
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 --- V2: - new patch --- xen/arch/x86/traps.c | 14 -- xen/common/spinlock.c |

[PATCH v3 08/13] xen/spinlock: add explicit non-recursive locking functions

2023-11-20 Thread Juergen Gross
In order to prepare a type-safe recursive spinlock structure, add explicitly non-recursive locking functions to be used for non-recursive locking of spinlocks, which are used recursively, too. Signed-off-by: Juergen Gross --- V2: - rename functions (Jan Beulich) - get rid of !! in pcidevs_locked(

[PATCH v3 10/13] xen/spinlock: add missing rspin_is_locked() and rspin_barrier()

2023-11-20 Thread Juergen Gross
Add rspin_is_locked() and rspin_barrier() in order to prepare differing spinlock_t and rspinlock_t types. Signed-off-by: Juergen Gross --- V2: - partially carved out from V1 patch, partially new --- xen/arch/x86/mm/p2m-pod.c | 2 +- xen/common/domain.c | 2 +- xen/common/page_all

AMD Working On VirtIO GPU Support For Xen Virtualization issues

2023-11-20 Thread ZHANG Zewei
INTERNAL & PARTNERS Hi,Xen-devel: We are trying to implement the igpu sharing function for domU on the AMD (v2000 series) development board environment, and the software architecture is xen + ubuntu 22.04 (dom0) + Ubuntu 22.04 (Dom U). We found that AMD engineers like Mr. Huang @ray.hu..

[PATCH v3 13/13] xen/spinlock: support higher number of cpus

2023-11-20 Thread Juergen Gross
Allow 16 bits per cpu number, which is the limit imposed by spinlock_tickets_t. This will allow up to 65535 cpus, while increasing only the size of recursive spinlocks in debug builds from 8 to 12 bytes. Signed-off-by: Juergen Gross --- xen/common/spinlock.c | 1 + xen/include/xen/spinloc

[PATCH v3 11/13] xen/spinlock: split recursive spinlocks from normal ones

2023-11-20 Thread Juergen Gross
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 mixture of both usage variants needs to be - in pro

[PATCH v3 12/13] xen/spinlock: remove indirection through macros for spin_*() functions

2023-11-20 Thread Juergen Gross
In reality all spin_*() functions are macros which are defined to just call a related real function. Remove this macro layer, as it is adding complexity without any gain. Signed-off-by: Juergen Gross --- V2: - new patch --- xen/common/spinlock.c | 28 +- xen/include/xen/spi

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 12:34:45PM +0100, Jan Beulich wrote: > On 20.11.2023 11:50, Roger Pau Monné wrote: > > On Mon, Nov 20, 2023 at 11:37:43AM +0100, Jan Beulich wrote: > >> On 20.11.2023 11:27, Roger Pau Monné wrote: > >>> On Mon, Nov 20, 2023 at 10:45:29AM +0100, Jan Beulich wrote: > On 1

Re: [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead()

2023-11-20 Thread David Woodhouse
On Fri, 2023-10-27 at 21:14 +0200, Peter Zijlstra wrote: > On Fri, Oct 27, 2023 at 07:36:51PM +0100, David Woodhouse wrote: > > From: David Woodhouse > > > > Xen HVM guests were observed taking triple-faults when attempting to > > online a previously offlined vCPU. > > > > Investigation showed t

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

2023-11-20 Thread Volodymyr Babchuk
Hi Julien, Julien Grall writes: > Hi Volodymyr, > > On 16/11/2023 20:56, Volodymyr Babchuk wrote: >> It is very helpful to see domain id why analyzing xenstored >> traces. Especially when you are trying to understand which exactly >> domain performs an action. >> Signed-off-by: Volodymyr Babch

Re: [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead()

2023-11-20 Thread Rafael J. Wysocki
On Mon, Nov 20, 2023 at 1:20 PM David Woodhouse wrote: > > On Fri, 2023-10-27 at 21:14 +0200, Peter Zijlstra wrote: > > On Fri, Oct 27, 2023 at 07:36:51PM +0100, David Woodhouse wrote: > > > From: David Woodhouse > > > > > > Xen HVM guests were observed taking triple-faults when attempting to > >

Re: [XEN PATCH 3/5] xen/sort: address violations of MISRA C:2012 Rule 8.2

2023-11-20 Thread Federico Serafini
On 20/11/23 10:02, Jan Beulich wrote: On 17.11.2023 09:40, Federico Serafini wrote: --- a/xen/include/xen/sort.h +++ b/xen/include/xen/sort.h @@ -23,8 +23,8 @@ extern gnu_inline #endif void sort(void *base, size_t num, size_t size, - int (*cmp)(const void *, const void *), -

[XEN PATCH] automation/eclair: improve scheduled analyses

2023-11-20 Thread Simone Ballarin
The scheduled analyses are intended to maintain an overall vision of the MISRA complaince of the entire project. For this reason, the file exclusions in "out_of_scope.ecl" should not be applied. This patch amends ECLAIR settings to prevent exempting files for scheduled analyses and prevents schedu

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

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

Re: [PATCH v5 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-20 Thread Julien Grall
On 20/11/2023 07:34, Michal Orzel wrote: Hi Luca, On 14/11/2023 10:03, Luca Fancellu wrote: Currently the dom0less feature code is mostly inside domain_build.c and setup.c, it is a feature that may not be useful to everyone so put the code in a different compilation module in order to make

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

2023-11-20 Thread Julien Grall
Hi Volodymyr, On 20/11/2023 12:28, Volodymyr Babchuk wrote: Julien Grall writes: Hi Volodymyr, On 16/11/2023 20:56, Volodymyr Babchuk wrote: It is very helpful to see domain id why analyzing xenstored traces. Especially when you are trying to understand which exactly domain performs an acti

Re: [XEN PATCH 1/5] xen/common: address violations of MISRA C:2012 Rule 8.2

2023-11-20 Thread Federico Serafini
On 18/11/23 03:59, Stefano Stabellini wrote: On Fri, 17 Nov 2023, Federico Serafini wrote: diff --git a/xen/common/stop_machine.c b/xen/common/stop_machine.c index 3adbe380de..398cfd507c 100644 --- a/xen/common/stop_machine.c +++ b/xen/common/stop_machine.c @@ -46,7 +46,7 @@ struct stopmachine_d

Interest in Release Manager Role

2023-11-20 Thread Oleksii
Dear Xen Community, I am keen on stepping into the role of a Release Manager for our next release. Despite not having direct experience yet, I am eager to learn, adapt, and grow into this role with your guidance and support. Have a nice week. Best regards, Oleksii

Re: [PATCH v5 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-20 Thread Michal Orzel
Hi Julien, On 20/11/2023 14:40, Julien Grall wrote: > > > On 20/11/2023 07:34, Michal Orzel wrote: >> Hi Luca, >> >> On 14/11/2023 10:03, Luca Fancellu wrote: >>> >>> >>> Currently the dom0less feature code is mostly inside domain_build.c >>> and setup.c, it is a feature that may not be useful t

Xen Project Releases Version 4.18

2023-11-20 Thread Kelly Choi
Hi everyone, It's with great pleasure that I announce our 4.18 PR release! *Please find the PR article attached here , and

Re: [PATCH v5 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-20 Thread Luca Fancellu
Signed-off-by: Luca Fancellu >>> Reviewed-by: Michal Orzel >>> >>> with one remark... >>> --- Changes from v4: - fixed name in inclusion macro __ASM_* instead of __ARM_*, fixed emacs local variable 'end:', style fix (Michal) Changes from v3: - remove hea

Re: Interest in Release Manager Role

2023-11-20 Thread Kelly Choi
Hi Oleksii, Thanks for your email, and for volunteering to be the next release manager. Don't forget to mention this on the next community call in December! I am sure the community and myself will be happy to support you during this process. Many thanks, Kelly Choi Open Source Community Manager

[XEN v5 1/2] xen/arm32: head: Introduce enable_{boot,secondary}_cpu_mm()

2023-11-20 Thread Ayan Kumar Halder
All the MMU related functionality have been clubbed together in enable_boot_cpu_mm() for booting primary cpu and enable_secondary_cpu_mm() for booting secondary cpus. This is done in preparation for moving the code related to MMU in MMU specific file and in order to support non MMU cpus in future.

[XEN v5 0/2] xen/arm: Split MMU code as the prepration of MPU work form Arm32

2023-11-20 Thread Ayan Kumar Halder
Hi, These are the set of patches based on top of "[PATCH v9 0/8] xen/arm: Split MMU code as the prepration of MPU work". This is the preparation work to add MPU support on Arm32. Changes from :- v1 - Dropped "[XEN v1 1/4] xen/arm: arm32: Move pt_enforce_wxn() so that it can be bundled with othe

[XEN v5 2/2] xen/arm32: head Split and move MMU-specific head.S to mmu/head.S

2023-11-20 Thread Ayan Kumar Halder
The MMU specific code in head.S will not be used on MPU systems. Instead of introducing more #ifdefs which will bring complexity to the code, move MMU related code to mmu/head.S and keep common code in head.S. Few notes while moving: - As "fail" in original head.S is very simple and this name is t

[PATCH 2/3] xen/treewide: Switch bool_t to bool

2023-11-20 Thread Andrew Cooper
... as part of cleaning up the types used. Minor style and/or MISRA cleanup on some altered lines. No functional change. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monné --- xen/common/device_tree.c

[PATCH 0/3] xen: Drop bool_t

2023-11-20 Thread Andrew Cooper
Final cleanup of bool_t. Andrew Cooper (3): x86/treewide: Switch bool_t to bool xen/treewide: Switch bool_t to bool xen: Drop bool_t xen/arch/x86/cpu/microcode/core.c| 4 +-- xen/arch/x86/cpu/mtrr/generic.c | 2 +- xen/arch/x86/cpu/vpmu.c | 2 +- xen/ar

[PATCH 1/3] x86/treewide: Switch bool_t to bool

2023-11-20 Thread Andrew Cooper
... as part of cleaning up the types used. Minor style cleanup on some altered lines. No functional change. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monné There's not an obvious way to subdivide t

[PATCH 3/3] xen: Drop bool_t

2023-11-20 Thread Andrew Cooper
No more users. This completes the work started in commit 920234259475 ("xen/build: Use C99 booleans"), July 2016. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monné --- xen/include/xen/types.h | 1 - 1

Re: [PATCH v10 05/17] vpci: add hooks for PCI device assign/de-assign

2023-11-20 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:15PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > When a PCI device gets assigned/de-assigned we need to > initialize/de-initialize vPCI state for the device. > > Also, rename vpci_add_handlers() to vpci_assign_device() and > vpci_remove_devic

Re: [PATCH v10 06/17] vpci/header: rework exit path in init_bars

2023-11-20 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:16PM +, Volodymyr Babchuk wrote: > Introduce "fail" label in init_bars() function to have the centralized > error return path. This is the pre-requirement for the future changes > in this function. > > This patch does not introduce functional changes. > > Signed-

[PATCH] x86/ioapic: Check 1k alignment for IO-APIC physical addresses

2023-11-20 Thread Andrew Cooper
The MP spec requires a minimum of 1k alignment. So too does Xen's use of a single fixmap page to map the IO-APIC. Reject out-of-spec values so we don't end up in a position where a bad firmware value causes Xen to use the wrong mapping. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei

[ImageBuilder] uboot-script-gen: use size from arm32 zImage header

2023-11-20 Thread Michal Orzel
Take an example from commit 8bf401c99035 ("uboot-script-gen: use size from arm64 Image header") and add support for calculating the effective image size from arm32 zImage header. Introduce get_image_size() function and use it to to probe the supported header magic values and to retrieve the effect

Re: [PATCH v2 03/29] tools/xenlogd: connect to frontend

2023-11-20 Thread Jason Andryuk
On Fri, Nov 10, 2023 at 1:04 PM Juergen Gross wrote: > > Add the code for connecting to frontends to xenlogd. > > Signed-off-by: Juergen Gross > diff --git a/tools/xen-9pfsd/xen-9pfsd.c b/tools/xen-9pfsd/xen-9pfsd.c > index c365b35fe5..cc5734402d 100644 > --- a/tools/xen-9pfsd/xen-9pfsd.c > +++

Re: [XEN PATCH 3/5] xen/sort: address violations of MISRA C:2012 Rule 8.2

2023-11-20 Thread Jan Beulich
On 20.11.2023 14:13, Federico Serafini wrote: > On 20/11/23 10:02, Jan Beulich wrote: >> On 17.11.2023 09:40, Federico Serafini wrote: >>> --- a/xen/include/xen/sort.h >>> +++ b/xen/include/xen/sort.h >>> @@ -23,8 +23,8 @@ >>> extern gnu_inline >>> #endif >>> void sort(void *base, size_t num,

Re: [PATCH v10 07/17] vpci/header: implement guest BAR register handlers

2023-11-20 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:16PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Add relevant vpci register handlers when assigning PCI device to a domain > and remove those when de-assigning. This allows having different > handlers for different domains, e.g. hwdom and othe

Re: [PATCH] x86/ioapic: Check 1k alignment for IO-APIC physical addresses

2023-11-20 Thread Jan Beulich
On 20.11.2023 16:10, Andrew Cooper wrote: > The MP spec requires a minimum of 1k alignment. So too does Xen's use of a > single fixmap page to map the IO-APIC. > > Reject out-of-spec values so we don't end up in a position where a bad > firmware value causes Xen to use the wrong mapping. > > Sig

Re: [PATCH] x86/ioapic: Check 1k alignment for IO-APIC physical addresses

2023-11-20 Thread Andrew Cooper
On 20/11/2023 4:06 pm, Jan Beulich wrote: > On 20.11.2023 16:10, Andrew Cooper wrote: >> The MP spec requires a minimum of 1k alignment. So too does Xen's use of a >> single fixmap page to map the IO-APIC. >> >> Reject out-of-spec values so we don't end up in a position where a bad >> firmware val

Re: [PATCH v2 04/29] tools/xenlogd: add transport layer

2023-11-20 Thread Jason Andryuk
On Fri, Nov 10, 2023 at 1:27 PM Juergen Gross wrote: > > Add the transport layer of 9pfs. This is basically the infrastructure > to receive requests from the frontend and to send the related answers > via the rings. > > In order to avoid unaligned accesses e.g. on Arm, add the definition of > __pa

Re: [PATCH 1/3] x86/treewide: Switch bool_t to bool

2023-11-20 Thread Jan Beulich
On 20.11.2023 15:56, Andrew Cooper wrote: > ... as part of cleaning up the types used. Minor style cleanup on some > altered lines. > > No functional change. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich One small request and a nit, though: > --- a/xen/arch/x86/include/asm/apic.h >

Re: [PATCH 1/3] x86/treewide: Switch bool_t to bool

2023-11-20 Thread Andrew Cooper
On 20/11/2023 4:17 pm, Jan Beulich wrote: > On 20.11.2023 15:56, Andrew Cooper wrote: >> ... as part of cleaning up the types used. Minor style cleanup on some >> altered lines. >> >> No functional change. >> >> Signed-off-by: Andrew Cooper > Acked-by: Jan Beulich Thanks. > > One small request

Re: [PATCH 2/3] xen/treewide: Switch bool_t to bool

2023-11-20 Thread Jan Beulich
On 20.11.2023 15:56, Andrew Cooper wrote: > ... as part of cleaning up the types used. Minor style and/or MISRA cleanup > on some altered lines. > > No functional change. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich

Re: [PATCH 3/3] xen: Drop bool_t

2023-11-20 Thread Jan Beulich
On 20.11.2023 15:56, Andrew Cooper wrote: > No more users. > > This completes the work started in commit 920234259475 ("xen/build: Use C99 > booleans"), July 2016. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich

Re: [PATCH 1/3] amd-vi: use the same IOMMU page table levels for PV and HVM

2023-11-20 Thread Jan Beulich
On 20.11.2023 13:01, Roger Pau Monné wrote: > On Mon, Nov 20, 2023 at 12:34:45PM +0100, Jan Beulich wrote: >> Yet still this would then feel like an issue with the last patch alone, >> which the change here is merely avoiding (without this being a strict >> prereq). Instead I'd expect us to use 4 l

Re: Remaining violations of MISRA Rule 7.4

2023-11-20 Thread Nicola Vetrini
I've just rebased and pushed the residual from the past work (although I missed the ARM EFI fix.) https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=commitdiff;h=0f06bab762f5201f3e00aaaee704c3c01f516b51 https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1065699873 I'm goin

Re: [PATCH v2 05/29] tools/xenlogd: add 9pfs response generation support

2023-11-20 Thread Jason Andryuk
On Fri, Nov 10, 2023 at 1:41 PM Juergen Gross wrote: > > Add support for generation a 9pfs protocol response via a format based > approach. > > Strings are stored in a per device string buffer and they are > referenced via their offset in this buffer. This allows to avoid > having to dynamically a

Re: [PATCH v10 10/17] vpci/header: handle p2m range sets per BAR

2023-11-20 Thread Roger Pau Monné
On Thu, Oct 12, 2023 at 10:09:17PM +, Volodymyr Babchuk wrote: > From: Oleksandr Andrushchenko > > Instead of handling a single range set, that contains all the memory > regions of all the BARs and ROM, have them per BAR. > As the range sets are now created when a PCI device is added and dest

Re: [PATCH] x86/ioapic: Check 1k alignment for IO-APIC physical addresses

2023-11-20 Thread Roger Pau Monné
On Mon, Nov 20, 2023 at 03:10:06PM +, Andrew Cooper wrote: > The MP spec requires a minimum of 1k alignment. So too does Xen's use of a > single fixmap page to map the IO-APIC. > > Reject out-of-spec values so we don't end up in a position where a bad > firmware value causes Xen to use the wr

Re: [PATCH] x86/ioapic: Check 1k alignment for IO-APIC physical addresses

2023-11-20 Thread Andrew Cooper
On 20/11/2023 5:36 pm, Roger Pau Monné wrote: > On Mon, Nov 20, 2023 at 03:10:06PM +, Andrew Cooper wrote: >> The MP spec requires a minimum of 1k alignment. So too does Xen's use of a >> single fixmap page to map the IO-APIC. >> >> Reject out-of-spec values so we don't end up in a position wh

[PATCH] xenstored: use correct conversion specifier in the tracing function

2023-11-20 Thread Volodymyr Babchuk
Previous change to xenstored used "%d" to format conn->id while in fact conn->id has "unsigned int" type, so "%u" should be used. Fixes: 97f8555acbf3 ("xenstored: print domain id in traces") Signed-off-by: Volodymyr Babchuk --- tools/xenstored/core.c | 2 +- 1 file changed, 1 insertion(+), 1 del

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

2023-11-20 Thread Julien Grall
Hi Henry, On 16/11/2023 14:50, Henry Wang wrote: Based on the discussion in the Xen Summit [1], sending this series out after addressing the comments in v8 [2] as the preparation work to add MPU support. Mostly code movement and function folding, with some of Kconfig and build system (mainly Ma

Re: [XEN v5 0/2] xen/arm: Split MMU code as the prepration of MPU work form Arm32

2023-11-20 Thread Julien Grall
On 20/11/2023 14:48, Ayan Kumar Halder wrote: Hi, Hi Ayan, These are the set of patches based on top of "[PATCH v9 0/8] xen/arm: Split MMU code as the prepration of MPU work". This is the preparation work to add MPU support on Arm32. Changes from :- v1 - Dropped "[XEN v1 1/4] xen/arm: arm3

Re: [PATCH 2/3] xen/treewide: Switch bool_t to bool

2023-11-20 Thread Julien Grall
Hi Andrew, On 20/11/2023 14:56, Andrew Cooper wrote: @@ -1662,7 +1662,7 @@ int dt_device_get_irq(const struct dt_device_node *device, unsigned int index, return dt_irq_translate(&raw, out_irq); } -bool_t dt_device_is_available(const struct dt_device_node *device) +bool dt_device_is_

Re: [PATCH v5 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-20 Thread Julien Grall
Hi Luca, On 20/11/2023 14:27, Luca Fancellu wrote: Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel with one remark... --- Changes from v4: - fixed name in inclusion macro __ASM_* instead of __ARM_*, fixed emacs local variable 'end:', style fix (Michal) Changes from v3: - r

[PATCH] x86/traps: More use of nocall

2023-11-20 Thread Andrew Cooper
sysenter_eflags_saved() and int80_direct_trap() are now only used by a single translation unit. Move the declarations into the respective traps.c, renaming int80_direct_trap() to entry_int80() to match the style elsewhere. Annotate all 3 with nocall like all other entry paths. Signed-off-by: And

[PATCH] x86/entry: Use 32bit XOR in handle_ist_exception

2023-11-20 Thread Andrew Cooper
This is a micro-optimsiation for Silvermont microarchitectures, which don't recognise the 64bit form as a zeroing idiom. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- xen/arch/x86/x86_64/entry.S | 2 +- 1 file changed, 1 insertion(

xen | Failed pipeline for staging | ee0f41fd

2023-11-20 Thread GitLab
Pipeline #1079204738 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: ee0f41fd ( https://gitlab.com/xen-project/xen/-/commit/ee0f41fda315e33118f956161894efa20abc300b ) Commit Message: xen/arm: mmu:

Re: [PATCH v2 07/29] tools/xenlogd: add 9pfs attach request support

2023-11-20 Thread Jason Andryuk
On Fri, Nov 10, 2023 at 11:09 AM Juergen Gross wrote: > > Add the attach request of the 9pfs protocol. This introduces the "fid" > scheme of the 9pfs protocol. > > As this will be needed later, use a dedicated memory allocation > function in alloc_fid() and prepare a fid reference count. > > For f

xen | Failed pipeline for staging | fa2da5bc

2023-11-20 Thread GitLab
Pipeline #1079209651 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: fa2da5bc ( https://gitlab.com/xen-project/xen/-/commit/fa2da5bce90b3777aa7a323e1cf201c97b56d278 ) Commit Message: xen/arm32: he

[linux-5.4 test] 183797: regressions - FAIL

2023-11-20 Thread osstest service owner
flight 183797 linux-5.4 real [real] flight 183801 linux-5.4 real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183797/ http://logs.test-lab.xenproject.org/osstest/logs/183801/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: t

xen | Successful pipeline for staging | fa2da5bc

2023-11-20 Thread GitLab
Pipeline #1079209651 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: fa2da5bc ( https://gitlab.com/xen-project/xen/-/commit/fa2da5bce90b3777aa7a323e1cf201c97b56d278 ) Commit Message: xen/arm32: he

[PATCH 5/6] arm/platforms: Make compatbile with -Wwrite-strings

2023-11-20 Thread Andrew Cooper
GCC complains: arch/arm/platforms/brcm.c: In function ‘brcm_populate_plat_regs’: arch/arm/platforms/brcm.c:76:27: error: passing argument 1 of ‘brcm_get_dt_node’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 76 | rc = brcm_get_dt_node("brcm,brcms

[PATCH 0/6] xen: Enable -Wwrite-strings

2023-11-20 Thread Andrew Cooper
I got carried away and fixed all remaining -Wwrite-strings issues I could reproduce in local builds. Pipeline in Gitlab: https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1079379918 Andrew Cooper (6): x86/setup: Make the loader variable const x86/setup: Rework cmdline_cook() to

[PATCH 4/6] arm/duart: make dt_uart_init() compile with -Wwrite-strings

2023-11-20 Thread Andrew Cooper
GCC complains: drivers/char/arm-uart.c: In function 'dt_uart_init': drivers/char/arm-uart.c:81:17: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 81 | options = ""; | ^ The problem is using the options

[PATCH 3/6] xen/efi: Make efi-boot.h compile with -Wwrite-strings

2023-11-20 Thread Andrew Cooper
GCC complains: In file included from arch/arm/efi/boot.c:700: arch/arm/efi/efi-boot.h: In function 'efi_arch_handle_cmdline': arch/arm/efi/efi-boot.h:482:16: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 482 | name.s = "xen"

[PATCH 2/6] x86/setup: Rework cmdline_cook() to be compatible with -Wwrite-strings

2023-11-20 Thread Andrew Cooper
Constify both cmdline variables in create_dom0() and __start_xen(). Initialise Xen's variable to the empty string to simplify the parsing logic. Update cmdline_cook() to take and return const pointers, changing it to have an early exit for a NULL input (which can happen if the mbi-> pointers happe

[PATCH 1/6] x86/setup: Make the loader variable const

2023-11-20 Thread Andrew Cooper
It is never written to, but has a string literal assigned, and needs to be const to support -Wwrite-strings Suggested-by: Nicola Vetrini Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Roberto Bagnara CC: Nicola Vetrini --- xen/arch/x86/setup.c | 8

  1   2   >