Re: [PATCH] automation/cirrus-ci: store xen/.config as an artifact

2025-03-11 Thread Roger Pau Monné
On Mon, Mar 10, 2025 at 06:30:15PM +, Andrew Cooper wrote: > On 10/03/2025 6:16 pm, Roger Pau Monne wrote: > > Always store xen/.config as an artifact, renamed to xen-config to match > > the naming used in the Gitlab CI tests. > > > > Reported-by: Andrew Cooper > > Signed-off-by: Roger Pau Mon

Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-11 Thread Jason Andryuk
On 2025-03-10 04:21, Jan Beulich wrote: On 10.03.2025 09:17, Juergen Gross wrote: On 10.03.25 09:01, Jan Beulich wrote: On 06.03.2025 23:03, Jason Andryuk wrote: +shared_entry_v1(gt, idx).flags = flags; +shared_entry_v1(gt, idx).domid = be_domid; +shared_entry_v1(gt, idx).frame = f

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

2025-03-11 Thread dmkhn
From: Denis Mukhin Add new CONRING_SHIFT Kconfig parameter to specify the boot console buffer size as a power of 2. The supported range is [14..27] -> [16KiB..128MiB]. Set default to 15 (32 KiB). Resolves: https://gitlab.com/xen-project/xen/-/issues/185 Signed-off-by: Denis Mukhin --- Changes

Re: [PATCH v2 08/16] exec/memory-internal: remove dependency on cpu.h

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/in

Re: [PATCH v2 07/16] exec/exec-all: remove dependency on cpu.h

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-

[PATCH] docs: add explanation for 'Resolved:'

2025-03-11 Thread dmkhn
From: Denis Mukhin 'Resolves:' tag may be used if the patch addresses one of the tickets logged via Gitlab to auto-close such ticket when the patch got merged. Add documentation for the tag. Signed-off-by: Denis Mukhin --- docs/process/sending-patches.pandoc | 12 1 file changed,

Re: [PATCH v2 11/16] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-11 Thread Philippe Mathieu-Daudé
On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier I didn't follow this direction because Richard had a preference on removing unnecessary inlined functions: https://lore.kernel.org/qemu-devel/9151205a-13d3-401e-b403-f9195cdb1...@linaro.or

[PATCH v2] docs: specify numerical values of Xenstore commands

2025-03-11 Thread Juergen Gross
In docs/misc/xenstore.txt all Xenstore commands are specified, but the specifications lack the numerical values of the commands. Add a table with all commands, their values, and a potential remark (e.g. whether the command is optional). Reported-by: Jan Beulich Signed-off-by: Juergen Gross ---

Re: [PATCH] docs: add explanation for 'Resolved:'

2025-03-11 Thread Denis Mukhin
On Tuesday, March 11th, 2025 at 12:28 AM, dm...@proton.me wrote: > > > From: Denis Mukhin dmuk...@ford.com > > > 'Resolves:' tag may be used if the patch addresses one of the tickets > logged via Gitlab to auto-close such ticket when the patch got merged. > > Add documentation for the tag.

Re: [PATCH v3 2/2] x86/iommu: avoid MSI address and data writes if IRT index hasn't changed

2025-03-11 Thread Jan Beulich
On 10.03.2025 16:42, Roger Pau Monné wrote: > On Mon, Mar 10, 2025 at 11:51:09AM +0100, Jan Beulich wrote: >> On 10.03.2025 10:55, Roger Pau Monne wrote: >>> Attempt to reduce the MSI entry writes, and the associated checking whether >>> memory decoding and MSI-X is enabled for the PCI device, when

Re: [PATCH] xen/mcelog: Add __nonstring annotations for unterminated strings

2025-03-11 Thread Jürgen Groß
On 10.03.25 23:22, Kees Cook wrote: When a character array without a terminating NUL character has a static initializer, GCC 15's -Wunterminated-string-initialization will only warn if the array lacks the "nonstring" attribute[1]. Mark the arrays with __nonstring to and correctly identify the cha

Re: [PATCH 06/23] xen/domctl: Expose privileged and hardware capabilities

2025-03-11 Thread Jan Beulich
On 10.03.2025 15:11, Jason Andryuk wrote: > On 2025-03-10 05:03, Jan Beulich wrote: >> On 06.03.2025 23:03, Jason Andryuk wrote: >>> --- a/xen/include/public/domctl.h >>> +++ b/xen/include/public/domctl.h >>> @@ -155,6 +155,12 @@ struct xen_domctl_getdomaininfo { >>> /* domain has hardware assist

Re: [PATCH] tools: Mark ACPI SDTs as NVS in the PVH build path

2025-03-11 Thread Alejandro Vallejo
On Tue Mar 11, 2025 at 8:30 AM GMT, Jan Beulich wrote: > On 10.03.2025 16:25, Alejandro Vallejo wrote: > > Commit cefeffc7e583 marked ACPI tables as NVS in the hvmloader path > > because SeaBIOS may otherwise just mark it as RAM. There is, however, > > yet another reason to do it even in the PVH pa

Re: [PATCH 1/2] xen/arm: Improve handling of nr_spis

2025-03-11 Thread Bertrand Marquis
Hi Michal, > On 11 Mar 2025, at 10:04, Michal Orzel wrote: > > At the moment, we print a warning about max number of IRQs supported by > GIC bigger than vGIC only for hardware domain. This check is not hwdom > special, and should be made common. Also, in case of user not specifying > nr_spis for

Re: [PATCH v2 1/5] xen/arm: Create tee command line parameter

2025-03-11 Thread Bertrand Marquis
Hi Jan, > On 11 Mar 2025, at 09:35, Jan Beulich wrote: > > On 10.03.2025 15:50, Bertrand Marquis wrote: >> --- a/docs/misc/xen-command-line.pandoc >> +++ b/docs/misc/xen-command-line.pandoc >> @@ -2651,6 +2651,20 @@ Specify the per-cpu trace buffer size in pages. >> >> Flag to enable TSC deadli

Re: [PATCH v8 7/9] docs: update xenstore migration stream definition

2025-03-11 Thread Julien Grall
Hi Juergen, On 04/02/2025 11:34, Juergen Gross wrote: In order to close a race window for Xenstore live update when using the new unique_id of domains, the migration stream needs to contain this unique_id for each domain known by Xenstore. Signed-off-by: Juergen Gross --- V8: - new patch ---

[PATCH v2 0/7] Add support for R-Car Gen4 PCI host controller

2025-03-11 Thread Mykyta Poturai
This series adds support for R-Car Gen4 PCI host controller. To fully support the controller, the following changes were made: - Generic mechanism to support PCI child buses is added. - Private data for PCI host bridge and means to access it are added. The series also includes a workaround for pr

[PATCH v2 4/7] xen/arm: add support for R-Car Gen4 PCI host controller

2025-03-11 Thread Mykyta Poturai
From: Oleksandr Andrushchenko Add support for Renesas R-Car Gen4 PCI host controller, specifically targeting the S4 and V4H SoCs. The implementation includes configuration read/write operations for both root and child buses. For accessing the child bus, iATU is used for address translation. Code

Re: [PATCH 16/16] CHANGELOG: Mention Xen suspend/resume to RAM feature on arm64

2025-03-11 Thread Oleksii Kurochko
On 3/5/25 10:11 AM, Mykola Kvach wrote: Signed-off-by: Mykola Kvach --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c21d5bce..489404fc8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ The format is based on [Keep a Chan

[PATCH v2 6/7] xen/arm: rcar4: add simple optimization to avoid ATU reprogramming

2025-03-11 Thread Mykyta Poturai
From: Volodymyr Babchuk There are high chances that there will be a number of a consecutive accesses to configuration space of one device. To speed things up, we can program ATU only during first access. This is mostly beneficial taking into account the previous patch that adds 1ms delay after A

Re: [PATCH v8 1/9] xen/events: don't allow binding a global virq from any domain

2025-03-11 Thread Jürgen Groß
On 11.03.25 10:35, Julien Grall wrote: Hi Juergen, On 04/02/2025 11:33, Juergen Gross wrote: Today Xen will happily allow binding a global virq by a domain which isn't configured to receive it. This won't result in any bad actions, but the bind will appear to have succeeded with no event ever b

[RFC PATCH v3 4/7] xen/arm: scmi: introduce SCI SCMI SMC multi-agent driver

2025-03-11 Thread Grygorii Strashko
From: Oleksii Moisieiev This patch introduces SCI driver to support for ARM EL3 Trusted Firmware-A (TF-A) which provides SCMI interface with multi-agnet support, as shown below. +-+ | | | EL3 TF-A SCMI

Re: [PATCH v8 1/9] xen/events: don't allow binding a global virq from any domain

2025-03-11 Thread Julien Grall
Hi Juergen, On 04/02/2025 11:33, Juergen Gross wrote: Today Xen will happily allow binding a global virq by a domain which isn't configured to receive it. This won't result in any bad actions, but the bind will appear to have succeeded with no event ever being received by that event channel. In

[PATCH v4 04/25] drm/gem-shmem: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_shmem_helper.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/d

[PATCH v4 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation

2025-03-11 Thread Thomas Zimmermann
Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these values is inconsistent and duplicated among drivers. The results for formats with bpp < 8 are sometimes incorrect. This series fixes this for most drivers. D

[PATCH v4 09/25] drm/hibmc: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 128. The hibmc driver's new hibmc_dumb_create() is similar to the one in GEM VRAM helpers. The driver was the only caller of drm_gem_vram_fill_create_dumb(). Remove the now unused help

[PATCH v4 22/25] drm/vmwgfx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1 fi

[PATCH v4 24/25] drm/xen: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Cc: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH v4 03/25] drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Push the current calculation into the only direct caller imx. Imx's hardware requires the framebuffer width to be aligned to 8. The driver's current approach is actually incorrect,

[PATCH v4 13/25] drm/msm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Alignment is specified in bytes, but the hardware requires the scanline pitch to be a multiple of 32 pixels. Therefore compute the byte size of 32 pixels in the given color mode and align the pitch accordingly. This re

[PATCH v4 10/25] drm/imx/ipuv3: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. The hardware requires the framebuffer width to be a multiple of 8. The scanline pitch has be large enough to support this. Therefore compute the byte size of 8 pixels in the given color mode and align the pitch accordi

[PATCH v4 19/25] drm/rockchip: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 64. Signed-off-by: Thomas Zimmermann Acked-by: Heiko Stuebner Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 12 ++--

[PATCH v4 15/25] drm/omapdrm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8 d

[PATCH v4 18/25] drm/renesas/rz-du: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Biju Das --- drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v4 20/25] drm/tegra: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Acked-by: Thierry Reding Cc: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed, 5

[PATCH v4 11/25] drm/loongson: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file ch

[PATCH v4 05/25] drm/gem-vram: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Inline code from drm_gem_vram_fill_create_dumb() without the existing size computation. Align the pitch to a multiple of 8. Only hibmc and vboxvideo use gem-vram. Hibmc invokes the call to drm_gem_vram_fill_create_dum

[PATCH v4 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Align the buffer size according to hardware requirements. Xe's internal calculation allowed for 64-bit wide buffer sizes, but the ioctl's internal checks always verified against 32-

[PATCH v4 14/25] drm/nouveau: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 256. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1 fi

[PATCH v4 12/25] drm/mediatek: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_gem.c | 13 --

[PATCH v4 07/25] drm/exynos: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: Alim Akhtar --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 8 +--- 1 file

Re: [PATCH v1] xen/riscv: add H extenstion to -march

2025-03-11 Thread Oleksii Kurochko
On 3/11/25 4:48 PM, Jan Beulich wrote: On 11.03.2025 16:45, Oleksii Kurochko wrote: --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -9,7 +9,8 @@ riscv-abi-$(CONFIG_RISCV_64) := -mabi=lp64 riscv-march-$(CONFIG_RISCV_64) := rv64 riscv-march-y += ima riscv-march-$(CONFIG_RISCV_I

[PATCH v4 06/25] drm/armada: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 128. v4: - align pitch to 128 bytes (Russell) Signed-off-by: Thomas Zimmermann Cc: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7 ins

[PATCH v4 16/25] drm/qxl: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dr

Re: [PATCH v1] xen/riscv: add H extenstion to -march

2025-03-11 Thread Jan Beulich
On 11.03.2025 16:45, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/arch.mk > +++ b/xen/arch/riscv/arch.mk > @@ -9,7 +9,8 @@ riscv-abi-$(CONFIG_RISCV_64) := -mabi=lp64 > riscv-march-$(CONFIG_RISCV_64) := rv64 > riscv-march-y += ima > riscv-march-$(CONFIG_RISCV_ISA_C) += c > -riscv-march-y += _zi

Re: [PATCH v4 1/3] x86/vmx: fix posted interrupts usage of msi_desc->msg field

2025-03-11 Thread Jan Beulich
On 11.03.2025 13:06, Roger Pau Monne wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -396,6 +396,13 @@ static int cf_check vmx_pi_update_irte(const struct vcpu > *v, > const struct pi_desc *pi_desc = v ? &v->arch.hvm.vmx.pi_desc : NULL; > struct irq_desc

Re: [PATCH v2] xen/page_alloc: Simplify domain_adjust_tot_pages

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 11, 2025 at 02:53:04PM +, Alejandro Vallejo wrote: > On Tue Mar 11, 2025 at 12:46 PM GMT, Roger Pau Monné wrote: > > On Tue, Mar 04, 2025 at 11:10:00AM +, Alejandro Vallejo wrote: > > > The logic has too many levels of indirection and it's very hard to > > > understand it its cu

[PATCH v1] xen/riscv: add H extenstion to -march

2025-03-11 Thread Oleksii Kurochko
H provides additional instructions and CSRs that control the new stage of address translation and support hosting a guest OS in virtual S-mode (VS-mode). According to the Unprivileged Architecture (version 20240411) specification: ``` Table 74 summarizes the standardized extension names. The table

Re: [PATCH v5 1/3] x86/vmx: fix posted interrupts usage of msi_desc->msg field

2025-03-11 Thread Jan Beulich
On 11.03.2025 16:27, Roger Pau Monne wrote: > The current usage of msi_desc->msg in vmx_pi_update_irte() will make the > field contain a translated MSI message, instead of the expected > untranslated one. This breaks dump_msi(), that use the data in > msi_desc->msg to print the interrupt details.

Re: [RFC PATCH v3 7/7] xen/arm: scmi: generate scmi dt node for DomUs

2025-03-11 Thread Jan Beulich
On 11.03.2025 12:16, Grygorii Strashko wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -1223,6 +1223,13 @@ struct xen_domctl_vmtrace_op { > #define XEN_DOMCTL_vmtrace_get_option 5 > #define XEN_DOMCTL_vmtrace_set_option 6 > }; > + > +/* XEN_DOM

Re: [PATCH 1/2] xen/arm: Improve handling of nr_spis

2025-03-11 Thread Bertrand Marquis
> On 11 Mar 2025, at 14:33, Orzel, Michal wrote: > > > > On 11/03/2025 14:26, Bertrand Marquis wrote: >> >> >> Hi Michal, >> >>> On 11 Mar 2025, at 12:06, Orzel, Michal wrote: >>> >>> >>> >>> On 11/03/2025 11:12, Bertrand Marquis wrote: > On 11 Mar 2025, at 10:59, Orze

Re: [PATCH 1/2] xen/arm: Improve handling of nr_spis

2025-03-11 Thread Orzel, Michal
On 11/03/2025 14:26, Bertrand Marquis wrote: > > > Hi Michal, > >> On 11 Mar 2025, at 12:06, Orzel, Michal wrote: >> >> >> >> On 11/03/2025 11:12, Bertrand Marquis wrote: >>> >>> On 11 Mar 2025, at 10:59, Orzel, Michal wrote: On 11/03/2025 10:30, Bertrand Marquis wr

Re: [PATCH v2] xen/page_alloc: Simplify domain_adjust_tot_pages

2025-03-11 Thread Alejandro Vallejo
On Tue Mar 11, 2025 at 12:46 PM GMT, Roger Pau Monné wrote: > On Tue, Mar 04, 2025 at 11:10:00AM +, Alejandro Vallejo wrote: > > The logic has too many levels of indirection and it's very hard to > > understand it its current form. Split it between the corner case where > > the adjustment is bi

[PATCH v4 21/25] drm/virtio: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 4. Signed-off-by: Thomas Zimmermann Cc: David Airlie Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu --- drivers/gpu/drm/virtio/virtgpu_gem.c | 11 +-- 1 file changed

[PATCH v4 01/25] drm/dumb-buffers: Sanitize output on errors

2025-03-11 Thread Thomas Zimmermann
The ioctls MODE_CREATE_DUMB and MODE_MAP_DUMB return results into a memory buffer supplied by user space. On errors, it is possible that intermediate values are being returned. The exact semantics depends on the DRM driver's implementation of these ioctls. Although this is most-likely not a securit

[PATCH v2 14/16] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-11 Thread Pierrick Bouvier
we'll use it in system/memory.c. Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 60c0fb6ccd4..57661283684 100644 --- a/include/exec/memory.h +++ b

Re: [PATCH v2] docs: specify numerical values of Xenstore commands

2025-03-11 Thread Jürgen Groß
On 11.03.25 10:21, Julien Grall wrote: Hi Juergen, On 11/03/2025 07:31, Juergen Gross wrote: In docs/misc/xenstore.txt all Xenstore commands are specified, but the specifications lack the numerical values of the commands. Add a table with all commands, their values, and a potential remark (e.g

Re: [PATCH v3 3/3] xen: mem_access: conditionally compile vm_event.c & monitor.c

2025-03-11 Thread Jan Beulich
On 11.03.2025 11:27, Sergiy Kibrik wrote: > From: Stefano Stabellini > > Extend coverage of CONFIG_VM_EVENT option and make the build of VM events > and monitoring support optional. Also make MEM_PAGING option depend on > VM_EVENT > to document that mem_paging is relying on vm_event. > This is t

Re: [PATCH v2] docs: specify numerical values of Xenstore commands

2025-03-11 Thread Julien Grall
Hi Juergen, On 11/03/2025 07:31, Juergen Gross wrote: In docs/misc/xenstore.txt all Xenstore commands are specified, but the specifications lack the numerical values of the commands. Add a table with all commands, their values, and a potential remark (e.g. whether the command is optional). Rep

[PATCH v4 3/3] x86/iommu: avoid MSI address and data writes if IRT index hasn't changed

2025-03-11 Thread Roger Pau Monne
Attempt to reduce the MSI entry writes, and the associated checking whether memory decoding and MSI-X is enabled for the PCI device, when the MSI data hasn't changed. When using Interrupt Remapping the MSI entry will contain an index into the remapping table, and it's in such remapping table where

Re: [PATCH v3 1/3] xen: kconfig: rename MEM_ACCESS -> VM_EVENT

2025-03-11 Thread Tamas K Lengyel
On Tue, Mar 11, 2025 at 8:01 AM Jan Beulich wrote: > > On 11.03.2025 11:23, Sergiy Kibrik wrote: > > --- a/xen/common/Kconfig > > +++ b/xen/common/Kconfig > > @@ -92,7 +92,7 @@ config HAS_VMAP > > config MEM_ACCESS_ALWAYS_ON > > bool > > > > -config MEM_ACCESS > > +config VM_EVENT > >

Re: [PATCH v3 1/3] xen: kconfig: rename MEM_ACCESS -> VM_EVENT

2025-03-11 Thread Sergiy Kibrik
11.03.25 14:01, Jan Beulich: On 11.03.2025 11:23, Sergiy Kibrik wrote: --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -92,7 +92,7 @@ config HAS_VMAP config MEM_ACCESS_ALWAYS_ON bool -config MEM_ACCESS +config VM_EVENT def_bool MEM_ACCESS_ALWAYS_ON prompt "Memo

Re: [PATCH v3 3/3] xen: mem_access: conditionally compile vm_event.c & monitor.c

2025-03-11 Thread Tamas K Lengyel
On Tue, Mar 11, 2025 at 7:59 AM Jan Beulich wrote: > > On 11.03.2025 11:27, Sergiy Kibrik wrote: > > From: Stefano Stabellini > > > > Extend coverage of CONFIG_VM_EVENT option and make the build of VM events > > and monitoring support optional. Also make MEM_PAGING option depend on > > VM_EVENT

Re: [PATCH v2 1/7] xen/arm: allow PCI host bridge to have private data

2025-03-11 Thread Grygorii Strashko
On 11.03.25 12:24, Mykyta Poturai wrote: From: Oleksandr Andrushchenko Some of the PCI host bridges require private data. Create a generic approach for that, so such bridges may request the private data to be allocated during initialization. Signed-off-by: Oleksandr Andrushchenko Signed-of

Re: [PATCH v2 03/16] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h

2025-03-11 Thread Pierrick Bouvier
On 3/10/25 21:08, Pierrick Bouvier wrote: They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 12 include/exec/memory_ldst.h.i

Re: [PATCH v2 08/16] exec/memory-internal: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
On 3/11/25 00:26, Philippe Mathieu-Daudé wrote: On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-

Re: [PATCH] x86/elf: Improve code generation in elf_core_save_regs()

2025-03-11 Thread Jan Beulich
On 11.03.2025 15:21, Andrew Cooper wrote: > On 26/02/2025 8:44 am, Jan Beulich wrote: >> On 26.02.2025 08:44, Jan Beulich wrote: >>> On 25.02.2025 23:45, Andrew Cooper wrote: A CALL with 0 displacement is handled specially, and is why this logic functions even with CET Shadow Stacks activ

Re: [PATCH v2 07/16] exec/exec-all: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
On 3/11/25 00:26, Philippe Mathieu-Daudé wrote: On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Missing the "why" justification we couldn't do that before. --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff -

Re: [PATCH v2 14/16] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-11 Thread Pierrick Bouvier
On 3/11/25 00:36, Philippe Mathieu-Daudé wrote: On 11/3/25 05:08, Pierrick Bouvier wrote: we'll use it in system/memory.c. Having part of the commit description separated in its subject is a bit annoying. But then I'm probably using 20-years too old tools in my patch workflow. Only used in sy

Re: [PATCH v2 11/16] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-11 Thread Pierrick Bouvier
On 3/11/25 00:29, Philippe Mathieu-Daudé wrote: On 11/3/25 05:08, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier I didn't follow this direction because Richard had a preference on removing unnecessary inlined functions: https://lore.kernel.org/qemu-dev

Re: [PATCH v2 14/16] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-11 Thread Pierrick Bouvier
On 3/11/25 00:36, Philippe Mathieu-Daudé wrote: On 11/3/25 05:08, Pierrick Bouvier wrote: we'll use it in system/memory.c. Having part of the commit description separated in its subject is a bit annoying. But then I'm probably using 20-years too old tools in my patch workflow. Can you please

Re: [PATCH v6 4/4] CHANGELOG.md: Mention stack-protector feature

2025-03-11 Thread Oleksii Kurochko
On 2/17/25 3:49 AM, Volodymyr Babchuk wrote: Stack protector is meant to be enabled on all architectures, but currently it is tested (and enabled) only on ARM, so mention it in ARM section. Signed-off-by: Volodymyr Babchuk --- TODO: If this patch will not make into 4.20 - rework it by menti

[PATCH v4 2/3] x86/hvm: check return code of hvm_pi_update_irte when binding

2025-03-11 Thread Roger Pau Monne
Consume the return code from hvm_pi_update_irte(), and propagate the error back to the caller if hvm_pi_update_irte() fails. Fixes: 35a1caf8b6b5 ('pass-through: update IRTE according to guest interrupt config changes') Signed-off-by: Roger Pau Monné --- Changes since v3: - New in this version.

Re: [PATCH 11/23] tools/xenstored: Automatically set dom0_domid and priv_domid

2025-03-11 Thread Jürgen Groß
On 10.03.25 15:32, Jason Andryuk wrote: On 2025-03-08 02:02, Jürgen Groß wrote: On 06.03.25 23:03, Jason Andryuk wrote: With split hardware and control domains, each domain should be privileged with respect to xenstore.  When adding domains to xenstore, look at their privilege and add them to

[PATCH v2 1/7] xen/arm: allow PCI host bridge to have private data

2025-03-11 Thread Mykyta Poturai
From: Oleksandr Andrushchenko Some of the PCI host bridges require private data. Create a generic approach for that, so such bridges may request the private data to be allocated during initialization. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Mykyta Poturai --- v1->v2: * no change

[PATCH v3 3/3] xen: mem_access: conditionally compile vm_event.c & monitor.c

2025-03-11 Thread Sergiy Kibrik
From: Stefano Stabellini Extend coverage of CONFIG_VM_EVENT option and make the build of VM events and monitoring support optional. Also make MEM_PAGING option depend on VM_EVENT to document that mem_paging is relying on vm_event. This is to reduce code size on Arm when this option isn't enabled.

[PATCH v2] tools: Mark ACPI SDTs as NVS in the PVH build path

2025-03-11 Thread Alejandro Vallejo
Commit cefeffc7e583 marked ACPI tables as NVS in the hvmloader path because SeaBIOS may otherwise just mark it as RAM. There is, however, yet another reason to do it even in the PVH path. Xen's incarnation of AML relies on having access to some ACPI tables (e.g: _STA of Processor objects relies on

[PATCH v3 2/3] x86:monitor: control monitor.c build with CONFIG_VM_EVENT option

2025-03-11 Thread Sergiy Kibrik
Replace more general CONFIG_HVM option with CONFIG_VM_EVENT which is more relevant and specific to monitoring. This is only to clarify at build level to which subsystem this file belongs. No functional change here, as VM_EVENT depends on HVM. Acked-by: Jan Beulich Signed-off-by: Sergiy Kibrik -

Re: [RFC PATCH v3 1/7] xen/arm: add generic SCI subsystem

2025-03-11 Thread Jan Beulich
On 11.03.2025 12:16, Grygorii Strashko wrote: > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -526,6 +526,12 @@ S: Supported > F: xen/arch/arm/include/asm/tee/ > F: xen/arch/arm/tee/ > > +SCI MEDIATORS > +M: Oleksii Moisieiev > +S: Supported > +F: xen/arch/arm/sci > +F: xen/incl

Re: [PATCH 1/3] x86/P2M: synchronize fast and slow paths of p2m_get_page_from_gfn()

2025-03-11 Thread Jan Beulich
On 10.03.2025 15:53, Roger Pau Monné wrote: > On Wed, Feb 26, 2025 at 12:52:27PM +0100, Jan Beulich wrote: >> Handling of both grants and foreign pages was different between the two >> paths. >> >> While permitting access to grants would be desirable, doing so would >> require more involved handlin

Re: [PATCH v2 1/5] xen/arm: Create tee command line parameter

2025-03-11 Thread Jan Beulich
On 10.03.2025 15:50, Bertrand Marquis wrote: > --- a/docs/misc/xen-command-line.pandoc > +++ b/docs/misc/xen-command-line.pandoc > @@ -2651,6 +2651,20 @@ Specify the per-cpu trace buffer size in pages. > > Flag to enable TSC deadline as the APIC timer mode. > > +### tee > +> `= ` This wants a

[PATCH v4 0/3] x86/pci: reduce PCI accesses

2025-03-11 Thread Roger Pau Monne
Hello, Patches 1 and 2 are new bugfixes in this version. Patch 3 is still mostly as v3, just with the extra logic to ensure vmx_pi_update_irte() correctness. Thanks, Roger. Roger Pau Monne (3): x86/vmx: fix posted interrupts usage of msi_desc->msg field x86/hvm: check return code of hvm_pi_

Re: [PATCH v2] xen/page_alloc: Simplify domain_adjust_tot_pages

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 04, 2025 at 11:10:00AM +, Alejandro Vallejo wrote: > The logic has too many levels of indirection and it's very hard to > understand it its current form. Split it between the corner case where > the adjustment is bigger than the current claim and the rest to avoid 5 > auxiliary vari

[PATCH v2 3/7] xen/arm: add support for PCI child bus

2025-03-11 Thread Mykyta Poturai
From: Oleksandr Andrushchenko PCI host bridges often have different ways to access the root and child bus configuration spaces. One of the examples is Designware's host bridge and its multiple clones [1]. Linux kernel implements this by instantiating a child bus when device drivers provide not o

Re: [PATCH v3 2/2] x86/iommu: avoid MSI address and data writes if IRT index hasn't changed

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 11, 2025 at 08:35:35AM +0100, Jan Beulich wrote: > On 10.03.2025 16:42, Roger Pau Monné wrote: > > On Mon, Mar 10, 2025 at 11:51:09AM +0100, Jan Beulich wrote: > >> On 10.03.2025 10:55, Roger Pau Monne wrote: > >>> Attempt to reduce the MSI entry writes, and the associated checking > >

Re: [PATCH 1/2] xen/arm: Improve handling of nr_spis

2025-03-11 Thread Bertrand Marquis
> On 11 Mar 2025, at 10:59, Orzel, Michal wrote: > > > > On 11/03/2025 10:30, Bertrand Marquis wrote: >> >> >> Hi Michal, >> >>> On 11 Mar 2025, at 10:04, Michal Orzel wrote: >>> >>> At the moment, we print a warning about max number of IRQs supported by >>> GIC bigger than vGIC only fo

[PATCH v3] x86/msr: expose MSR_FAM10H_MMIO_CONF_BASE on AMD

2025-03-11 Thread Roger Pau Monne
The MMIO_CONF_BASE reports the base of the MCFG range on AMD systems. Linux pre-6.14 is unconditionally attempting to read the MSR without a safe MSR accessor, and since Xen doesn't allow access to it Linux reports the following error: unchecked MSR access error: RDMSR from 0xc0010058 at rIP: 0xff

Re: [PATCH v3] x86/msr: expose MSR_FAM10H_MMIO_CONF_BASE on AMD

2025-03-11 Thread Jan Beulich
On 11.03.2025 13:22, Roger Pau Monne wrote: > The MMIO_CONF_BASE reports the base of the MCFG range on AMD systems. > Linux pre-6.14 is unconditionally attempting to read the MSR without a > safe MSR accessor, and since Xen doesn't allow access to it Linux reports > the following error: > > unchec

[PATCH v2 07/16] exec/exec-all: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dd5c40f2233..19b0eda44a7 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -20

[PATCH v3 1/3] xen: kconfig: rename MEM_ACCESS -> VM_EVENT

2025-03-11 Thread Sergiy Kibrik
Use more generic CONFIG_VM_EVENT name throughout Xen code instead of CONFIG_MEM_ACCESS. This reflects the fact that vm_event is a higher level feature, with mem_access & monitor depending on it. CC: Jan Beulich Suggested-by: Tamas K Lengyel Acked-by: Tamas K Lengyel Signed-off-by: Sergiy Kibrik

[PATCH v2 5/7] xen/arm: rcar4: add delay after programming ATU

2025-03-11 Thread Mykyta Poturai
From: Volodymyr Babchuk For some reason, we need a delay before accessing ATU region after we programmed it. Otherwise, we'll get erroneous TLP. There is a code below, which should do this in proper way, by polling CTRL2 register, but according to documentation, hardware does not change this ATU

[PATCH v2 7/7] xen/arm: rcar4: program ATU to accesses to all functions

2025-03-11 Thread Mykyta Poturai
From: Volodymyr Babchuk According to ATU documentation, bits [18:16] of accessed memory address correspond to a function number. This is somewhat similar to ECAM, but with huge holes between regions. We can use this to minimize number of ATU re-programmings: configure ATU to access BDF with F=0

[PATCH v2 2/7] xen/arm: make pci_host_common_probe return the bridge

2025-03-11 Thread Mykyta Poturai
From: Oleksandr Andrushchenko Some of the PCI host bridges require additional processing during the probe phase. For that they need to access struct bridge of the probed host, so return pointer to the new bridge from pci_host_common_probe. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: M

[ImageBuilder][PATCH v2] uboot-script-gen: handle reserved memory regions

2025-03-11 Thread Luca Miccio
Currently, the uboot-script-gen does not account for reserved memory regions in the device tree. This oversight can lead to scenarios where one or more boot modules overlap with a reserved region. As a result, Xen will always crash upon detecting this overlap. However, the crash will be silent (wit

[RFC PATCH v3 2/7] xen/arm: scmi-smc: update to be used under sci subsystem

2025-03-11 Thread Grygorii Strashko
The introduced SCI (System Control Interface) subsystem provides unified interface to integrate in Xen SCI drivers which adds support for ARM firmware (EL3, SCP) based software interfaces (like SCMI) that are used in system management. The SCI subsystem allows to add drivers for different FW interf

[RFC PATCH v3 0/7] xen/arm: scmi: introduce SCI SCMI SMC multi-agent support

2025-03-11 Thread Grygorii Strashko
Hi, This is respin of RFCv2 series from Oleksii Moisieiev [1] which was send pretty long time ago (2022), with the main intention is to resume this discussion in public and gather more opinions. Hence the code was previously sent long time ago there are pretty high number of changes, including

[RFC PATCH v3 5/7] libs: libxenhypfs - handle blob properties

2025-03-11 Thread Grygorii Strashko
From: Oleksii Moisieiev libxenhypfs will return blob properties as is. This output can be used to retrieve information from the hypfs. Caller is responsible for parsing property value. Signed-off-by: Oleksii Moisieiev Reviewed-by: Volodymyr Babchuk --- tools/libs/hypfs/core.c | 2 -- 1 file c

Re: [PATCH 1/3] x86/P2M: synchronize fast and slow paths of p2m_get_page_from_gfn()

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 11, 2025 at 09:44:18AM +0100, Jan Beulich wrote: > On 10.03.2025 15:53, Roger Pau Monné wrote: > > On Wed, Feb 26, 2025 at 12:52:27PM +0100, Jan Beulich wrote: > >> Handling of both grants and foreign pages was different between the two > >> paths. > >> > >> While permitting access to g

[PATCH 1/2] xen/arm: Improve handling of nr_spis

2025-03-11 Thread Michal Orzel
At the moment, we print a warning about max number of IRQs supported by GIC bigger than vGIC only for hardware domain. This check is not hwdom special, and should be made common. Also, in case of user not specifying nr_spis for dom0less domUs, we should take into account max number of IRQs supporte

[PATCH 0/2] arm: better handling of nr_spis

2025-03-11 Thread Michal Orzel
Refer: https://lore.kernel.org/xen-devel/20250306220343.203047-6-jason.andr...@amd.com/T/#mc15ab00940d5964b18b3d6092869dae6f85af1dc Michal Orzel (2): xen/arm: Improve handling of nr_spis tools/arm: Reject configuration with incorrect nr_spis value docs/man/xl.cfg.5.pod.in| 13 +--

  1   2   3   >