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

2025-03-11 Thread Jan Beulich
On 11.03.2025 10:17, Alejandro Vallejo wrote: > 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, >

[PATCH v3 0/3] make build of vm_event/mem_access/monitor optional

2025-03-11 Thread Sergiy Kibrik
This series aims to provide a possibility to build Xen without mem_access and related features. It is already largely covered by corresponding CONFIG_MEM_ACCESS option, yet there're still some parts remaining. Hopefully this would help to reduce dead code a bit. As coverage of MEM_ACCESS config op

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

2025-03-11 Thread Orzel, Michal
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 for hardware domain. This check is not hwdom >> special, and should be m

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

2025-03-11 Thread Jürgen Groß
On 11.03.25 10:43, Julien Grall wrote: 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:

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

2025-03-11 Thread Orzel, Michal
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 wrote: >>> >>> >>> Hi Michal, >>> On 11 Mar 2025, at 10:04, Michal Orzel wrote: At the moment, we print a warning about max numb

Re: [PATCH v2 1/2] xen/arm: fix iomem permissions cfg in map_range_to_domain()

2025-03-11 Thread Grygorii Strashko
Hi On 19.02.25 13:25, Julien Grall wrote: Hi Grygorii, On 18/02/2025 11:22, Grygorii Strashko wrote: Now the following code in map_range_to_domain() res = iomem_permit_access(d, paddr_to_pfn(addr), paddr_to_pfn(PAGE_ALIGN(addr + len - 1))); calculates the iomem rang

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

2025-03-11 Thread Grygorii Strashko
From: Oleksii Moisieiev This patch adds the basic framework for ARM SCI mediator. SCI is System Control Interface, which is designed to redirect requests from the Domains to ARM specific Firmware (for example SCMI). This will allow the devices, passed-through to the different Domains, to access t

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

2025-03-11 Thread Juergen Gross
On 11.03.25 12:16, Grygorii Strashko wrote: 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

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

2025-03-11 Thread 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 "Memory Access and VM even

[RFC PATCH v3 6/7] xen/arm: Export host device-tree to hypfs

2025-03-11 Thread Grygorii Strashko
From: Oleksii Moisieiev If enabled, host device-tree will be exported to hypfs and can be accessed through /devicetree path. Exported device-tree has the same format, as the device-tree exported to the sysfs by the Linux kernel. This is useful when XEN toolstack needs an access to the host device

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

2025-03-11 Thread Jan Beulich
On 11.03.2025 13:06, Roger Pau Monne wrote: > 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 P

Re: [PATCH] xen/page_alloc: Simplify domain_adjust_tot_pages

2025-03-11 Thread Alejandro Vallejo
On Wed Mar 5, 2025 at 1:39 PM GMT, Jan Beulich wrote: > > It's all quite perverse. Fortunately, looking at adjacent claims-related > > code > > xl seems to default to making a claim prior to populating the physmap and > > cancelling the claim at the end of the meminit() hook so this is never a >

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

2025-03-11 Thread Bertrand Marquis
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 wrote: Hi Michal, > On 11 Mar 2025, a

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

2025-03-11 Thread Jason Andryuk
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 xenstored as appropriate. dom0_domid is

[PATCH v2 13/16] system/physmem: compilation unit is now common to all targets

2025-03-11 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index c83d80fa248..9d0b0122e54 100644 --- a/system/meson.build +++ b/system/meson.build @@ -2,7 +2,6 @

[PATCH v3 0/5] xen/acpi: introduce cppc performance hypercall

2025-03-11 Thread Penny Zheng
When running as Xen dom0 PVH guest, MADT table is customized and may have the "wrong" UID processor number, which is inconsistent with the UID in Processor entry in native DSDT. As a result, during ACPI boot-up for dom0, linux fails to set up proper processor logical id <-> physical id map(acpi_ma

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

2025-03-11 Thread Andrew Cooper
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 Monné Looking at this, I suspect my failure was caused by trying to capture

[PATCH 06/16] exec/cpu-all.h: we can now remove ld/st macros

2025-03-11 Thread Pierrick Bouvier
Functions declared in bswap.h will be used instead. At this point, we finished to extract memory API from cpu-all.h, and it can be called from any common or target dependent code. Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 25 - 1 file changed, 25 delet

[PATCH v3 4/5] xen/cppc: get xen-required cppc perf caps data

2025-03-11 Thread Penny Zheng
When running as Xen dom0 PVH guest, processor logical id <-> physical id map could not be properly set up. So the original function cppc_get_perf_caps() fails to get correct cppc data for Xen ACPI processor. A new function xen_processor_get_perf_caps() is introduced to get xen-required cppc perf c

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

2025-03-11 Thread Roger Pau Monne
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. Fix this by introducing a dummy local msi_msg, and

Re: [PATCH] xen/iocap.h: add documentation

2025-03-11 Thread Jan Beulich
On 11.03.2025 17:11, Grygorii Strashko wrote: > > Hi Jan, > > On 11.03.25 17:35, Jan Beulich wrote: >> On 11.03.2025 15:53, Grygorii Strashko wrote: >>> On 05.03.25 12:37, Jan Beulich wrote: On 24.02.2025 12:38, Grygorii Strashko wrote: > Change rangeset parameters to "start, last" as pr

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

2025-03-11 Thread Jason Andryuk
There isn't currently a way to determine if a domain is the hardware domain or a privilged (control) domain. Add new domain info flags to indicate these properties. This is useful for a hyperlaunch-ed xenstore domain to determine which domains are privileged. Signed-off-by: Jason Andryuk --- x

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

2025-03-11 Thread Miccio, Luca
Hi Stefano, On 3/7/2025 1:49 AM, Stefano Stabellini wrote: > On Thu, 6 Mar 2025, Stefano Stabellini wrote: >> On Fri, 28 Feb 2025, Luca Miccio wrote: >>> Currently, the uboot-script-gen does not account for reserved memory >>> regions in the device tree. This oversight can lead to scenarios where

[PATCH 11/16] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code

2025-03-11 Thread Pierrick Bouvier
This function is used by system/physmem.c will be turn into common code in next commit. Signed-off-by: Pierrick Bouvier --- include/system/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index ab17c09a551..21da3b8b052 10

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

2025-03-11 Thread Roger Pau Monne
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 Monné --- .cirrus.yml | 12 1 file changed, 12 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index e2949d99d73

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

2025-03-11 Thread Jan Beulich
On 11.03.2025 14:41, Sergiy Kibrik wrote: > 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 >>> +con

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 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 handling; undo that for the time being. In > particular t

Re: [PATCH 00/16] make system memory API available for common code

2025-03-11 Thread Pierrick Bouvier
On 3/10/25 09:28, Pierrick Bouvier wrote: Hi Zoltan, On 3/10/25 06:23, BALATON Zoltan wrote: On Sun, 9 Mar 2025, Pierrick Bouvier wrote: The main goal of this series is to be able to call any memory ld/st function from code that is *not* target dependent. Why is that needed? this series b

Re: [PATCH 2/2] tools/arm: Reject configuration with incorrect nr_spis value

2025-03-11 Thread Bertrand Marquis
Hi Michal, > On 11 Mar 2025, at 10:04, Michal Orzel wrote: > > If the calculated value for nr_spis by the toolstack is bigger than the > value provided by the user, we silently ignore the latter. This is not > consistent with the approach we have in Xen on Arm when we try to reject > incorrect c

Re: [PATCH 01/23] xen: introduce hardware domain create flag

2025-03-11 Thread Jason Andryuk
On 2025-03-07 11:26, Andrew Cooper wrote: On 07/03/2025 2:55 pm, Jason Andryuk wrote: On 2025-03-06 17:39, Andrew Cooper wrote: Second, you've created a case where we can make multiple hardware domains, yet it is very much a singleton object from Xen's point of view. hardware_domain still rem

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

2025-03-11 Thread Jan Beulich
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 active. Nevertheless a rip-relative LEA > is the more normal way of doing this in 64bit code. > > The retrieval of flags modifies the stack po

[PATCH 2/2] tools/arm: Reject configuration with incorrect nr_spis value

2025-03-11 Thread Michal Orzel
If the calculated value for nr_spis by the toolstack is bigger than the value provided by the user, we silently ignore the latter. This is not consistent with the approach we have in Xen on Arm when we try to reject incorrect configuration. Also, the documentation for nr_spis is incorrect as it men

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

2025-03-11 Thread Andrew Cooper
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 active. Nevertheless a rip-relative >>> LEA >>> is

Re: [PATCH] xen/iocap.h: add documentation

2025-03-11 Thread Grygorii Strashko
Hi Jan, On 11.03.25 17:35, Jan Beulich wrote: On 11.03.2025 15:53, Grygorii Strashko wrote: On 05.03.25 12:37, Jan Beulich wrote: On 24.02.2025 12:38, Grygorii Strashko wrote: Change rangeset parameters to "start, last" as proposed in [1], and add documentation for public interface. No fun

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

[PATCH v4 17/25] drm/renesas/rcar-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: Laurent Pinchart Cc: Kieran Bingham --- drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 7 +-- 1 file changed, 5 inserti

[PATCH v4 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-03-11 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 is currently quite a bit of code duplication among DRM's memory managers. Each calculates

[PATCH v4 08/25] drm/gma500: 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 Cc: Patrik Jakobsson --- drivers/gpu/drm/gma500/gem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a

[PATCH v1 1/4] xen/riscv: introduce preinit_xen_time()

2025-03-11 Thread Oleksii Kurochko
preinit_xen_time() does two things: 1. Parse timebase-frequency properpy of /cpus node to initialize cpu_khz variable. 2. Initialize boot_count with the current time counter value. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/include/asm/time.h

[PATCH v1 3/4] xen/riscv: implement basic aplic_preinit()

2025-03-11 Thread Oleksii Kurochko
Based on the code from [1] provided by Romain Caritey from Microchip with some minor changes(): - Xen code style fixes - Drop static variable inside aplic_preinit() and check aplic_info.node directly. - Drop direct initialization of aplic_info.hw_version in aplic_preinit() as this field is

[PATCH v1 4/4] xen/riscv: introduce intc_preinit()

2025-03-11 Thread Oleksii Kurochko
Currently, only the device tree method is available to locate and perform pre-initialization steps for the interrupt controller. When `acpi_disabled` is true, the system will scan for a node with the "interrupt-controller" property and then call `device_init()` to validate if it is an expected inte

[PATCH v1 2/4] automation: select APLIC and IMSIC to handle both wired interrupts and MSIs

2025-03-11 Thread Oleksii Kurochko
By default, the `aia` option is set to "none" which selects the SiFive PLIC for handling wired interrupts. However, since PLIC is now considered obsolete and will not be supported by Xen now, APLIC and IMSIC are selected instead to manage both wired interrupts and MSIs. Signed-off-by: Oleksii Kuro

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

2025-03-11 Thread Jan Beulich
On 11.03.2025 16:42, Roger Pau Monné wrote: > 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 an

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

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 11, 2025 at 02:10:04PM +0100, Jan Beulich wrote: > 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_de

Re: [PATCH] xen/iocap.h: add documentation

2025-03-11 Thread Grygorii Strashko
Hi Jan, On 05.03.25 12:37, Jan Beulich wrote: On 24.02.2025 12:38, Grygorii Strashko wrote: Change rangeset parameters to "start, last" as proposed in [1], and add documentation for public interface. No functional changes. [1] https://patchwork.kernel.org/comment/26251962/ Signed-off-by: Gryg

Re: [PATCH] xen/page_alloc: Simplify domain_adjust_tot_pages

2025-03-11 Thread Jan Beulich
On 11.03.2025 10:46, Alejandro Vallejo wrote: > On Wed Mar 5, 2025 at 1:39 PM GMT, Jan Beulich wrote: >>> It's all quite perverse. Fortunately, looking at adjacent claims-related >>> code >>> xl seems to default to making a claim prior to populating the physmap and >>> cancelling the claim at the

Re: [PATCH] xen/iocap.h: add documentation

2025-03-11 Thread Jan Beulich
On 11.03.2025 15:53, Grygorii Strashko wrote: > On 05.03.25 12:37, Jan Beulich wrote: >> On 24.02.2025 12:38, Grygorii Strashko wrote: >>> Change rangeset parameters to "start, last" as proposed in [1], >>> and add documentation for public interface. >>> >>> No functional changes. >>> >>> [1] https

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

2025-03-11 Thread Roger Pau Monne
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. Fix this by introducing a dummy local msi_msg, and

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

2025-03-11 Thread Roger Pau Monné
On Tue, Mar 11, 2025 at 04:45:04PM +0100, Jan Beulich wrote: > On 11.03.2025 16:42, Roger Pau Monné wrote: > > 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 +, Alejandr

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

2025-03-11 Thread Alejandro Vallejo
On Tue Mar 11, 2025 at 3:45 PM GMT, Jan Beulich wrote: > On 11.03.2025 16:42, Roger Pau Monné wrote: > > 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 Vall

[PATCH 04/16] exec/memory.h: make devend_memop target agnostic

2025-03-11 Thread Pierrick Bouvier
Will allow to make system/memory.c common later. Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 7c20f36a312..698179b26d2 100644 --- a/include/exec/memor

[PATCH 15/16] system/memory: make compilation unit common

2025-03-11 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- system/memory.c| 22 +++--- system/meson.build | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0a..b401be8b5f1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -3

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

2025-03-11 Thread Jason Andryuk
On 2025-03-10 05:32, Julien Grall wrote: Hi Jason, On 06/03/2025 22:03, Jason Andryuk wrote: With a split hardware and control domain, the control domain may still want and xenstore access.  Currently this relies on init-dom0less to seed the grants.  This is problematic since we don't want hard

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

2025-03-11 Thread Jason Andryuk
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 assisted paging */ #define _XEN_DOMINF_hap 8 #define XEN

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

2025-03-11 Thread Bertrand Marquis
Add a new command line parameter "tee=" to be used to explicitly select what tee mediator is to be used by Xen and fail if it does not exist or the probe function for it failed. Without specifying which tee is to be used, Xen will use the first one for which the probe function succeeds which depen

[PATCH 16/16] system/ioport: make compilation unit common

2025-03-11 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- system/ioport.c| 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 55c2a752396..89daae9d602 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,6 @@ */ #inc

[PATCH v3 14/15] xen/xenpm: Adapt cpu frequency monitor in xenpm

2025-03-11 Thread Penny Zheng
Make `xenpm get-cpureq-para/set-cpufreq-para` available in CPPC mode. Also, In `xenpm get-cpufreq-para `, para scaling_available_frequencies only has meaningful value when cpufreq driver in legacy P-states. So we loosen "has_num" condition to bypass scaling_available_frequencies check in CPPC mode.

[PATCH v2 3/5] xen/arm: ffa: Add buffer full notification support

2025-03-11 Thread Bertrand Marquis
Add support to raise a Rx buffer full notification to a VM. This function will be used for indirect message support between VM and is only activated if CONFIG_FFA_VM_TO_VM is selected. Even if there are 32 framework notifications possible, right now only one is defined so the implementation is sim

[PATCH 19/23] xsm/dummy: Allow sysctls to both hardware and control

2025-03-11 Thread Jason Andryuk
xl queries SYSCTL_physinfo for the physical cpus: domU:~# xl list libxl: error: libxl_utils.c:817:libxl_cpu_bitmap_alloc: failed to retrieve the maximum number of cpus libxl: error: libxl_utils.c:817:libxl_cpu_bitmap_alloc: failed to retrieve the maximum number of cpus libxl: error: libxl_utils.c

[PATCH] x86/e820: Remove opencoded vendor/feature checks

2025-03-11 Thread Andrew Cooper
We've already scanned features by the time init_e820() is called. Remove the cpuid() calls. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné Backporting. Not sure it's worth backporing, but it is safe (just) to backport past commit 365f408339d3 ("x86/boot: Load microcode

[PATCH 13/16] hw/xen: add stubs for various functions

2025-03-11 Thread Pierrick Bouvier
Those functions are used by system/physmem.c, and are called only if xen is enabled (which happens only if CONFIG_XEN is not set). So we can crash in case those are called. Signed-off-by: Pierrick Bouvier --- hw/xen/xen_stubs.c | 56 ++ hw/xen/meson.b

[PATCH] xen/public: add missing Xenstore commands to xs_wire.h

2025-03-11 Thread Juergen Gross
The GET_FEATURE, SET_FEATURE, GET_QUOTA and SET_QUOTA Xenstore commands are defined in docs/misc/xenstore.txt, but they are missing in xs_wire.h. Add the missing commands to xs_wire.h Signed-off-by: Juergen Gross --- xen/include/public/io/xs_wire.h | 4 1 file changed, 4 insertions(+) dif

Re: [PATCH] tools/libs/store: use single_with_domid() in xs_get_domain_path()

2025-03-11 Thread Andrew Cooper
On 05/03/2025 8:55 am, Juergen Gross wrote: > xs_get_domain_path() can be simplified by using single_with_domid(). > > Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper

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

2025-03-11 Thread Oleksii Kurochko
On 3/6/25 7:25 PM, 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 is not well-suited for PPC/radix where some flags

[PATCH 02/23] xen/arm: Factor out construct_hwdom()

2025-03-11 Thread Jason Andryuk
Factor out construct_hwdom() from construct_dom0(). This will be re-used by the dom0less code when building a domain with the hardware capability. iommu_hwdom_init(d) is moved into construct_hwdom() which moves it after kernel_probe(). kernel_probe() doesn't seem to depend on its setting. Signe

[PATCH v2 15/16] system/memory: make compilation unit common

2025-03-11 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- system/memory.c| 17 + system/meson.build | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0a..eddd21a6cdb 100644 --- a/system/memory.c +++ b/system/memory.c @@ -353,15

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

2025-03-11 Thread Jan Beulich
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 path. Xen's incarnation of > AML relies on having access to some

Re: [PATCH] tools/init-dom0less: Fix cpus > 1 and xenstore entries

2025-03-11 Thread Orzel, Michal
On 05/03/2025 22:58, Jason Andryuk wrote: > > > The trailing / in the path is incorrect and generates an error when > writing to xenstore: > Checking domid: 1 > Init dom0less domain: 1 > init-dom0less: writing to xenstore: No error information > > init-dom0less exits without finishing initial

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

2025-03-11 Thread Grygorii Strashko
From: Oleksii Moisieiev This feature introduces SCMI support for DomU domains with partial SCMI DT node generation. During domain creation the following prerequisites are expected: - SCMI node template in partial device-tree, which should contain all subnodes used by DomU: / { firmware {

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

2025-03-11 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac2..b729f3b25ad 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @

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

2025-03-11 Thread Jan Beulich
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 assisted paging */ > #define _XEN_DOMINF_hap 8 > #define XEN_DOMINF_hap(1U<<_XEN_DOMIN

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

2025-03-11 Thread Julien Grall
Hi, On 11/03/2025 15:05, Grygorii Strashko wrote: 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.

Re: [PATCH] tools/init-dom0less: Fix cpus > 1 and xenstore entries

2025-03-11 Thread Jason Andryuk
On 2025-03-06 05:29, Orzel, Michal wrote: On 05/03/2025 22:58, Jason Andryuk wrote: The trailing / in the path is incorrect and generates an error when writing to xenstore: Checking domid: 1 Init dom0less domain: 1 init-dom0less: writing to xenstore: No error information init-dom0less exits

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 11/03/2025 09:51, Jürgen Groß wrote: 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 b

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

2025-03-11 Thread Julien Grall
Hi, On 11/03/2025 09:58, Jürgen Groß wrote: On 11.03.25 10:43, Julien Grall wrote: 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 e

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

2025-03-11 Thread Jason Andryuk
On 2025-03-11 03:09, dm...@proton.me wrote: 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/-/issue

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

2025-03-11 Thread Jason Andryuk
On 2025-03-11 03:28, dm...@proton.me wrote: 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 With the commit title chang

[PATCH v3 02/17] exec/tswap: implement {ld,st}.*_p as functions instead of macros

2025-03-11 Thread Pierrick Bouvier
Defining functions allows to use them from common code, by not depending on TARGET_BIG_ENDIAN. Remove previous macros from exec/cpu-all.h. By moving them out of cpu-all.h, we'll be able to break dependency on cpu.h for memory related functions coming in next commits. Reviewed-by: Richard Henderson

[PATCH v3 07/17] exec/exec-all: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
Previous commit changed files relying transitively on it. 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/i

[PATCH v3 01/17] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian()

2025-03-11 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/tswap.h | 11 ++- cpu-target.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef015..2683da0adb7 100644 --- a/include/ex

[PATCH v3 04/17] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h

2025-03-11 Thread Pierrick Bouvier
They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Move stl_phys_notdirty function as well. Cached endianness agnostic version rely on st/ld*_p, which is available through tswap.h. Reviewed-by: Richard Henderson

[PATCH v3 11/17] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled

2025-03-11 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 7c011fadd11..098fccb5835 100644 --- a/include/exec/ram_addr.h +++ b/inclu

[PATCH v3 00/17] make system memory API available for common code

2025-03-11 Thread Pierrick Bouvier
The main goal of this series is to be able to call any memory ld/st function from code that is *not* target dependent. As a positive side effect, we can turn related system compilation units into common code. The first 5 patches remove dependency of memory API to cpu headers and remove dependency

[PATCH v3 08/17] exec/memory-internal: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac2..b729f

[PATCH v3 03/17] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h

2025-03-11 Thread Pierrick Bouvier
They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 12 include/exec/memory_ldst.h.inc | 4

[PATCH v3 05/17] exec/memory.h: make devend_memop "target defines" agnostic

2025-03-11 Thread Pierrick Bouvier
Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index da21e9150b5..069021

[PATCH v3 14/17] include/exec/memory: extract devend_big_endian from devend_memop

2025-03-11 Thread Pierrick Bouvier
we'll use it in system/memory.c. Reviewed-by: Richard Henderson 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 069021ac3ff..70177304a92 100644 -

[PATCH v3 06/17] codebase: prepare to remove cpu.h from exec/exec-all.h

2025-03-11 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c| 1 + page-vary-target.c | 2 +- target/riscv/bitmanip_helper.c | 2 +-

[PATCH v3 09/17] exec/ram_addr: remove dependency on cpu.h

2025-03-11 Thread Pierrick Bouvier
Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 3d8df4edf15..7c011fadd

Re: [PATCH 04/16] xen/cpu: prevent disable_nonboot_cpus crash on ARM64

2025-03-11 Thread Julien Grall
Hi Mykola, On 05/03/2025 09:11, Mykola Kvach wrote: If we call disable_nonboot_cpus on ARM64 with system_state set to SYS_STATE_suspend, the following assertion will be triggered: ``` (XEN) [ 25.582712] Disabling non-boot CPUs ... (XEN) [ 25.587032] Assertion '!in_irq() && (local_irq_is_ena

Re: [PATCH] x86/boot: Fix zap_low_mappings() to map less of the trampoline

2025-03-11 Thread Andrew Cooper
On 06/01/2025 11:54 am, Jan Beulich wrote: > On 06.01.2025 12:26, Andrew Cooper wrote: >> Regular data access into the trampoline is via the directmap. >> >> As now discussed quite extensively in asm/trampoline.h, the trampoline is >> arranged so that only the AP and S3 paths need an identity mappi

[PATCH v17 1/2] xen/arm: translate virtual PCI bus topology for guests

2025-03-11 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko There are three originators for the PCI configuration space access: 1. The domain that owns physical host bridge: MMIO handlers are there so we can update vPCI register handlers with the values written by the hardware domain, e.g. physical view of the registers vs gu

[PATCH v17 0/2] PCI devices passthrough on Arm, part 3

2025-03-11 Thread Stewart Hildebrand
This is next version of vPCI rework. Aim of this series is to prepare ground for introducing PCI support on ARM platform. in v17: - add ("xen/arm: check read handler behavior") - drop ("xen/arm: account IO handlers for emulated PCI MSI-X") as it should wait for future work - drop committed p

[PATCH v17 2/2] xen/arm: check read handler behavior

2025-03-11 Thread Stewart Hildebrand
We expect mmio read handlers to leave the bits above the access size zeroed. Add an ASSERT to check this aspect of read handler behavior. Suggested-by: Roger Pau Monné Signed-off-by: Stewart Hildebrand --- v16->v17: * new patch See https://lore.kernel.org/xen-devel/bc6660ef-59f1-4514-9792-067d

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

2025-03-11 Thread Thierry Reding
On Tue, Feb 18, 2025 at 03:23:43PM +0100, Thomas Zimmermann wrote: > 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 > --- > dr

[PATCH 03/16] include: move target_words_bigendian() from tswap to bswap

2025-03-11 Thread Pierrick Bouvier
This is needed for next commits (especially when implementing st/ld primitives which will use this function). As well, remove reference to TARGET_BIG_ENDIAN, as we are about to remove this dependency. Signed-off-by: Pierrick Bouvier --- include/exec/tswap.h | 11 --- include/qemu/bswap.h

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

2025-03-11 Thread Pierrick Bouvier
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.inc | 13 + 2 files changed, 5 inse

Re: [PATCH v8 0/9] remove libxenctrl usage from xenstored

2025-03-11 Thread Jan Beulich
On 06.03.2025 14:27, Jürgen Groß wrote: > On 06.03.25 14:13, Jan Beulich wrote: >> On 06.03.2025 00:32, Stefano Stabellini wrote: >>> On Wed, 5 Mar 2025, Juergen Gross wrote: On 25.02.25 12:10, Juergen Gross wrote: > Ping? Especially ... > > On 04.02.25 12:33, Juergen Gross wrote:

Re: [PATCH] XSM: correct xsm_get_domain_state()

2025-03-11 Thread Jürgen Groß
On 06.03.25 15:16, Jan Beulich wrote: Add the missing first parameter and move it next to a close relative. Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") Signed-off-by: Jan Beulich Acked-by: Juergen Gross With this patch you can ignore my patch just sent out, I guess. :-) J

Re: [PATCH 14/16] xen/arm: Resume memory management on Xen resume

2025-03-11 Thread Julien Grall
Hi, On 05/03/2025 09:11, Mykola Kvach wrote: From: Mirela Simonovic The MMU needs to be enabled in the resume flow before the context can be restored (we need to be able to access the context data by virtual address in order to restore it). The configuration of system registers prior to branch

<    1   2   3   >