Re: [PATCH for-4.20 v3 0/5] xen/x86: prevent local APIC errors at shutdown

2025-02-12 Thread Jan Beulich
On 12.02.2025 09:33, Oleksii Kurochko wrote: > > On 2/11/25 7:39 PM, Roger Pau Monné wrote: >> On Tue, Feb 11, 2025 at 12:02:04PM +0100, Roger Pau Monne wrote: >>> Hello, >>> >>> The following series aims to prevent local APIC errors from stalling the >>> shtudown process. On XenServer testing we

[PATCH 0/2] Prerequisite patches for Arm64 MPU build

2025-02-12 Thread Luca Fancellu
Hi all, in order to build Xen for Arm64 with MPU support, there are few changes to support the compilation of Arm code without HAS_PASSTHROUGH and some refactoring around the start_xen for Arm. Luca Fancellu (2): xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH xen/arm: Move earl

[PATCH 2/2] xen/arm: Move early mapping operations to new function

2025-02-12 Thread Luca Fancellu
Currently start_xen() is performing some early operations using the boot page tables that are configured during early asm boot, before setting up the runtime page tables that might also use the cache coloring feature. On an MPU system the cache coloring feature is not applicable, also before using

[PATCH 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

2025-02-12 Thread Luca Fancellu
When Xen is built without HAS_PASSTHROUGH, there are some parts in arm and x86 where iommu_* functions are called in the codebase, but their implementation is under xen/drivers/passthrough that is not built. So provide some stub for these functions in order to build Xen when !HAS_PASSTHROUGH, whic

Re: [PATCH 1/2] xen/swiotlb: relax alignment requirements

2025-02-12 Thread Jürgen Groß
On 12.02.25 07:53, Jan Beulich wrote: On 11.02.2025 13:04, Juergen Gross wrote: When mapping a buffer for DMA via .map_page or .map_sg DMA operations, there is no need to check the machine frames to be aligned according to the mapped areas size. All what is needed in these cases is that the buff

Re: [PATCH 2/2] xen/swiotlb: don't destroy contiguous region in all cases

2025-02-12 Thread Jürgen Groß
On 12.02.25 08:38, Jan Beulich wrote: On 11.02.2025 13:04, Juergen Gross wrote: In case xen_swiotlb_alloc_coherent() needed to create a contiguous region only for other reason than the memory not being compliant with the device's DMA mask, there is no reason why this contiguous region should be

Re: [PATCH for 4.20? v3 1/3] xen/riscv: implement software page table walking

2025-02-12 Thread Oleksii Kurochko
On 2/10/25 5:32 PM, Jan Beulich wrote: On 07.02.2025 14:13, Oleksii Kurochko wrote: --- a/xen/arch/riscv/pt.c +++ b/xen/arch/riscv/pt.c @@ -185,6 +185,57 @@ static int pt_next_level(bool alloc_tbl, pte_t **table, unsigned int offset) return XEN_TABLE_NORMAL; } +/* + * _pt_walk() pe

Re: Coding Style Review and Automation

2025-02-12 Thread Grygorii Strashko
Hi On 12.02.25 11:14, Roger Pau Monné wrote: On Tue, Feb 11, 2025 at 02:33:08PM -0800, Stefano Stabellini wrote: Hi Oleksandr, This morning, we had a discussion among maintainers, and the suggested approach moving forward is as follows: - First, it would be helpful to see a sample of the prop

Re: [PATCH 2/2] xen/swiotlb: don't destroy contiguous region in all cases

2025-02-12 Thread Jürgen Groß
On 12.02.25 02:30, Stefano Stabellini wrote: On Tue, 11 Feb 2025, Juergen Gross wrote: In case xen_swiotlb_alloc_coherent() needed to create a contiguous region only for other reason than the memory not being compliant with the device's DMA mask, there is no reason why this contiguous region sho

Re: [PATCH 2/2] xen/swiotlb: don't destroy contiguous region in all cases

2025-02-12 Thread Jan Beulich
On 12.02.2025 12:11, Jürgen Groß wrote: > On 12.02.25 08:38, Jan Beulich wrote: >> On 11.02.2025 13:04, Juergen Gross wrote: >>> In case xen_swiotlb_alloc_coherent() needed to create a contiguous >>> region only for other reason than the memory not being compliant with >>> the device's DMA mask, th

Re: [PATCH for 4.20? v3 1/3] xen/riscv: implement software page table walking

2025-02-12 Thread Oleksii Kurochko
On 2/12/25 12:27 PM, Jan Beulich wrote: On 12.02.2025 12:13, Oleksii Kurochko wrote: On 2/10/25 5:32 PM, Jan Beulich wrote: On 07.02.2025 14:13, Oleksii Kurochko wrote: --- a/xen/arch/riscv/pt.c +++ b/xen/arch/riscv/pt.c @@ -185,6 +185,57 @@ static int pt_next_level(bool alloc_tbl, pte_t **ta

Re: Coding Style Review and Automation

2025-02-12 Thread Edwin Torok
On 11 Feb 2025, at 18:54, Marek Marczykowski-Górecki wrote: > > On Tue, Feb 11, 2025 at 03:06:08PM +0100, Roger Pau Monné wrote: >> On Tue, Feb 11, 2025 at 11:19:23AM +0100, Jan Beulich wrote: >>> On 11.02.2025 10:10, Luca Fancellu wrote: >> 3) The size of the patch after applying clang-form

Re: [PATCH] device-tree: optimize dt_device_for_passthrough()

2025-02-12 Thread Grygorii Strashko
On 12.02.25 11:04, Julien Grall wrote: Hi, On 11/02/2025 15:14, Grygorii Strashko wrote: On 11.02.25 14:32, Julien Grall wrote: On 11/02/2025 11:57, Orzel, Michal wrote: On 11/02/2025 12:18, Grygorii Strashko wrote: The dt_device_for_passthrough() is called many times during Xen ini

Re: [PATCH] device-tree: optimize dt_device_for_passthrough()

2025-02-12 Thread Julien Grall
On 12/02/2025 10:16, Grygorii Strashko wrote: Also, I agree with Michal, if this is a concern for dt_device_device_for_passthrough(). Then it would be a concern for a few others calls using dt_find_property(). Are you going to modify all of them? I follow the rule one patch one functional

Re: [PATCH 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

2025-02-12 Thread Luca Fancellu
Hi Andrew, thanks for your review, > On 12 Feb 2025, at 11:50, Andrew Cooper wrote: > > On 12/02/2025 9:18 am, Luca Fancellu wrote: >> When Xen is built without HAS_PASSTHROUGH, there are some parts >> in arm and x86 where iommu_* functions are called in the codebase, >> but their implementatio

[PATCH] arch: arm64: always set EL=1 when injecting undefined exception

2025-02-12 Thread Volodymyr Babchuk
ARM Architecture Reference Manual states that EL field of ESR_EL1 register should be 1 when EC is 0b00 aka HSR_EC_UNKNOWN. Section D24.2.40, page D24-7337 of ARM DDI 0487L: IL, bit [25] Instruction Length for synchronous exceptions. Possible values of this bit are: [...] 0b1 - 32-b

Re: [PATCH 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

2025-02-12 Thread Andrew Cooper
On 12/02/2025 9:18 am, Luca Fancellu wrote: > When Xen is built without HAS_PASSTHROUGH, there are some parts > in arm and x86 where iommu_* functions are called in the codebase, > but their implementation is under xen/drivers/passthrough that is > not built. > > So provide some stub for these func

Xen Winter Meetup 2025 design session notes: Nested Virt

2025-02-12 Thread Samuel Verschelde
Description: this session will focus on discussing the current state and key challenges of Nested Virtualization in Xen. --- I'm going to reference this message to the mailing list in the related Gitlab epic: https://gitlab.com/groups/xen-project/-/epics/25 References: George Dunlap's two part

Re: [PATCH for-4.20 v3 0/5] xen/x86: prevent local APIC errors at shutdown

2025-02-12 Thread Oleksii Kurochko
On 2/12/25 10:25 AM, Roger Pau Monné wrote: On Wed, Feb 12, 2025 at 09:51:16AM +0100, Jan Beulich wrote: On 12.02.2025 09:33, Oleksii Kurochko wrote: On 2/11/25 7:39 PM, Roger Pau Monné wrote: On Tue, Feb 11, 2025 at 12:02:04PM +0100, Roger Pau Monne wrote: Hello, The following series aims

Recap of the Xen Winter Meetup 2025, by Olivier (Vates)

2025-02-12 Thread Samuel Verschelde
Hi everyone, Olivier Lambert published a detailed recap of the meetup that occurred in Grenoble, France, a bit less than two weeks ago. Those interested can read it at: https://xcp-ng.org/blog/2025/02/11/xen-winter-meetup-2025-a-recap/ Best regards, Samuel Verschelde | Vates XCP-ng Lead Main

Re: [6.1.y] Regression from b1e6e80a1b42 ("xen/swiotlb: add alignment check for dma buffers") when booting with Xen and mpt3sas_cm0 _scsih_probe failures

2025-02-12 Thread Harshit Mogalapalli
Hi Salvatore, On 12/02/25 00:56, Salvatore Bonaccorso wrote: Hi Harshit, On Sun, Feb 09, 2025 at 01:45:38AM +0530, Harshit Mogalapalli wrote: Hi Salvatore, On 08/02/25 21:26, Salvatore Bonaccorso wrote: Hi Juergen, hi all, Radoslav Bodó reported in Debian an issue after updating our kernel

Re: [PATCH] device-tree: optimize dt_device_for_passthrough()

2025-02-12 Thread Orzel, Michal
On 11/02/2025 16:14, Grygorii Strashko wrote: > > > On 11.02.25 14:32, Julien Grall wrote: >> >> >> On 11/02/2025 11:57, Orzel, Michal wrote: >>> On 11/02/2025 12:18, Grygorii Strashko wrote: The dt_device_for_passthrough() is called many times during Xen initialization and

Re: Coding Style Review and Automation

2025-02-12 Thread Roger Pau Monné
On Tue, Feb 11, 2025 at 02:33:08PM -0800, Stefano Stabellini wrote: > Hi Oleksandr, > > This morning, we had a discussion among maintainers, and the suggested > approach moving forward is as follows: > > - First, it would be helpful to see a sample of the proposed changes > applied to a single

Re: [PATCH for-4.20 v3 0/5] xen/x86: prevent local APIC errors at shutdown

2025-02-12 Thread Roger Pau Monné
On Wed, Feb 12, 2025 at 09:51:16AM +0100, Jan Beulich wrote: > On 12.02.2025 09:33, Oleksii Kurochko wrote: > > > > On 2/11/25 7:39 PM, Roger Pau Monné wrote: > >> On Tue, Feb 11, 2025 at 12:02:04PM +0100, Roger Pau Monne wrote: > >>> Hello, > >>> > >>> The following series aims to prevent local A

Re: [PATCH] device-tree: optimize dt_device_for_passthrough()

2025-02-12 Thread Julien Grall
Hi, On 11/02/2025 15:14, Grygorii Strashko wrote: On 11.02.25 14:32, Julien Grall wrote: On 11/02/2025 11:57, Orzel, Michal wrote: On 11/02/2025 12:18, Grygorii Strashko wrote: The dt_device_for_passthrough() is called many times during Xen initialization and Dom0 creation. On every cal

Re: [PATCH for 4.20? v3 1/3] xen/riscv: implement software page table walking

2025-02-12 Thread Jan Beulich
On 12.02.2025 12:13, Oleksii Kurochko wrote: > > On 2/10/25 5:32 PM, Jan Beulich wrote: >> On 07.02.2025 14:13, Oleksii Kurochko wrote: >>> --- a/xen/arch/riscv/pt.c >>> +++ b/xen/arch/riscv/pt.c >>> @@ -185,6 +185,57 @@ static int pt_next_level(bool alloc_tbl, pte_t >>> **table, unsigned int off

Re: Coding Style Review and Automation

2025-02-12 Thread Roger Pau Monné
On Wed, Feb 12, 2025 at 01:14:20PM +0200, Grygorii Strashko wrote: > Hi > > On 12.02.25 11:14, Roger Pau Monné wrote: > > On Tue, Feb 11, 2025 at 02:33:08PM -0800, Stefano Stabellini wrote: > > > Hi Oleksandr, > > > > > > This morning, we had a discussion among maintainers, and the suggested > >

[PATCH] device-tree: optimize size of struct dt_device_node

2025-02-12 Thread Grygorii Strashko
From: Michal Orzel The current placement of fields in struct dt_device_node is not optimal and introduces holes due to fields alignment. Checked with "'pahole xen-syms -C dt_device_node" ARM64 size 144B, 16B holes: /* size: 144, cachelines: 3, members: 15 */ /* sum members: 128,

[PATCH for-4.20?] x86/dom0: be less restrictive with the Interrupt Address Range

2025-02-12 Thread Roger Pau Monne
Xen currently prevents dom0 from creating CPU or IOMMU page-table mappings into the interrupt address range [0xfee0, 0xfeef]. This range has two different purposes. For accesses from the CPU is contains the default position of local APIC page at 0xfee0. For accesses from devices it's

Re: [PATCH v2 07/11] x86/cpufreq: add "cpufreq=amd-cppc,active" para

2025-02-12 Thread Jan Beulich
On 06.02.2025 09:32, Penny Zheng wrote: > --- a/docs/misc/xen-command-line.pandoc > +++ b/docs/misc/xen-command-line.pandoc > @@ -515,7 +515,7 @@ If set, force use of the performance counters for > oprofile, rather than detectin > available support. > > ### cpufreq > -> `= none | {{ | xen } {

Re: [PATCH v2 06/11] xen/cpufreq: only set gov NULL when cpufreq_driver.setpolicy is NULL

2025-02-12 Thread Jan Beulich
On 06.02.2025 09:32, Penny Zheng wrote: > From: Penny Zheng > > amd-cppc on active mode bypasses the scaling governor layer, and > provides its own P-state selection algorithms in hardware. Consequently, > when it is used, the driver's -> setpolicy() callback is invoked > to register per-CPU util

[BUG?] Wrong RC reported during 'make install'

2025-02-12 Thread Oleksii Kurochko
Hello everyone, During the installation of Xen on an ARM server machine from the source code, I found that the wrong release candidate (rc) is being used: $ make install install -m0644 -p xen //boot/xen-4.20-rc install: cannot remove ‘//boot/xen-4.20-rc’: Permission denied make[1]:

Re: struct mctelem_cookie missing definition

2025-02-12 Thread Jan Beulich
On 13.02.2025 03:00, Stefano Stabellini wrote: > On Wed, 12 Feb 2025, Stefano Stabellini wrote: >> On Thu, 13 Feb 2025, Andrew Cooper wrote: >>> On 13/02/2025 1:25 am, Stefano Stabellini wrote: Hi all, I am looking through the few remaining MISRA violations that we have left. O

Re: [BUG?] Wrong RC reported during 'make install'

2025-02-12 Thread Jan Beulich
On 13.02.2025 01:51, Andrew Cooper wrote: > On 12/02/2025 9:52 pm, Stefano Stabellini wrote: >> On Wed, 12 Feb 2025, Oleksii Kurochko wrote: >>> Hello everyone, >>> >>> During the installation of Xen on an ARM server machine from the source >>> code, >>> I found that the wrong release candidate (r

Re: Coding Style Review and Automation

2025-02-12 Thread Oleksandr Andrushchenko
Hi, Grygorii, On 12.02.25 13:14, Grygorii Strashko wrote: Hi On 12.02.25 11:14, Roger Pau Monné wrote: On Tue, Feb 11, 2025 at 02:33:08PM -0800, Stefano Stabellini wrote: Hi Oleksandr, This morning, we had a discussion among maintainers, and the suggested approach moving forward is as follow

Re: [PATCH] xen/console: add keyhandler to print Xen version

2025-02-12 Thread Jan Beulich
On 13.02.2025 00:58, dm...@proton.me wrote: > Add Xen version printout via keyhandler mechanism. > > That is useful for debugging systems that have been left intact for a long > time. > > Signed-off-by: Denis Mukhin First, +1 to what Andrew said. > --- a/xen/drivers/char/console.c > +++ b/xen/

Re: struct mctelem_cookie missing definition

2025-02-12 Thread Jan Beulich
On 13.02.2025 02:34, Andrew Cooper wrote: > On 13/02/2025 1:25 am, Stefano Stabellini wrote: >> Hi all, >> >> I am looking through the few remaining MISRA violations that we have >> left. One of them is R11.2: >> >> https://saas.eclairit.com:3787/fs/var/local/eclair/xen-project.ecdf/xen-project/ha

[PATCH for 4.21 v6 2/2] xen/riscv: identify specific ISA supported by cpu

2025-02-12 Thread Oleksii Kurochko
Supported ISA extensions are specified in the device tree within the CPU node, using two properties: `riscv,isa-extensions` and `riscv,isa`. Currently, Xen does not support the `riscv,isa-extensions` property and will be added in the future. The `riscv,isa` property is parsed for each CPU, and th

[PATCH for 4.21 v6 0/2] RISC-V runtime detection of extenstions

2025-02-12 Thread Oleksii Kurochko
Based on riscv,isa property of device tree file parse extenstions which are available in CPU. As a part of this feature, drop CONFIG_RISCV_ISA_RV64G and explicitly use extensions 'i', 'm', 'a', 'zicsr', 'zifencei' as they are necessary for a work if Xen and it should be true not only for RISC-V 64

[PATCH for 4.20? v4 0/3] Fixes for vmap_to_mfn() and pt_mapping_level

2025-02-12 Thread Oleksii Kurochko
Introduce pt_walk(), which does software page table walking to resolve the following issues: 1. vmap_to_mfn() uses virt_to_maddr(), which is designed to work with VA from either the direct map region or Xen's linkage region (XEN_VIRT_START), thereby an assertion will occur if it is used with

Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines

2025-02-12 Thread Tom Lendacky
On 2/11/25 14:32, Borislav Petkov wrote: > On Tue, Feb 11, 2025 at 09:43:23AM -0800, Sean Christopherson wrote: >> It conflates two very different things: host/bare metal support for memory >> encryption, and SEV guest support. For kernels that will never run in a VM, >> pulling in all the SEV gue

[PATCH for 4.20? v4 1/3] xen/riscv: implement software page table walking

2025-02-12 Thread Oleksii Kurochko
RISC-V doesn't have hardware feature to ask MMU to translate virtual address to physical address ( like Arm has, for example ), so software page table walking is implemented. Signed-off-by: Oleksii Kurochko --- Changes in v4: - Update the comment message above _pt_walk(): add information that

[PATCH for 4.21 v6 1/2] xen/riscv: drop CONFIG_RISCV_ISA_RV64G

2025-02-12 Thread Oleksii Kurochko
'G' stands for "imafd_zicsr_zifencei". Extensions 'f' and 'd' aren't really needed for Xen, and allowing floating point registers to be used can lead to crashes. Extensions 'i', 'm', 'a', 'zicsr', and 'zifencei' are necessary for the operation of Xen, which is why they are used explicitly (uncond

[PATCH for 4.20? v4 3/3] xen/riscv: update mfn calculation in pt_mapping_level()

2025-02-12 Thread Oleksii Kurochko
When pt_update() is called with arguments (..., INVALID_MFN, ..., 0 or 1), it indicates that a mapping is being destroyed/modifyed. In the case when modifying or destroying a mapping, it is necessary to search until a leaf node is found, instead of searching for a page table entry based on the pre

blowfish failure to compile

2025-02-12 Thread Andrew Cooper
I've noticed the following failure in XenServer's build environment > make[6]: Leaving directory > '/builddir/build/BUILD/xen-4.19.1/tools/tests/x86_emulator' > In file included from /usr/include/features.h:535, > from /usr/include/bits/libc-header-start.h:33, > f

Re: [PATCH 2/2] xen/swiotlb: don't destroy contiguous region in all cases

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Jürgen Groß wrote: > On 12.02.25 02:30, Stefano Stabellini wrote: > > On Tue, 11 Feb 2025, Juergen Gross wrote: > > > In case xen_swiotlb_alloc_coherent() needed to create a contiguous > > > region only for other reason than the memory not being compliant with > > > the device'

[RFC PATCH] arm: dom0: allow static memory configuration

2025-02-12 Thread Grygorii Strashko
The Arm Xen allocates memory to place Dom0 following the logic described in allocate_memory_11() function which is a bit complicated with major requirement to place Dom0 within the first 128MB of RAM and below 4G. But this doesn't guarantee it will be placed at the same physical base address even b

Re: Coding Style Review and Automation

2025-02-12 Thread Oleksandr Andrushchenko
Hello, everybody! On 12.02.25 00:33, Stefano Stabellini wrote: Hi Oleksandr, This morning, we had a discussion among maintainers, and the suggested approach moving forward is as follows: Great news!! - First, it would be helpful to see a sample of the proposed changes applied to a single

RE: [PATCH 16/16] x86/kvmclock: Use TSC for sched_clock if it's constant and non-stop

2025-02-12 Thread Michael Kelley
From: Sean Christopherson Sent: Monday, February 10, 2025 8:22 AM > > On Sat, Feb 08, 2025, Michael Kelley wrote: > > From: Sean Christopherson Sent: Friday, February 7, > > 2025 9:23 AM > > > > > > Dropping a few people/lists whose emails are bouncing. > > > > > > On Fri, Jan 31, 2025, Sean C

[PATCH] xen/console: make console buffer size configurable

2025-02-12 Thread dmkhn
Add new CONRING_SIZE Kconfig parameter to specify the boot console buffer size in bytes. The value is rounded to the nearest power of 2 to match existing conring_size= behavior. The supported range is [16KiB..128MiB]. Bump default size to 32 KiB. Link: https://gitlab.com/xen-project/xen/-/issues

Re: [PATCH 2/2] xen/arm: Move early mapping operations to new function

2025-02-12 Thread Julien Grall
Hi, On 12/02/2025 09:19, Luca Fancellu wrote: Currently start_xen() is performing some early operations using the boot page tables that are configured during early asm boot, before setting up the runtime page tables that might also use the cache coloring feature. On an MPU system the cache colo

Re: [PATCH for-4.20 v3 0/5] xen/x86: prevent local APIC errors at shutdown

2025-02-12 Thread Oleksii Kurochko
On 2/11/25 7:39 PM, Roger Pau Monné wrote: On Tue, Feb 11, 2025 at 12:02:04PM +0100, Roger Pau Monne wrote: Hello, The following series aims to prevent local APIC errors from stalling the shtudown process. On XenServer testing we have seen reports of AMD boxes sporadically getting stuck in a

Re: [PATCH 2/4] ARM: Fix register constraints in run_in_exception_handler()

2025-02-12 Thread Julien Grall
Hi Andrew, On 10/02/2025 22:41, Andrew Cooper wrote: On 10/02/2025 9:31 pm, Julien Grall wrote: On 10/02/2025 09:21, Oleksii Kurochko wrote: On 2/8/25 1:02 AM, Andrew Cooper wrote: Right now, run_in_exception_handler() takes an input in an arbitrary register, and clobbers BUG_FN_REG.  This

[PATCH] xen/console: add keyhandler to print Xen version

2025-02-12 Thread dmkhn
Add Xen version printout via keyhandler mechanism. That is useful for debugging systems that have been left intact for a long time. Signed-off-by: Denis Mukhin --- xen/common/version.c | 2 -- xen/drivers/char/console.c | 31 ++- 2 files changed, 26 insertions

Re: [RFC] dom0less vcpu affinity bindings

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Julien Grall wrote: > Hi Stefano, > > On 11/02/2025 01:56, Stefano Stabellini wrote: > > We have received requests to introduce Dom0less vCPU affinity bindings > > to allow configuring which pCPUs a given vCPU is allowed to run on. > > > > After considering different approach

Re: struct mctelem_cookie missing definition

2025-02-12 Thread Andrew Cooper
On 13/02/2025 1:25 am, Stefano Stabellini wrote: > Hi all, > > I am looking through the few remaining MISRA violations that we have > left. One of them is R11.2: > > https://saas.eclairit.com:3787/fs/var/local/eclair/xen-project.ecdf/xen-project/hardware/xen/ECLAIR_normal/staging/X86_64/9118578464

Re: struct mctelem_cookie missing definition

2025-02-12 Thread Stefano Stabellini
On Thu, 13 Feb 2025, Andrew Cooper wrote: > On 13/02/2025 1:25 am, Stefano Stabellini wrote: > > Hi all, > > > > I am looking through the few remaining MISRA violations that we have > > left. One of them is R11.2: > > > > https://saas.eclairit.com:3787/fs/var/local/eclair/xen-project.ecdf/xen-proj

Re: [PATCH v1 1/3] automation: skip building domU if there is no test defined for it

2025-02-12 Thread Stefano Stabellini
On Thu, 13 Feb 2025, Marek Marczykowski-Górecki wrote: > This will be useful for later tests not using generic domU (unit tests, > xtf etc). > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini > --- > automation/scripts/qubes-x86-64.sh | 50 +++--

Re: struct mctelem_cookie missing definition

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Stefano Stabellini wrote: > On Thu, 13 Feb 2025, Andrew Cooper wrote: > > On 13/02/2025 1:25 am, Stefano Stabellini wrote: > > > Hi all, > > > > > > I am looking through the few remaining MISRA violations that we have > > > left. One of them is R11.2: > > > > > > https://saas.

Re: [PATCH v1 2/3] automation: add jobs running tests from tools/tests/*

2025-02-12 Thread Stefano Stabellini
On Thu, 13 Feb 2025, Marek Marczykowski-Górecki wrote: > There are a bunch of tests in tools/tests/, let them run in CI. > For each subdirectory expect "make run" will run the test, and observe > its exit code. This way, adding new tests is easy, and they will be > automatically picked up. > > For

struct mctelem_cookie missing definition

2025-02-12 Thread Stefano Stabellini
Hi all, I am looking through the few remaining MISRA violations that we have left. One of them is R11.2: https://saas.eclairit.com:3787/fs/var/local/eclair/xen-project.ecdf/xen-project/hardware/xen/ECLAIR_normal/staging/X86_64/9118578464/PROJECT.ecd;/by_service/MC3A2.R11.2.html#{%22select%22:tru

[PATCH v1 2/3] automation: add jobs running tests from tools/tests/*

2025-02-12 Thread Marek Marczykowski-Górecki
There are a bunch of tests in tools/tests/, let them run in CI. For each subdirectory expect "make run" will run the test, and observe its exit code. This way, adding new tests is easy, and they will be automatically picked up. For better visibility, log test output to junit xml format, and let gi

[PATCH v1 3/3] automation: allow selecting individual jobs via CI variables

2025-02-12 Thread Marek Marczykowski-Górecki
Debugging sometimes involves running specific jobs on different versions. It's useful to easily avoid running all of the not interesting ones (for given case) to save both time and CI resources. Doing so used to require changing the yaml files, usually in several places. Ease this step by adding SE

[PATCH v1 1/3] automation: skip building domU if there is no test defined for it

2025-02-12 Thread Marek Marczykowski-Górecki
This will be useful for later tests not using generic domU (unit tests, xtf etc). Signed-off-by: Marek Marczykowski-Górecki --- automation/scripts/qubes-x86-64.sh | 50 +++ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/automation/scripts/qubes-x86-64

[PATCH v1 0/3] Few CI improvements

2025-02-12 Thread Marek Marczykowski-Górecki
- Add some more test jobs - Allow selecting individual jobs, without editing yaml files I don't think it needs to be included in 4.20, but may be considered later for backporting. Marek Marczykowski-Górecki (3): automation: skip building domU if there is no test defined for it automation: add

[PATCH v2] arm/vuart: move vpl011-related code to vpl011 emulator

2025-02-12 Thread dmkhn
Xen console driver has vpl011-related logic which shall belong vpl011 emulator code (Arm port). Move vpl011-related code from arch-independent console driver to Arm's vpl011.c. Use rate-limiting guest_printk() for error logging in console driver in case vpl011 cannot handle the console input. Sig

Re: [PATCH 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

2025-02-12 Thread Luca Fancellu
> On 12 Feb 2025, at 12:37, Luca Fancellu wrote: > > Hi Andrew, > > thanks for your review, > >> On 12 Feb 2025, at 11:50, Andrew Cooper wrote: >> >> On 12/02/2025 9:18 am, Luca Fancellu wrote: >>> When Xen is built without HAS_PASSTHROUGH, there are some parts >>> in arm and x86 where iomm

[PATCH] PCI: Avoid FLR for Mediatek MT7922 WiFi

2025-02-12 Thread Bjorn Helgaas
From: Bjorn Helgaas The Mediatek MT7922 WiFi device advertises FLR support, but it apparently does not work, and all subsequent config reads return ~0: pci :01:00.0: [14c3:0616] type 00 class 0x028000 PCIe Endpoint pciback :01:00.0: not ready 65535ms after FLR; giving up After an FL

Re: [RFC PATCH] arm: dom0: allow static memory configuration

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Grygorii Strashko wrote: > The Arm Xen allocates memory to place Dom0 following the logic described in > allocate_memory_11() function which is a bit complicated with major > requirement to place Dom0 within the first 128MB of RAM and below 4G. But > this doesn't guarantee it w

Re: [PATCH v2] arm/vuart: move vpl011-related code to vpl011 emulator

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, dm...@proton.me wrote: > Xen console driver has vpl011-related logic which shall belong vpl011 emulator > code (Arm port). Move vpl011-related code from arch-independent console driver > to Arm's vpl011.c. > > Use rate-limiting guest_printk() for error logging in console drive

[PATCH for 4.20? v4 2/3] xen/riscv: update defintion of vmap_to_mfn()

2025-02-12 Thread Oleksii Kurochko
vmap_to_mfn() uses virt_to_maddr(), which is designed to work with VA from either the direct map region or Xen's linkage region (XEN_VIRT_START). An assertion will occur if it is used with other regions, in particular for the VMAP region. Since RISC-V lacks a hardware feature to request the MMU to

Re: [BUG?] Wrong RC reported during 'make install'

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Oleksii Kurochko wrote: > Hello everyone, > > During the installation of Xen on an ARM server machine from the source code, > I found that the wrong release candidate (rc) is being used: > $ make install > install -m0644 -p xen //boot/xen-4.20-rc > install: canno

Re: [PATCH] arch: arm64: always set EL=1 when injecting undefined exception

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Volodymyr Babchuk wrote: > ARM Architecture Reference Manual states that EL field of ESR_EL1 > register should be 1 when EC is 0b00 aka HSR_EC_UNKNOWN. > > Section D24.2.40, page D24-7337 of ARM DDI 0487L: > > IL, bit [25] > Instruction Length for synchronous exceptio

Re: [PATCH] device-tree: optimize size of struct dt_device_node

2025-02-12 Thread Stefano Stabellini
On Wed, 12 Feb 2025, Grygorii Strashko wrote: > From: Michal Orzel > > The current placement of fields in struct dt_device_node is not optimal and > introduces holes due to fields alignment. > > Checked with "'pahole xen-syms -C dt_device_node" > > ARM64 size 144B, 16B holes: > /* size: 1

Re: [BUG?] Wrong RC reported during 'make install'

2025-02-12 Thread Andrew Cooper
On 12/02/2025 9:52 pm, Stefano Stabellini wrote: > On Wed, 12 Feb 2025, Oleksii Kurochko wrote: >> Hello everyone, >> >> During the installation of Xen on an ARM server machine from the source code, >> I found that the wrong release candidate (rc) is being used: >> $ make install >> install

Re: [PATCH] xen/console: add keyhandler to print Xen version

2025-02-12 Thread Andrew Cooper
On 12/02/2025 11:58 pm, dm...@proton.me wrote: > Add Xen version printout via keyhandler mechanism. > > That is useful for debugging systems that have been left intact for a long > time. > > Signed-off-by: Denis Mukhin Hmm, it's a good point, but can't we add this to the top of the 'h' (help) key

Re: [PATCH for-4.20 v2] ARM32/traps: Fix do_trap_undefined_instruction()'s detection of kernel text

2025-02-12 Thread Julien Grall
Hi Andrew, On 11/02/2025 12:54, Andrew Cooper wrote: While fixing some common/arch boundaries for UBSAN support on other architectures, the following debugging patch: diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index c1f2d1b89d43..58d1d048d339 100644 --- a/xen/arch/arm/set

Re: [PATCH 16/16] x86/kvmclock: Use TSC for sched_clock if it's constant and non-stop

2025-02-12 Thread Sean Christopherson
On Wed, Feb 12, 2025, Michael Kelley wrote: > From: Sean Christopherson Sent: Monday, February 10, 2025 > 8:22 AM > > On Sat, Feb 08, 2025, Michael Kelley wrote: > > > But I would be good with some restructuring so that setting the sched > > > clock > > > save/restore hooks is more closely tied

Re: [PATCH v3 15/24] xen/console: make console buffer size configurable

2025-02-12 Thread Denis Mukhin
On Tuesday, January 28th, 2025 at 11:53 PM, Jan Beulich wrote: > > > On 29.01.2025 04:04, Denis Mukhin wrote: > > > On Tuesday, January 28th, 2025 at 8:32 AM, Jan Beulich jbeul...@suse.com > > wrote: > > > > > On 04.01.2025 02:58, Denis Mukhin via B4 Relay wrote: > > > > > > > From: Denis

Re: [PATCH] PCI: Avoid FLR for Mediatek MT7922 WiFi

2025-02-12 Thread Marek Marczykowski-Górecki
On Wed, Feb 12, 2025 at 01:35:16PM -0600, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The Mediatek MT7922 WiFi device advertises FLR support, but it apparently > does not work, and all subsequent config reads return ~0: > > pci :01:00.0: [14c3:0616] type 00 class 0x028000 PCIe Endpoint

Re: [RFC] dom0less vcpu affinity bindings

2025-02-12 Thread Julien Grall
Hi Stefano, On 11/02/2025 01:56, Stefano Stabellini wrote: We have received requests to introduce Dom0less vCPU affinity bindings to allow configuring which pCPUs a given vCPU is allowed to run on. After considering different approaches, I am thinking of using the following binding format:

Re: [PATCH v1 2/3] automation: add jobs running tests from tools/tests/*

2025-02-12 Thread Marek Marczykowski-Górecki
On Wed, Feb 12, 2025 at 06:07:37PM -0800, Stefano Stabellini wrote: > On Thu, 13 Feb 2025, Marek Marczykowski-Górecki wrote: > > There are a bunch of tests in tools/tests/, let them run in CI. > > For each subdirectory expect "make run" will run the test, and observe > > its exit code. This way, ad