Re: [PATCH v4] vpci: Add resizable bar support

2025-01-09 Thread Jan Beulich
On 10.01.2025 08:10, Chen, Jiqian wrote: > On 2025/1/7 18:06, Jan Beulich wrote: >> On 19.12.2024 06:21, Jiqian Chen wrote: >>> +#define PCI_REBAR_CAP(n) (4 + 8 * (n)) /* capability register >>> */ >>> +#define PCI_REBAR_CAP_SHIFT 4 /* shift for >>> suppor

Re: [PATCH v2] xen: update pvcalls_front_accept prototype

2025-01-09 Thread Jan Beulich
On 10.01.2025 01:10, Stefano Stabellini wrote: > On Wed, 8 Jan 2025, Jan Beulich wrote: >> On 08.01.2025 00:30, Stefano Stabellini wrote: >>> On Tue, 7 Jan 2025, Jan Beulich wrote: On 06.01.2025 22:36, Stefano Stabellini wrote: > xen: update pvcalls_front_accept prototype > > Signe

Re: [PATCH v4] vpci: Add resizable bar support

2025-01-09 Thread Chen, Jiqian
On 2025/1/7 18:06, Jan Beulich wrote: > On 19.12.2024 06:21, Jiqian Chen wrote: >> --- /dev/null >> +++ b/xen/drivers/vpci/rebar.c >> @@ -0,0 +1,131 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * Copyright (C) 2024 Advanced Micro Devices, Inc. All Rights Reserved. >> + * >> + * Au

Re: [PATCH v2 20/35] xen/console: introduce console_owner_domid()

2025-01-09 Thread Denis Mukhin
On Thursday, January 9th, 2025 at 3:46 PM, Stefano Stabellini wrote: > > > On Thu, 9 Jan 2025, Roger Pau Monné wrote: > > > On Wed, Jan 08, 2025 at 04:29:24PM -0800, Stefano Stabellini wrote: > > > > > On Wed, 8 Jan 2025, Denis Mukhin wrote: > > > > > > > On Wednesday, January 8th, 2025 a

Re: [PATCH v2 20/35] xen/console: introduce console_owner_domid()

2025-01-09 Thread Denis Mukhin
On Thursday, January 9th, 2025 at 12:27 AM, Jan Beulich wrote: > > > On 08.01.2025 23:15, Denis Mukhin wrote: > > > On Wednesday, January 8th, 2025 at 12:35 AM, Roger Pau Monné > > roger@citrix.com wrote: > > > > > On Wed, Jan 08, 2025 at 09:13:02AM +0100, Jan Beulich wrote: > > > > > > > O

Re: [PATCH v2 1/2] ARM: ITS: implement quirks and add support for Renesas Gen4 ITS

2025-01-09 Thread Stefano Stabellini
On Wed, 8 Jan 2025, Mykyta Poturai wrote: > From: Oleksandr Andrushchenko > > There are number of ITS implementations exist which are different from > the base one which have number of functionalities defined as is > "IMPLEMENTATION DEFINED", e.g. there may exist differences in cacheability, > sh

Re: [PATCH v2] xen: update pvcalls_front_accept prototype

2025-01-09 Thread Stefano Stabellini
On Wed, 8 Jan 2025, Jan Beulich wrote: > On 08.01.2025 00:30, Stefano Stabellini wrote: > > On Tue, 7 Jan 2025, Jan Beulich wrote: > >> On 06.01.2025 22:36, Stefano Stabellini wrote: > >>> xen: update pvcalls_front_accept prototype > >>> > >>> Signed-off-by: Stefano Stabellini > >>> --- > >>> > >>

Re: [PATCH v2 1/2] x86/uaccess: rework user access speculative harden guards

2025-01-09 Thread Stefano Stabellini
On Thu, 9 Jan 2025, Nicola Vetrini wrote: > On 2025-01-04 01:20, Stefano Stabellini wrote: > > Hi Nicola, one question below > > > > On Wed, 27 Nov 2024, Nicola Vetrini wrote: > > > > #define AMD_OSVW_ERRATUM(osvw_id, ...) osvw_id, __VA_ARGS__, 0 > > > > > > > > where we're using the C99 form rat

Re: [PATCH v4] misra: add deviation for MISRA C Rule R11.8.

2025-01-09 Thread Stefano Stabellini
On Thu, 9 Jan 2025, Alessandro Zucchelli wrote: > Rule 11.8 states as following: "A cast shall not remove any `const' or > `volatile' qualification from the type pointed to by a pointer". > > Function `__hvm_copy' in `xen/arch/x86/hvm/hvm.c' is a double-use > function, where the parameter needs to

Re: [PATCH v2 20/35] xen/console: introduce console_owner_domid()

2025-01-09 Thread Stefano Stabellini
On Thu, 9 Jan 2025, Roger Pau Monné wrote: > On Wed, Jan 08, 2025 at 04:29:24PM -0800, Stefano Stabellini wrote: > > On Wed, 8 Jan 2025, Denis Mukhin wrote: > > > On Wednesday, January 8th, 2025 at 12:35 AM, Roger Pau Monné > > > wrote: > > > > On Wed, Jan 08, 2025 at 09:13:02AM +0100, Jan Beulic

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

2025-01-09 Thread Heiko Stübner
Am Donnerstag, 9. Januar 2025, 15:57:13 CET schrieb 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 > Cc: Sandy Huang > Cc: "Heiko Stübner" > Cc: Andy Yan I've loo

Re: [PATCH] xen/mm: Introduce per-arch pte_attr_t type for PTE flags

2025-01-09 Thread Shawn Anastasio
On 1/9/25 3:15 AM, Jan Beulich wrote: > On 31.12.2024 19:27, Shawn Anastasio wrote: >> Xen's memory management APIs map_pages_to_xen, modify_xen_mappings, >> set_fixmap, ioremap_attr, and __vmap all use an unsigned int to >> represent architecture-dependent page table entry flags. This assumption >

Re: [PATCH] xen/mm: Introduce per-arch pte_attr_t type for PTE flags

2025-01-09 Thread Shawn Anastasio
On 1/9/25 4:56 AM, Andrew Cooper wrote: > Either, arch/mm.h is required to provide the typedef, This approach seems fine to me. I wanted to avoid changes to other architectures where possible, but if this is acceptable then this is probably the route I'd want to go down (see below). For the reaso

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Song Liu
On Thu, Jan 9, 2025 at 5:16 AM Joel Granados wrote: > [...] > drivers/base/firmware_loader/fallback_table.c | 2 +- > drivers/cdrom/cdrom.c | 2 +- > drivers/char/hpet.c | 2 +- > drivers/char/ipmi/ipmi_poweroff.c | 2 +- > drivers/cha

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Frediano Ziglio
On Thu, Jan 9, 2025 at 4:03 PM Andrew Cooper wrote: > > On 09/01/2025 3:30 pm, Frediano Ziglio wrote: > > On Thu, Jan 9, 2025 at 1:44 PM Andrew Cooper > > wrote: > >> On 09/01/2025 1:23 pm, Jan Beulich wrote: > >>> On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: > Xen compiled with -

Re: [PATCH v2 02/18] x86/domain: limit window where curr_vcpu != current on context switch

2025-01-09 Thread Roger Pau Monné
On Wed, Jan 08, 2025 at 04:26:46PM +, Alejandro Vallejo wrote: > This is a net gain even without ASI. Having "current" hold the previous vCPU > on > __context_switch() makes it _a lot_ easier to follow the lazy switch path. > > On Wed Jan 8, 2025 at 2:26 PM GMT, Roger Pau Monne wrote: > > On

Re: [PATCH v2 02/18] x86/domain: limit window where curr_vcpu != current on context switch

2025-01-09 Thread Roger Pau Monné
On Thu, Jan 09, 2025 at 09:59:58AM +0100, Jan Beulich wrote: > On 08.01.2025 15:26, Roger Pau Monne wrote: > > On x86 Xen will perform lazy context switches to the idle vCPU, where the > > previously running vCPU context is not overwritten, and only current is > > updated > > to point to the idle

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

2025-01-09 Thread Matthew Auld
On 09/01/2025 16:26, Thomas Zimmermann wrote: Hi Am 09.01.25 um 17:05 schrieb Matthew Auld: On 09/01/2025 14:57, Thomas Zimmermann wrote: 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 har

Re: [PATCH 2/2] xen: do not use '%ms' scanf specifier

2025-01-09 Thread Roger Pau Monné
On Thu, Jan 09, 2025 at 11:25:13AM +, David Woodhouse wrote: > On Thu, 2025-01-09 at 11:59 +0100, Anthony PERARD wrote: > > > > >   char label[32]; > > >   XenDevice *xendev = NULL; > > >   XenConsole *con; > > > @@ -550,7 +551,10 @@ static void > > > xen_console_device_create(Xen

[PATCH v2] xen: do not use '%ms' scanf specifier

2025-01-09 Thread Roger Pau Monne
The 'm' parameter used to request auto-allocation of the destination variable is not supported on FreeBSD, and as such leads to failures to parse. What's more, the current usage of '%ms' with xs_node_scanf() is pointless, as it just leads to a double allocation of the same string. Instead introdu

Re: [PATCH 2/2] Update Xen version to 4.20-rc

2025-01-09 Thread Oleksii Kurochko
On 1/9/25 4:44 PM, Jan Beulich wrote: On 09.01.2025 16:39, Andrew Cooper wrote: --- a/README +++ b/README @@ -1,11 +1,11 @@ - -__ ____ _ -\ \/ /___ _ ___ _ _ __ ___| |_ __ _| |__

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

2025-01-09 Thread Thomas Zimmermann
Hi Am 09.01.25 um 17:05 schrieb Matthew Auld: On 09/01/2025 14:57, Thomas Zimmermann wrote: 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. Signed-off-by: Thomas Zimm

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

2025-01-09 Thread Matthew Auld
On 09/01/2025 14:57, Thomas Zimmermann wrote: 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. Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc: "Thomas Hellströ

Re: [PATCH 2/2] xen: do not use '%ms' scanf specifier

2025-01-09 Thread Roger Pau Monné
On Thu, Jan 09, 2025 at 11:59:48AM +0100, Anthony PERARD wrote: > On Tue, Jan 07, 2025 at 10:31:40AM +0100, Roger Pau Monne wrote: > > The 'm' parameter used to request auto-allocation of the destination > > variable > > is not supported on FreeBSD, and as such leads to failures to parse. > > > >

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Darrick J. Wong
On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except the > ones in ./net dir. The "net" sysctl code is special as it modifies the > arrays before passing it on to the registration function. > > Constifying ctl_table struc

Re: [PATCH 1/2] xen/console: fix error handling in xen_console_device_create()

2025-01-09 Thread Roger Pau Monné
On Thu, Jan 09, 2025 at 11:13:45AM +0100, Anthony PERARD wrote: > On Tue, Jan 07, 2025 at 10:31:39AM +0100, Roger Pau Monne wrote: > > The usage of error_prepend() in some of the error contexts of > > xen_console_device_create() is incorrect, as `errp` hasn't been initialized. > > This leads to the

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Andrew Cooper
On 09/01/2025 3:30 pm, Frediano Ziglio wrote: > On Thu, Jan 9, 2025 at 1:44 PM Andrew Cooper > wrote: >> On 09/01/2025 1:23 pm, Jan Beulich wrote: >>> On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: Xen compiled with -mtune=generic has .text alignment set to 64-bytes. Having text

Re: [PATCH for-4.20 0/2] Prep for 4.20-rc1

2025-01-09 Thread Oleksii Kurochko
Hi Andrew, LGTM: Release-Acked-by: Oleksii Kurochko . ( in case if my Ack is needed ) Thanks. ~ Oleksii On 1/9/25 4:39 PM, Andrew Cooper wrote: RC1 is scheduled for tomorrow (Jan 10th). Andrew Cooper (2): Config.mk: Pin QEMU_UPSTREAM_REVISION Update Xen version to 4.20-rc Config.m

Re: [PATCH 2/2] Update Xen version to 4.20-rc

2025-01-09 Thread Andrew Cooper
On 09/01/2025 3:44 pm, Jan Beulich wrote: > On 09.01.2025 16:39, Andrew Cooper wrote: >> --- a/README >> +++ b/README >> @@ -1,11 +1,11 @@ >> - >> -__ ____ _ >> -\ \/ /___ _ ___ _ _ __

Re: [PATCH 1/2] Config.mk: Pin QEMU_UPSTREAM_REVISION

2025-01-09 Thread Anthony PERARD
On Thu, Jan 09, 2025 at 03:39:20PM +, Andrew Cooper wrote: > Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH 2/2] Update Xen version to 4.20-rc

2025-01-09 Thread Jan Beulich
On 09.01.2025 16:46, Andrew Cooper wrote: > On 09/01/2025 3:44 pm, Jan Beulich wrote: >> On 09.01.2025 16:39, Andrew Cooper wrote: >>> --- a/README >>> +++ b/README >>> @@ -1,11 +1,11 @@ >>> - >>> -__ ___

Re: [PATCH v7 5/7] xen: add new domctl get_changed_domain

2025-01-09 Thread Jan Beulich
On 09.01.2025 11:59, Juergen Gross wrote: > Add a new domctl sub-function to get data of a domain having changed > state (this is needed by Xenstore). > > The returned state just contains the domid, the domain unique id, > and some flags (existing, shutdown, dying). > > In order to enable Xenstor

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Corey Minyard
On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except the > ones in ./net dir. The "net" sysctl code is special as it modifies the > arrays before passing it on to the registration function. > ... > diff --git a/drivers/ch

Re: [PATCH v7 4/7] xen: add bitmap to indicate per-domain state changes

2025-01-09 Thread Jan Beulich
On 09.01.2025 11:59, Juergen Gross wrote: > Add a bitmap with one bit per possible domid indicating the respective > domain has changed its state (created, deleted, dying, crashed, > shutdown). > > Registering the VIRQ_DOM_EXC event will result in setting the bits for > all existing domains and re

Re: [PATCH v7 1/7] xen/events: fix race with set_global_virq_handler()

2025-01-09 Thread Jan Beulich
On 09.01.2025 11:59, Juergen Gross wrote: > There is a possible race scenario between set_global_virq_handler() > and clear_global_virq_handlers() targeting the same domain, which > might result in that domain ending as a zombie domain. > > In case set_global_virq_handler() is being called for a d

Re: [PATCH 2/2] Update Xen version to 4.20-rc

2025-01-09 Thread Jan Beulich
On 09.01.2025 16:39, Andrew Cooper wrote: > --- a/README > +++ b/README > @@ -1,11 +1,11 @@ > - > -__ ____ _ > -\ \/ /___ _ ___ _ _ __ ___| |_ __ _| |__ | | ___ > - \ // _ \ '_ \ ___

[PATCH 2/2] Update Xen version to 4.20-rc

2025-01-09 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko --- README | 16 SUPPORT.md | 2 +- xen/Makefile | 2 +- 3 files changed, 10 insertions(+), 10 de

[PATCH for-4.20 0/2] Prep for 4.20-rc1

2025-01-09 Thread Andrew Cooper
RC1 is scheduled for tomorrow (Jan 10th). Andrew Cooper (2): Config.mk: Pin QEMU_UPSTREAM_REVISION Update Xen version to 4.20-rc Config.mk| 2 +- README | 16 SUPPORT.md | 2 +- xen/Makefile | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) base-com

[PATCH 1/2] Config.mk: Pin QEMU_UPSTREAM_REVISION

2025-01-09 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index fa0414055b93..

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Frediano Ziglio
On Thu, Jan 9, 2025 at 1:44 PM Andrew Cooper wrote: > > On 09/01/2025 1:23 pm, Jan Beulich wrote: > > On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: > >> Xen compiled with -mtune=generic has .text alignment set to 64-bytes. > >> Having text_diff non-64-bytes-aligned breaks stuff: > >> > >>

Re: [PATCH v3 0/2] x86: Add Support for Paging-Write Feature

2025-01-09 Thread Tamas K Lengyel
On Thu, Jan 9, 2025 at 9:30 AM Oleksii Kurochko wrote: > > > On 1/2/25 6:13 PM, Petr Beneš wrote: > > From: Petr Beneš > > Changes since v2: > - Reset entry->pw in all cases in p2m_set_entry, except for p2m_access_r_pw > > Changes since v1: > - Added signed-off-by tags > > This patch introduces a

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

2025-01-09 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 v2 22/25] drm/vmwgfx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1 file changed, 4 insertions(

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

2025-01-09 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. Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vivi --- drivers/gpu/drm/xe/xe

[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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: Laurent Pinchart Cc: Tomi Valkeinen --- drivers/gpu/drm/xlnx/zynqmp_kms.c | 7 +-- 1 file changed, 5 insertions(+), 2 de

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

2025-01-09 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 v2 20/25] drm/tegra: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletion

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

2025-01-09 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 v2 21/25] drm/virtio: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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 v2 19/25] drm/rockchip: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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 Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 12 ++-- 1 file changed, 6 insertio

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

2025-01-09 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 v2 15/18] x86/mm: introduce a per-vCPU mapcache when using ASI

2025-01-09 Thread Alejandro Vallejo
On Wed Jan 8, 2025 at 2:26 PM GMT, Roger Pau Monne wrote: > When using a unique per-vCPU root page table the per-domain region becomes > per-vCPU, and hence the mapcache is no longer shared between all vCPUs of a > domain. Introduce per-vCPU mapcache structures, and modify map_domain_page() > to c

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

2025-01-09 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 incorrect. This series fixes this for most drivers. Default sca

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

2025-01-09 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: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dri

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

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. The hardware requires the scnaline 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. Signed-off-by: Thomas Zimmermann Cc: Rob C

[PATCH v2 08/25] drm/gma500: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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 Cc: Patrik Jakobsson --- drivers/gpu/drm/gma500/gem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a

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

2025-01-09 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 v2 14/25] drm/nouveau: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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 Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1 file changed, 4 insertions(

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

2025-01-09 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

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

2025-01-09 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 v2 17/25] drm/renesas/rcar-du: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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: Laurent Pinchart Cc: Kieran Bingham --- drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 7 +-- 1 file changed, 5 inserti

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

2025-01-09 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 v2 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-01-09 Thread Thomas Zimmermann
Add drm_modes_size_dumb(), a helper to calculate the dumb-buffer scanline pitch and allocation size. Implementations of struct drm_driver.dumb_create can call the new helper for their size computations. There's currently quite a bit of code duplication among DRM's memory managers. Each calculates s

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

2025-01-09 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: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/

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

2025-01-09 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 v2 11/25] drm/loongson: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file changed, 8

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

2025-01-09 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 05/25] drm/gem-vram: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 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

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Martin K. Petersen
Joel, > Add the const qualifier to all the ctl_tables in the tree except the > ones in ./net dir. The "net" sysctl code is special as it modifies the > arrays before passing it on to the registration function. Reviewed-by: Martin K. Petersen # SCSI -- Martin K. Petersen Oracle Linux Eng

Re: [PATCH v2 13/18] x86/spec-ctrl: introduce Address Space Isolation command line option

2025-01-09 Thread Alejandro Vallejo
On Wed Jan 8, 2025 at 2:26 PM GMT, Roger Pau Monne wrote: > No functional change, as the option is not used. > > Introduced new so newly added functionality is keyed on the option being > enabled, even if the feature is non-functional. > > When ASI is enabled for PV domains, printing the usage of X

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Jani Nikula
On Thu, 09 Jan 2025, Joel Granados wrote: > diff --git a/drivers/gpu/drm/i915/i915_perf.c > b/drivers/gpu/drm/i915/i915_perf.c > index 2406cda75b7b..5384d1bb4923 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -4802,7 +4802,7 @@ int i915_perf_remove_c

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Jan Beulich
On 09.01.2025 14:44, Andrew Cooper wrote: > On 09/01/2025 1:23 pm, Jan Beulich wrote: >> On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: >>> Xen compiled with -mtune=generic has .text alignment set to 64-bytes. >>> Having text_diff non-64-bytes-aligned breaks stuff: >>> >>> Traceback (mo

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Steven Rostedt
On Thu, 09 Jan 2025 14:16:39 +0100 Joel Granados wrote: > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 2e113f8b13a2..489cbab3d64c 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -8786,7 +8786,7 @@ ftrace_enable_sysctl(const struct ctl_table *table, in

Re: [PATCH v2 07/18] x86/pv: update guest LDT mappings using the linear entries

2025-01-09 Thread Alejandro Vallejo
On Wed Jan 8, 2025 at 2:26 PM GMT, Roger Pau Monne wrote: > The pv_map_ldt_shadow_page() and pv_destroy_ldt() functions rely on the L1 > table(s) that contain such mappings being stashed in the domain structure, and > thus such mappings being modified by merely updating the require L1 entries. > >

Re: [PATCH v3 0/2] x86: Add Support for Paging-Write Feature

2025-01-09 Thread Oleksii Kurochko
On 1/2/25 6:13 PM, Petr Beneš wrote: From: Petr Beneš Changes since v2: - Reset entry->pw in all cases in p2m_set_entry, except for p2m_access_r_pw Changes since v1: - Added signed-off-by tags This patch introduces a new XENMEM_access_r_pw permission. Functionally, it is similar to XENMEM_ac

Re: [for-4.20 PATCH v3] xen/arm: Fully initialise struct membanks_hdr fields

2025-01-09 Thread Oleksii Kurochko
On 1/9/25 2:02 PM, Luca Fancellu wrote: Commit a14593e3995a ("xen/device-tree: Allow region overlapping with /memreserve/ ranges") introduced a type in the 'struct membanks_hdr' but forgot to update the 'struct kernel_info' initialiser, while it doesn't lead to failures because the field is not

Re: [PATCH v2] xen/arm: ffa: fix build with clang

2025-01-09 Thread Oleksii Kurochko
On 1/8/25 5:40 PM, Stewart Hildebrand wrote: Clang 16 reports: In file included from arch/arm/tee/ffa.c:72: arch/arm/tee/ffa_private.h:329:17: error: 'used' attribute ignored on a non-definition declaration [-Werror,-Wignored-attributes] extern uint32_t __ro_after_init ffa_fw_version;

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Andrew Cooper
On 09/01/2025 1:23 pm, Jan Beulich wrote: > On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: >> Xen compiled with -mtune=generic has .text alignment set to 64-bytes. >> Having text_diff non-64-bytes-aligned breaks stuff: >> >> Traceback (most recent call last): >> File >> "/builddi

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Marek Marczykowski-Górecki
On Thu, Jan 09, 2025 at 02:23:27PM +0100, Jan Beulich wrote: > No Fixes: tag? I guess this would be appropriate: Fixes: aa9045e77130 ("x86/boot: Rework how 32bit C is linked/included for early boot") (but not relevant for backports, since that's only in 4.20 release cycle) -- Best Regards

Re: [PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Jan Beulich
On 09.01.2025 14:15, Marek Marczykowski-Górecki wrote: > Xen compiled with -mtune=generic has .text alignment set to 64-bytes. > Having text_diff non-64-bytes-aligned breaks stuff: > > Traceback (most recent call last): > File > "/builddir/build/BUILD/xen-4.20.0-build/xen-4.20.0-rc0/xen

[PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Joel Granados
Add the const qualifier to all the ctl_tables in the tree except the ones in ./net dir. The "net" sysctl code is special as it modifies the arrays before passing it on to the registration function. Constifying ctl_table structs will prevent the modification of proc_handler function pointers as the

[PATCH] x86/boot: adjust text gap/diff to work with 64-bytes alignment too

2025-01-09 Thread Marek Marczykowski-Górecki
Xen compiled with -mtune=generic has .text alignment set to 64-bytes. Having text_diff non-64-bytes-aligned breaks stuff: Traceback (most recent call last): File "/builddir/build/BUILD/xen-4.20.0-build/xen-4.20.0-rc0/xen/./tools/combine_two_binaries.py", line 96, in raise Exce

[for-4.20 PATCH v3] xen/arm: Fully initialise struct membanks_hdr fields

2025-01-09 Thread Luca Fancellu
Commit a14593e3995a ("xen/device-tree: Allow region overlapping with /memreserve/ ranges") introduced a type in the 'struct membanks_hdr' but forgot to update the 'struct kernel_info' initialiser, while it doesn't lead to failures because the field is not currently used while managing kernel_info s

Re: [XEN RFC PATCH v4 0/5] IOMMU subsystem redesign and PV-IOMMU interface

2025-01-09 Thread Marek Marczykowski-Górecki
On Thu, Jan 09, 2025 at 12:41:35PM +, Teddy Astie wrote: > Will do some additional testing with PCI passthrough and plan to fix it > for v5. There are PCI passthrough tests on gitlab that should cover the cases I hit. You may want to let the machine do the work for you ;) -- Best Regards, M

Re: [PATCH v4] docs: fusa: Add dom0less domain configuration requirements

2025-01-09 Thread Bertrand Marquis
Hi Ayan, > On 9 Jan 2025, at 11:00, Ayan Kumar Halder wrote: > > > On 09/01/2025 07:53, Bertrand Marquis wrote: >> Hi Ayan, > Hi Bertrand, >> >> This is a lot better. >> I just have some minor phrasing comments after. >> >>> On 8 Jan 2025, at 18:03, Ayan Kumar Halder >>> wrote: >>> >>> Fro

Re: [XEN RFC PATCH v4 0/5] IOMMU subsystem redesign and PV-IOMMU interface

2025-01-09 Thread Teddy Astie
Hello, >>> 3. Xen complains on boot about missing endbr64 (surprisingly, it didn't >>> exploded): >>> >>> (XEN) alt table 82d0404234d8 -> 82d040432d82 >>> (XEN) altcall iommu_get_max_iova+0x11/0x30 dest >>> iommu.c#intel_iommu_get_max_iova has no endbr64 >>> (XEN) a

Re: [XEN RFC PATCH v4 0/5] IOMMU subsystem redesign and PV-IOMMU interface

2025-01-09 Thread Marek Marczykowski-Górecki
On Thu, Jan 09, 2025 at 11:39:04AM +, Teddy Astie wrote: > Thanks for your review. > > > Hi, > > > > I finally got time to try this revision (sorry it took so long!). My > > goal was to test it this time with some HVM domU too. I didn't get very > > far... > > > > Issues I hit: > > > > 1. A

Re: [XEN RFC PATCH v4 0/5] IOMMU subsystem redesign and PV-IOMMU interface

2025-01-09 Thread Jan Beulich
On 09.01.2025 12:39, Teddy Astie wrote: >> 3. Xen complains on boot about missing endbr64 (surprisingly, it didn't >> exploded): >> >> (XEN) alt table 82d0404234d8 -> 82d040432d82 >> (XEN) altcall iommu_get_max_iova+0x11/0x30 dest >> iommu.c#intel_iommu_get_max_iova has no en

Re: [PATCH v1 11/11] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-pstate driver

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:35, Penny Zheng wrote: > @@ -489,6 +491,117 @@ static int cf_check amd_pstate_epp_set_policy(struct > cpufreq_policy *policy) > return amd_pstate_epp_update_limit(policy); > } > > +int get_amd_cppc_para(unsigned int cpu, > + struct xen_cppc_para *cppc_

Re: [PATCH v1 09/11] xen/x86: implement EPP support for the AMD processors

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:11, Penny Zheng wrote: > @@ -223,14 +227,29 @@ static void amd_pstate_write_request_msrs(void *info) > } > > static int cf_check amd_pstate_write_request(int cpu, uint8_t min_perf, > - uint8_t des_perf, uint8_t > max_perf) > +

Re: [PATCH v1 10/11] tools/xenpm: Print CPPC parameters for amd-pstate driver

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:33, Penny Zheng wrote: > --- a/tools/misc/xenpm.c > +++ b/tools/misc/xenpm.c > @@ -787,12 +787,22 @@ static unsigned int calculate_activity_window(const > xc_cppc_para_t *cppc, > return mantissa * multiplier; > } > > + > /* print out parameters about cpu frequency */ No

Re: [XEN RFC PATCH v4 0/5] IOMMU subsystem redesign and PV-IOMMU interface

2025-01-09 Thread Teddy Astie
Thanks for your review. > Hi, > > I finally got time to try this revision (sorry it took so long!). My > goal was to test it this time with some HVM domU too. I didn't get very > far... > > Issues I hit: > > 1. AMD IOMMU driver is not converted (fails to build), for now disabled > CONFIG_AM

Re: [PATCH 2/2] xen: do not use '%ms' scanf specifier

2025-01-09 Thread David Woodhouse
On Thu, 2025-01-09 at 11:59 +0100, Anthony PERARD wrote: > > >   char label[32]; > >   XenDevice *xendev = NULL; > >   XenConsole *con; > > @@ -550,7 +551,10 @@ static void > > xen_console_device_create(XenBackendInstance *backend, > >   goto fail; > >   } > >   > > -   

Re: [PATCH v1 08/11] x86/cpufreq: add "cpufreq=amd-pstate,active" para

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:11, Penny Zheng wrote: > From: Penny Zheng > > The amd-pstate driver may support multiple working modes, passive and active. > > Introduce a new variable to keep track of which mode is currently enabled. > This variable will also help to choose which cpufreq driver to be registe

Re: [PATCH v1 07/11] xen/cpufreq: only set gov NULL when cpufreq_driver.target() exists

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:11, Penny Zheng wrote: > --- a/xen/drivers/cpufreq/cpufreq.c > +++ b/xen/drivers/cpufreq/cpufreq.c > @@ -316,7 +316,13 @@ int cpufreq_add_cpu(unsigned int cpu) > if (hw_all || (cpumask_weight(cpufreq_dom->map) == > perf->domain_info.num_processors)) { >

Re: [PATCH v2 09/18] x86/mm: simplify create_perdomain_mapping() interface

2025-01-09 Thread Alejandro Vallejo
On Wed Jan 8, 2025 at 2:26 PM GMT, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h > index 65cd751087dc..0c57442c9593 100644 > --- a/xen/arch/x86/include/asm/mm.h > +++ b/xen/arch/x86/include/asm/mm.h > @@ -601,8 +601,7 @@ int compat_arch_memory_o

Re: [PATCH v1 06/11] xen/cpufreq: introduce policy type when cpufreq_driver->setpolicy exists

2025-01-09 Thread Jan Beulich
On 03.12.2024 09:11, Penny Zheng wrote: > --- a/xen/drivers/cpufreq/utility.c > +++ b/xen/drivers/cpufreq/utility.c > @@ -484,3 +484,14 @@ int __cpufreq_set_policy(struct cpufreq_policy *data, > > return __cpufreq_governor(data, CPUFREQ_GOV_LIMITS); > } > + > +unsigned int cpufreq_parse_pol

[PATCH v7 6/7] tools/libs: add a new libxenmanage library

2025-01-09 Thread Juergen Gross
In order to have a stable interface in user land for using stable domctl and possibly later sysctl interfaces, add a new library libxenmanage. Signed-off-by: Juergen Gross Reviewed-by: Anthony PERARD --- V1: - new patch V2: - define __XEN_TOOLS__ via Makefile (Anthony PERARD) - use SPDX in heade

[PATCH v7 7/7] tools/xenstored: use new stable interface instead of libxenctrl

2025-01-09 Thread Juergen Gross
Replace the current use of the unstable xc_domain_getinfo_single() interface with the stable domctl XEN_DOMCTL_get_domain_state call via the new libxenmanage library. This will remove the last usage of libxenctrl by Xenstore, so update the library dependencies accordingly. For now only do a direc

[PATCH v7 5/7] xen: add new domctl get_changed_domain

2025-01-09 Thread Juergen Gross
Add a new domctl sub-function to get data of a domain having changed state (this is needed by Xenstore). The returned state just contains the domid, the domain unique id, and some flags (existing, shutdown, dying). In order to enable Xenstore stubdom being built for multiple Xen versions, make th

  1   2   >