Re: [XEN][PATCH v2 1/2] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-31 Thread Grygorii Strashko
On 31.07.25 10:42, Jan Beulich wrote: On 22.07.2025 15:46, Grygorii Strashko wrote: On 22.07.25 11:23, Jan Beulich wrote: On 18.07.2025 12:11, Grygorii Strashko wrote: From: Grygorii Strashko On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq() functions are

[XEN][PATCH 7/7] xen/dt: kernel: add assert(!domain) in kernel_probe

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko Existing users of kernel_probe() reworked to probe guest kernel before creating domain and any new users must follow the same approach, so add assert to check that domain was not created before calling kernel_probe(). Signed-off-by: Grygorii Strashko --- xen/common

[XEN][PATCH 4/7] xen/arm: probe kernel before creating dom0

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko As was indicated in [1][2], performing guest kernel probe after creating domain is not robust. Hence, rework Arm dom0 creation sequence to probe guest kernel first, before creating domain, so guest type (32/64bit) can be properly identified and dom0 type configured

[XEN][PATCH 0/7] xen/arm: rework to probe kernel before creating domains during xen boot

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko This series follows discussion [1][2] which pointed to "historical" issue present in Xen and related to creating domains on 64bit Arches which allows running both 64/32bit guests (like Arm AArch64): Now, during Xen boot or by toolstack, the domain is alwa

[XEN][PATCH 3/7] xen/fdt: kernel: add generic is_32bit_type flag to struct kernel_info

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko It is possible to have 32/64bit guests not only on Arm64 arch, so add generic is_32bit_type flag to the struct kernel_info instead of Arm64 specific enum domain_type type. Signed-off-by: Grygorii Strashko --- xen/arch/arm/dom0less-build.c | 2 +- xen/arch/arm

[XEN][PATCH 5/7] dom0less: Parse memory properties in the common bindings

2025-07-31 Thread Grygorii Strashko
From: Alejandro Vallejo Move the "memory" binding from dom0less-build to dom0less-bindings. Signed-off-by: Alejandro Vallejo Signed-off-by: Grygorii Strashko --- xen/common/device-tree/dom0less-bindings.c | 3 +++ xen/common/device-tree/dom0less-build.c| 8 +--- xen/i

[XEN][PATCH 2/7] xen/domctl: introduce XEN_DOMCTL_CDF_is_32bits

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko This patch follows discussion [1][2] which is pointed to "historical" issue present in Xen and related to creating domains sequence on 64bit Arches which allows running both 64/32bit guests (like AArch64): Now, during Xen boot or by toolstack, the domain

[XEN][PATCH 6/7] dom0less: probe kernel before creating domains

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko As was indicated in [1][2], performing guest kernel probe after creating domain is not robust. Hence, rework dom0less domain creation sequence to probe guest kernels first, before creating domains, so guest type (32/64bit) can be properly identified and domain type

[XEN][PATCH 1/7] xen/arm64: domctl: set_address_size add check for vcpus not initialized

2025-07-31 Thread Grygorii Strashko
From: Grygorii Strashko The vcpu ctx initialization (arch_set_info_guest()) is depends on proper domain type (32/64bit) configuration, so check that vcpus are not initialized when toolstack issues XEN_DOMCTL_set_address_size hypercall. Signed-off-by: Grygorii Strashko --- xen/arch/arm/arm64

Re: [XEN][PATCH v2 1/2] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-31 Thread Grygorii Strashko
Hi Juergen, Dario, George, Sorry that disturbing you. Would it be possible to take a look at this patch as it has change in common/sched/core.c? On 18.07.25 13:11, Grygorii Strashko wrote: From: Grygorii Strashko On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq

Re: [XEN][PATCH 0/8] xen/arm64: make aarch32 support optional

2025-07-24 Thread Grygorii Strashko
Hi All, On 23.07.25 15:12, Grygorii Strashko wrote: On 23.07.25 15:02, Julien Grall wrote: Hi, On 23/07/2025 12:48, Grygorii Strashko wrote: On 23.07.25 13:54, Orzel, Michal wrote: On 23/07/2025 10:06, Julien Grall wrote: On 23/07/2025 08:58, Grygorii Strashko wrote: From

Re: [XEN][PATCH 2/8] xen/arm: move vcpu_switch_to_aarch64_mode() in arch_vcpu_create()

2025-07-24 Thread Grygorii Strashko
Hi Julien, Andrew Cooper Thanks for your comment. On 23.07.25 14:09, Julien Grall wrote: Hi, On 23/07/2025 11:19, Grygorii Strashko wrote: On 23.07.25 12:16, Julien Grall wrote: On 23/07/2025 08:58, Grygorii Strashko wrote: From: Grygorii Strashko Move vcpu_switch_to_aarch64_mode() in

Re: [XEN][PATCH 0/8] xen/arm64: make aarch32 support optional

2025-07-23 Thread Grygorii Strashko
On 23.07.25 15:02, Julien Grall wrote: Hi, On 23/07/2025 12:48, Grygorii Strashko wrote: On 23.07.25 13:54, Orzel, Michal wrote: On 23/07/2025 10:06, Julien Grall wrote: On 23/07/2025 08:58, Grygorii Strashko wrote: From: Grygorii Strashko Hi, Hi Grygorii, Now Arm64 AArch32

Re: [XEN][PATCH 0/8] xen/arm64: make aarch32 support optional

2025-07-23 Thread Grygorii Strashko
On 23.07.25 13:54, Orzel, Michal wrote: On 23/07/2025 10:06, Julien Grall wrote: On 23/07/2025 08:58, Grygorii Strashko wrote: From: Grygorii Strashko Hi, Hi Grygorii, Now Arm64 AArch32 guest support is always enabled and built-in while not all Arm64 platforms supports AArch32 or

Re: [XEN][PATCH 3/8] xen/arm: move vcpu_switch_to_aarch64_mode() in arm64

2025-07-23 Thread Grygorii Strashko
On 23.07.25 12:22, Julien Grall wrote: Hi, On 23/07/2025 08:58, Grygorii Strashko wrote: From: Grygorii Strashko The vcpu_switch_to_aarch64_mode() is Arm64 specific, so move it in Arm64. As part of this change: - introduce arm32/arm64 domain.h headers and include them in asm/domain.h

Re: [XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-23 Thread Grygorii Strashko
On 18.07.25 17:18, Jan Beulich wrote: On 18.07.2025 13:47, Grygorii Strashko wrote: On 18.07.25 13:22, Jan Beulich wrote: On 18.07.2025 12:11, Grygorii Strashko wrote: From: Grygorii Strashko Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch callbacks

Re: [XEN][PATCH 2/8] xen/arm: move vcpu_switch_to_aarch64_mode() in arch_vcpu_create()

2025-07-23 Thread Grygorii Strashko
On 23.07.25 12:16, Julien Grall wrote: Hi, On 23/07/2025 08:58, Grygorii Strashko wrote: From: Grygorii Strashko Move vcpu_switch_to_aarch64_mode() in arch_vcpu_create() callback instead of calling it manually from few different places after vcpu_create(). Before doing above ensure vcpu0

[XEN][PATCH 8/8] xen/arm64: constify regs_mode_is_32bit macro for CONFIG_ARM64_AARCH32=n

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Constify regs_mode_is_32bit() macro for the case CONFIG_ARM64_AARCH32=n and so allow compiler to opt out Aarch32 specific code. (CONFIG_ARM64_AARCH32=y) Before: 855232 322404 270880 1448516 161a44 xen-syms (CONFIG_ARM64_AARCH32=n, CONFIG_EXPERT=y) After: 849548

[XEN][PATCH 0/8] xen/arm64: make aarch32 support optional

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Hi, Now Arm64 AArch32 guest support is always enabled and built-in while not all Arm64 platforms supports AArch32 or this support might not be needed. Hence, this series introduces basic support for disabling Arm64 AArch32 guest support by introducing Kconfig option

[XEN][PATCH 3/8] xen/arm: move vcpu_switch_to_aarch64_mode() in arm64

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko The vcpu_switch_to_aarch64_mode() is Arm64 specific, so move it in Arm64. As part of this change: - introduce arm32/arm64 domain.h headers and include them in asm/domain.h basing on CONFIG_ARM_xx; - declare vcpu_switch_to_aarch64_mode() for arm64; - add

[XEN][PATCH 6/8] xen/arm64: constify is_32/64bit_domain() macro for CONFIG_ARM64_AARCH32=n

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Constify is_32/64bit_domain() macro for the case CONFIG_ARM64_AARCH32=n and so allow compiler to opt out Aarch32 specific code. (CONFIG_ARM64_AARCH32=y) Before: textdata bss dec hex filename 855232 322404 270880 1448516 161a44 xen-syms

[XEN][PATCH 7/8] xen/arm: regs.h split subarch definitions between arm64/arm32

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Split subarch definitions between arm64/arm32: hyp_mode() regs_mode_is_user() regs_mode_is_32bit() Signed-off-by: Grygorii Strashko --- xen/arch/arm/include/asm/arm32/processor.h | 5 + xen/arch/arm/include/asm/arm64/processor.h | 15 ++ xen/arch/arm

[XEN][PATCH 5/8] xen/arm64: make aarch32 support optional

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Now Arm64 AArch32 guest support is always enabled and built-in while not all Arm64 platforms supports AArch32 or this support might not be needed. Hence, this patch introduces basic support for disabling Arm64 AArch32 guest support. The following changes are introduced

[XEN][PATCH 4/8] xen/arm: split is_32bit/64bit_domain() between arm64/arm32

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Split is_32bit/64bit_domain() macro implementations between arm64/arm32. Signed-off-by: Grygorii Strashko --- xen/arch/arm/include/asm/arm32/domain.h | 5 + xen/arch/arm/include/asm/arm64/domain.h | 14 ++ xen/arch/arm/include/asm/domain.h | 8

[XEN][PATCH 2/8] xen/arm: move vcpu_switch_to_aarch64_mode() in arch_vcpu_create()

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Move vcpu_switch_to_aarch64_mode() in arch_vcpu_create() callback instead of calling it manually from few different places after vcpu_create(). Before doing above ensure vcpu0 is created after kernel_probe() is done and domain's guest execution mode (32-bit/64-bi

[XEN][PATCH 1/8] xen/arm: split set_domain_type() between arm64/arm32

2025-07-23 Thread Grygorii Strashko
From: Grygorii Strashko Split set_domain_type() between Arm64/Arm32 sub-arches as set_domain_type() implementation is going to be extended for Arm64. Signed-off-by: Grygorii Strashko --- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm32/domain-build.c| 22

Re: [XEN][PATCH v2 1/2] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-22 Thread Grygorii Strashko
On 22.07.25 11:23, Jan Beulich wrote: On 18.07.2025 12:11, Grygorii Strashko wrote: From: Grygorii Strashko On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq() functions are unreachable (Misra rule 2.1). Move these function under CONFIG_HAS_PIRQ ifdefs to fix Misra

Re: [XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Grygorii Strashko
On 18.07.25 13:22, Jan Beulich wrote: On 18.07.2025 12:11, Grygorii Strashko wrote: From: Grygorii Strashko Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch callbacks become unreachable, so drop them. Signed-off-by: Grygorii Strashko --- xen/arch/arm

Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages

2025-07-18 Thread Grygorii Strashko
On 17.07.25 16:03, Jan Beulich wrote: On 17.07.2025 14:58, Grygorii Strashko wrote: On 23.06.25 21:28, dm...@proton.me wrote: --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2080,17 +2080,17 @@ void __init create_dom0(void) dom0 = domain_create(domid

[XEN][PATCH] xen/arm: remove unused dump_p2m_lookup()

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko The dump_p2m_lookup() is not used, so remove it. Signed-off-by: Grygorii Strashko --- xen/arch/arm/include/asm/page.h | 2 -- xen/arch/arm/mmu/p2m.c | 13 - 2 files changed, 15 deletions(-) diff --git a/xen/arch/arm/include/asm/page.h b/xen/arch

[XEN][PATCH v2 1/2] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko On platforms without PIRQ support evtchn_move_pirqs()/send_guest_pirq() functions are unreachable (Misra rule 2.1). Move these function under CONFIG_HAS_PIRQ ifdefs to fix Misra rule 2.1 violation and resolve call of evtchn_move_pirqs() from common /sched/core.c

[XEN][PATCH 2/2] xen/arm: irq: drop unreachable pirq callbacks

2025-07-18 Thread Grygorii Strashko
From: Grygorii Strashko Hence all common PIRQ code is under CONFIG_HAS_PIRQ idefs corresponding Arm arch callbacks become unreachable, so drop them. Signed-off-by: Grygorii Strashko --- xen/arch/arm/irq.c | 29 - 1 file changed, 29 deletions(-) diff --git a/xen

Re: [XEN][PATCH] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-17 Thread Grygorii Strashko
On 17.07.25 18:33, Jan Beulich wrote: On 17.07.2025 16:41, Grygorii Strashko wrote: On 17.07.25 16:10, Jan Beulich wrote: On 17.07.2025 15:01, Grygorii Strashko wrote: --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain

Re: [XEN][PATCH] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-17 Thread Grygorii Strashko
On 17.07.25 16:10, Jan Beulich wrote: On 17.07.2025 15:01, Grygorii Strashko wrote: --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -975,6 +975,9 @@ void send_guest_pirq(struct domain *d, const struct pirq *pirq) int port; struct evtchn *chn; +if

[XEN][PATCH] xen/evtchn: enable build optimization for evtchn_move_pirqs()/send_guest_pirq()

2025-07-17 Thread Grygorii Strashko
From: Grygorii Strashko Enable build time optimization for evtchn_move_pirqs()/send_guest_pirq() on platforms without PIRQ support by adding compile time check for !IS_ENABLED(CONFIG_HAS_PIRQ) at the beginning of functions. This will shrink them to (on Arm64 with -O1): 264c

Re: [PATCH v10 2/3] xen/domain: update create_dom0() messages

2025-07-17 Thread Grygorii Strashko
On 23.06.25 21:28, dm...@proton.me wrote: From: Denis Mukhin Use %pd for domain identification in error/panic messages in create_dom0(). No functional change. Signed-off-by: Denis Mukhin --- Changes since v9: - new patch --- xen/arch/arm/domain_build.c | 8 xen/arch/x86/setup.

Re: [RFC PATCH v4 5/8] xen/domctl: extend XEN_DOMCTL_assign_device to handle not only iommu

2025-06-12 Thread Grygorii Strashko
On 12.06.25 14:42, Oleksii Moisieiev wrote: Hi Stefano, I'm very sorry for a long silence. Please see my answers below: On 22/05/2025 03:25, Stefano Stabellini wrote: On Mon, 19 May 2025, Oleksii Moisieiev wrote: From: Grygorii Strashko Add chained handling of assigned DT devic

Re: [RFC PATCH v4 6/8] xen/arm: scmi: introduce SCI SCMI SMC multi-agent driver

2025-06-12 Thread Grygorii Strashko
rty shell be used: dtdev = [ "/soc/i2c@e6508000", ] xl.cfg:dtdev will contain all nodes which are under SCMI management (not only those which are behind IOMMU). [1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/firm

Re: [ImageBuilder v2] uboot-script-gen: add xen xsm policy loading support

2025-04-17 Thread Grygorii Strashko
On 17.04.25 01:03, Stefano Stabellini wrote: On Tue, 15 Apr 2025, Grygorii Strashko wrote: From: Grygorii Strashko This patch adds Xen XSM policy loading support. The configuration file XEN_POLICY specifies Xen hypervisor XSM policy binary to load. Signed-off-by: Grygorii Strashko

[ImageBuilder v2] uboot-script-gen: fix arm64 xen u-boot image generation

2025-04-16 Thread Grygorii Strashko
From: Grygorii Strashko The current code in generate_uboot_images() does not detect arm64 properly and always generates ARM u-boot image, because below command file -L $XEN returns string which may contain "Aarch64" or "ARM64", and, in the later case, the current code will

Re: [ImageBuilder] uboot-script-gen: fix arm64 xen u-boot image generation

2025-04-16 Thread Grygorii Strashko
On 16.04.25 17:26, Alejandro Vallejo wrote: On Wed Apr 16, 2025 at 11:44 AM BST, Grygorii Strashko wrote: On 16.04.25 04:03, Stefano Stabellini wrote: On Mon, 14 Apr 2025, Grygorii Strashko wrote: From: Grygorii Strashko The current code in generate_uboot_images() does not detect arm64

Re: [ImageBuilder] uboot-script-gen: fix arm64 xen u-boot image generation

2025-04-16 Thread Grygorii Strashko
On 16.04.25 04:03, Stefano Stabellini wrote: On Mon, 14 Apr 2025, Grygorii Strashko wrote: From: Grygorii Strashko The current code in generate_uboot_images() does not detect arm64 properly and always generates ARM u-boot image. This causes Xen boot issues. Fix it by searching for "

[ImageBuilder v2] uboot-script-gen: add xen xsm policy loading support

2025-04-15 Thread Grygorii Strashko
From: Grygorii Strashko This patch adds Xen XSM policy loading support. The configuration file XEN_POLICY specifies Xen hypervisor XSM policy binary to load. Signed-off-by: Grygorii Strashko --- changes in v2: - fix conditional statements for XEN_POLICY - add XSM policy binary check

Re: [ImageBuilder] uboot-script-gen: add xen xsm policy loading support

2025-04-14 Thread Grygorii Strashko
ell. On Mon Apr 14, 2025 at 9:14 AM BST, Grygorii Strashko wrote: From: Grygorii Strashko This patch adds Xen XSM policy loading support. The configuration file XEN_POLICY specifies Xen hypervisor XSM policy binary to load. Signed-off-by: Grygorii Strashko --- README.md| 2

[ImageBuilder] uboot-script-gen: add xen xsm policy loading support

2025-04-14 Thread Grygorii Strashko
From: Grygorii Strashko This patch adds Xen XSM policy loading support. The configuration file XEN_POLICY specifies Xen hypervisor XSM policy binary to load. Signed-off-by: Grygorii Strashko --- README.md| 2 ++ scripts/uboot-script-gen | 33

[ImageBuilder] uboot-script-gen: fix arm64 xen u-boot image generation

2025-04-14 Thread Grygorii Strashko
From: Grygorii Strashko The current code in generate_uboot_images() does not detect arm64 properly and always generates ARM u-boot image. This causes Xen boot issues. Fix it by searching for "ARM64" for AArch64 binary detection. - mkimage -l xen.ub Before: Image Type: ARM Linux Ke

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

2025-03-30 Thread Grygorii Strashko
Hi All, Jan, Anthony, Stefano, On 11.03.25 13:16, Grygorii Strashko wrote: 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

Re: [RFC PATCH v3 3/7] xen/arm: scmi-smc: passthrough SCMI SMC to guest domain

2025-03-24 Thread Grygorii Strashko
On 14.03.25 01:48, Stefano Stabellini wrote: On Tue, 11 Mar 2025, Grygorii Strashko wrote: The commit 3e322bef8bc0 ("xen/arm: firmware: Add SCMI over SMC calls handling layer") introduces simple driver which forwards SCMI over SMC calls from hwdom/dom0 to EL3 firmware (TF-A) wit

Re: [RFC PATCH v3 3/7] xen/arm: scmi-smc: passthrough SCMI SMC to guest domain

2025-03-24 Thread Grygorii Strashko
Hi Anthony, Thanks a lot for your comments. On 14.03.25 18:23, Anthony PERARD wrote: On Tue, Mar 11, 2025 at 01:16:14PM +0200, Grygorii Strashko wrote: diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index 8e1422104e50..7edf272386e3 100644 --- a/docs/man/xl.cfg.5.pod.in +++ b

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

2025-03-24 Thread Grygorii Strashko
On 24.03.25 16:36, Jan Beulich wrote: On 24.03.2025 15:25, Grygorii Strashko wrote: On 11.03.25 13:43, Jan Beulich wrote:> On 11.03.2025 12:16, Grygorii Strashko wrote: @@ -851,6 +852,18 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) c

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

2025-03-24 Thread Grygorii Strashko
Hi Stefano, On 14.03.25 01:48, Stefano Stabellini wrote: On Tue, 11 Mar 2025, Grygorii Strashko wrote: 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

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

2025-03-24 Thread Grygorii Strashko
Hi Stefano, Thanks for your comments. On 14.03.25 01:48, Stefano Stabellini wrote: On Tue, 11 Mar 2025, Grygorii Strashko wrote: 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

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

2025-03-24 Thread Grygorii Strashko
Hi Jan, Thank you for your comments. On 11.03.25 13:43, Jan Beulich wrote:> 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: Olek

Re: [PATCH 06/16] xen/arm: Introduce system suspend config option

2025-03-21 Thread Grygorii Strashko
On 21.03.25 11:48, Mykola Kvach wrote: Hi, On Wed, Mar 12, 2025 at 12:29 AM Julien Grall wrote: Hi, On 05/03/2025 09:11, Mykola Kvach wrote: From: Mykola Kvach This option enables the system suspend support. This is the mechanism that allows the system to be suspended to RAM and later

Re: [PATCH 11/16] xen/arm: Implement PSCI system suspend

2025-03-21 Thread Grygorii Strashko
Hi Mykola, On 05.03.25 11:11, Mykola Kvach wrote: From: Mirela Simonovic The implementation consists of: -Adding PSCI system suspend call as new PSCI function -Trapping PSCI system_suspend HVC -Implementing PSCI system suspend call (virtual interface that allows guests to suspend themselves)

Re: [PATCH 08/16] xen/arm: add watchdog domain suspend/resume helpers

2025-03-20 Thread Grygorii Strashko
On 05.03.25 11:11, Mykola Kvach wrote: From: Mykola Kvach This patch implements suspend/resume helpers for the watchdog. While a domain is suspended its watchdogs must be paused. Otherwise, if the domain stays in the suspend state for a longer period of time compared to the watchdog period,

Re: [PATCH 07/16] xen/char: implement suspend/resume calls for SCIF driver

2025-03-19 Thread Grygorii Strashko
On 05.03.25 11:11, Mykola Kvach wrote: From: Mykola Kvach The changes have been tested only on the Renesas R-Car-H3 Starter Kit board. Signed-off-by: Volodymyr Babchuk Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Mykola Kvach --- xen/drivers/char/scif-uart.c | 31 +

Re: [PATCH 06/16] xen/arm: Introduce system suspend config option

2025-03-19 Thread Grygorii Strashko
On 13.03.25 17:37, Jan Beulich wrote: On 05.03.2025 10:11, Mykola Kvach wrote: --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -475,6 +475,17 @@ config ARM64_HARDEN_BRANCH_PREDICTOR config ARM32_HARDEN_BRANCH_PREDICTOR def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR +confi

Re: [PATCH 03/16] xen/arm: introduce a separate struct for watchdog timers

2025-03-19 Thread Grygorii Strashko
On 05.03.25 11:11, Mykola Kvach wrote: From: Mirela Simonovic Introduce a separate struct for watchdog timers. It is needed to properly implement the suspend/resume actions for the watchdog timers. To be able to restart watchdog timer after suspend we need to remember their frequency somewhe

[ImageBuilder][PATCH] uboot-script-gen: add debug option to print final dt "chosen" node

2025-03-17 Thread Grygorii Strashko
ned-off-by: Grygorii Strashko --- README.md| 8 scripts/uboot-script-gen | 5 + 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 4ba430ce74c5..5b75018ea956 100644 --- a/README.md +++ b/README.md @@ -396,3 +396,11 @@ disk\_image supp

[RFC PATCH v3 3/7] xen/arm: scmi-smc: passthrough SCMI SMC to guest domain

2025-03-15 Thread Grygorii Strashko
he SCMI SMC single agent interface can be enabled for one and only one domain. In general, the configuration is similar to any other HW passthrough, except explicitly enabling SCMI with "arm_sci" xl.cfg option. Note that SCMI and "arm,scmi-shmem" nodes will be removed

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

2025-03-12 Thread Grygorii Strashko
On 11.03.25 12:24, Mykyta Poturai wrote: 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 do

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

2025-03-12 Thread Grygorii Strashko
On 11.03.25 12:24, Mykyta Poturai wrote: 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

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

2025-03-11 Thread Grygorii Strashko
e taken from partial DT. - maps the SCMI shmem into DomU GUEST_SCI_SHMEM_BASE address. Signed-off-by: Oleksii Moisieiev Signed-off-by: Grygorii Strashko --- tools/include/xenctrl.h | 3 + tools/libs/ctrl/xc_domain.c | 18 ++ tools/libs/light/libxl_arm.c

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 inte

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] 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/ Sig

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

2025-03-11 Thread Grygorii Strashko
ess is not fully supported yet - move memcpy_fro/tomio in separate patch [1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/firmware/arm,scmi.yaml [2] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/de

[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

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

2025-03-11 Thread Grygorii Strashko
() - sci_relinquish_resources() called from domain_relinquish_resources() - sci_domain_destroy() called from arch_domain_destroy() - sci_handle_call() called from vsmccc_handle_call() - sci_dt_handle_node() sci_dt_finalize() called from handle_node() (Dom0 DT) Signed-off-by: Oleksii Moisieiev Signed-off-by: Grygorii

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

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

2025-03-11 Thread Grygorii Strashko
dev/ Renesas v4h: https://github.com/GrygiriiS/arm-trusted-firmware/commits/rcar_gen4_v2.7_v4x-scmi_upd/ base-commit: c3f5d1bb40b5 ("automation/cirrus-ci: introduce FreeBSD randconfig builds") Grygorii Strashko (2): xen/arm: scmi-smc: update to be used under sci subsystem xen/arm:

[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

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

2025-03-11 Thread Grygorii Strashko
DT device; - convert to SCI Xen interface. Signed-off-by: Grygorii Strashko --- xen/arch/arm/firmware/Kconfig| 13 ++- xen/arch/arm/firmware/scmi-smc.c | 93 +++- xen/arch/arm/include/asm/firmware/scmi-smc.h | 41 - xen/arch/

[PATCH] xen/iocap.h: add documentation

2025-02-24 Thread Grygorii Strashko
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: Grygorii Strashko --- xen/include/xen/iocap.h | 134 +

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

2025-02-18 Thread Grygorii Strashko
the domain iomem_caps rangeset, but will add [e6140:e6142] (num_pages=3) instead. To fix it, drop PAGE_ALIGN() from the iomem range end address calculation formula. Fixes: 33233c2758345 ("arch/arm: domain build: let dom0 access I/O memory of mapped devices") Signed-off-by: Grygori

[PATCH v2 2/2] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

2025-02-18 Thread Grygorii Strashko
struct map_range_data to add rangeset.") Signed-off-by: Grygorii Strashko --- xen/arch/arm/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index 97e613e06afa..5e1c1cc326ac 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/a

[PATCH v2 0/2] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

2025-02-18 Thread Grygorii Strashko
-c, e6020, ... Changes in v2: - split on two patches - add "fixes" tags - rewording of commit messages v1: https://patchew.org/Xen/20250214125505.2862809-1-grygorii._5fstras...@epam.com/ Grygorii Strashko (2): xen/arm: fix iomem permissions cfg in map_rang

Re: [PATCH 0/2] code style exercise: Drivers folder samples

2025-02-18 Thread Grygorii Strashko
On 16.02.25 12:21, Oleksandr Andrushchenko wrote: Hello, everybody! As agreed before [1] I am sending a series to show two samples of the formatting done with clang-format. The clang-format configuration can be found at [2]. It already has some notes on previous discussions when Luca presente

Re: [PATCH] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

2025-02-18 Thread Grygorii Strashko
Hi Andrew, Julien, On 14.02.25 16:25, Andrew Cooper wrote: On 14/02/2025 2:10 pm, Grygorii Strashko wrote: For example, requested range:    00e614 - 00e6141004 should set e6140:e6141 nr=2, but will configure e6140 e6142 nr=3 instead. I am not sure what 'nr' is referri

Re: [PATCH] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

2025-02-14 Thread Grygorii Strashko
On 14.02.25 15:15, Julien Grall wrote: Hi, On 14/02/2025 12:55, 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))); and res = rangeset_add_range(mr_data

[PATCH] xen/arm: fix iomem_ranges cfg in map_range_to_domain()

2025-02-14 Thread Grygorii Strashko
ill configure e6140 e6142 nr=3 instead. Note. paddr_to_pfn_aligned() has PAGE_ALIGN() inside. Fix it, by using paddr_to_pfn(addr + len - 1) in both places to get correct end address of the iomem_range. Signed-off-by: Grygorii Strashko --- Hi All, I have a question - the paddr_to_pfn_aligned() is

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

2025-02-13 Thread Grygorii Strashko
Hi Stefano, On 13.02.25 00:11, Stefano Stabellini wrote: On Wed, 12 Feb 2025, Grygorii Strashko wrote: The Arm Xen allocates memory to place Dom0 following the logic described in allocate_memory_11() function which is a bit complicated with major requirement to place Dom0 within the first

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

2025-02-12 Thread Grygorii Strashko
ty to place Dom0 at fixed physical base address, by checking if "chosen" node contains property "xen,static-mem" and placs Dom0 exactly at the specified memory chunk. The implementation follows the same approach as for the static, direct-mapped guest domain in case of dom0less boot.

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

2025-02-12 Thread Grygorii Strashko
last cacheline: 4 bytes */ Signed-off-by: Michal Orzel Signed-off-by: Grygorii Strashko --- This patch follows discussion in [1] [1] https://patchwork.kernel.org/comment/26239672/ xen/include/xen/device_tree.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/

Re: Coding Style Review and Automation

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

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

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

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

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

[PATCH] device-tree: optimize dt_device_for_passthrough()

2025-02-11 Thread Grygorii Strashko
evice_node as passthrough while unflattening DT. This patch introduced new struct dt_device_node property "is_passthrough" which is filled if "xen,passthrough" property is present while unflattening DT and dt_device_for_passthrough() just return it's value. Signed-off-by:

Re: [PATCH v2 3/8] xen/arm: Add SCMI over SMC calls handling layer

2024-12-10 Thread Grygorii Strashko
On 09.12.24 19:37, Andrei Cherechesu wrote: Hi Julien, Grygorii, On 11/11/2024 12:33, Julien Grall wrote: Hi, On 01/11/2024 15:22, Grygorii Strashko wrote: Hi I'd be apprcieated if could consider my comments below. On 30.09.24 14:47, Andrei Cherechesu (OSS) wrote: From: A

Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions

2024-11-14 Thread Grygorii Strashko
On 14.11.24 15:09, Julien Grall wrote: On 14/11/2024 12:22, Michal Orzel wrote: On 14/11/2024 13:04, Julien Grall wrote: Hi Michal, On 14/11/2024 11:48, Michal Orzel wrote: On 14/11/2024 11:31, Julien Grall wrote: Looking at the code, I think /memreserve/ and /reserved-memory are

Re: [PATCH v2] xen/device-tree: Allow region overlapping with /memreserve/ ranges

2024-11-14 Thread Grygorii Strashko
eserve map regions to bootinfo.reserved_mem") Reported-by: Shawn Anastasio Reported-by: Grygorii Strashko Signed-off-by: Luca Fancellu --- Changes from v1: - fixed commit message - used boolean to allow /memreserve/ overlap or not - now 'struct membanks *' have a type, while

Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions

2024-11-13 Thread Grygorii Strashko
Hi All, On 07.11.24 11:42, Grygorii Strashko wrote: On 06.11.24 17:16, Luca Fancellu wrote: Hi Michal, So we have 2 separate issues. I don't particularly like the concept of introducing MEMBANK_NONE and the changes below look a bit too much for me, given that for boot modules w

Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions

2024-11-07 Thread Grygorii Strashko
On 06.11.24 17:16, Luca Fancellu wrote: Hi Michal, So we have 2 separate issues. I don't particularly like the concept of introducing MEMBANK_NONE and the changes below look a bit too much for me, given that for boot modules we can only have /memreserve/ matching initrd. Shawn patch fixes

Re: [PATCH] xen/device-tree: Allow exact match for overlapping regions

2024-11-06 Thread Grygorii Strashko
allowing reserved-memory node ranges and boot modules to have an exact match with ranges from /memreserve/. While there, set a type for the memory recorded during ACPI boot. Fixes: 53dc37829c31 ("xen/arm: Add DT reserve map regions to bootinfo.reserved_mem") Reported-by: Shawn Anastasio Re

Re: [PATCH v5 1/3] xen/device-tree: Let DT reserve map entries overlap reserved-memory

2024-11-05 Thread Grygorii Strashko
On 05.11.24 12:42, Michal Orzel wrote: On 04/11/2024 13:39, Grygorii Strashko wrote: Hi All, On 04.11.24 12:49, Michal Orzel wrote: On 27/09/2024 00:24, Shawn Anastasio wrote: Commit 53dc37829c31 ("xen/arm: Add DT reserve map regions to bootinfo.reserved_mem") chang

Re: [PATCH v5 1/3] xen/device-tree: Let DT reserve map entries overlap reserved-memory

2024-11-04 Thread Grygorii Strashko
On 04.11.24 14:39, Grygorii Strashko wrote: Hi All, On 04.11.24 12:49, Michal Orzel wrote: On 27/09/2024 00:24, Shawn Anastasio wrote: Commit 53dc37829c31 ("xen/arm: Add DT reserve map regions to bootinfo.reserved_mem") changes the way reserve map regions are tracked, and a

Re: [PATCH v5 1/3] xen/device-tree: Let DT reserve map entries overlap reserved-memory

2024-11-04 Thread Grygorii Strashko
Hi All, On 04.11.24 12:49, Michal Orzel wrote: On 27/09/2024 00:24, Shawn Anastasio wrote: Commit 53dc37829c31 ("xen/arm: Add DT reserve map regions to bootinfo.reserved_mem") changes the way reserve map regions are tracked, and as a result broke bootfdt's ability to handle device trees in

Re: [PATCH v2 3/8] xen/arm: Add SCMI over SMC calls handling layer

2024-11-01 Thread Grygorii Strashko
Hi I'd be apprcieated if could consider my comments below. On 30.09.24 14:47, Andrei Cherechesu (OSS) wrote: From: Andrei Cherechesu Introduce the SCMI layer to have some basic degree of awareness about SMC calls that are based on the ARM System Control and Management Interface (SCMI) specifi

Re: [Xen-devel] [PATCH net-next 00/22] net: fix return type of ndo_start_xmit function

2018-09-20 Thread Grygorii Strashko
On 09/20/2018 07:32 AM, YueHaibing wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to netdev_tx_t. > May

  1   2   >