Re: [PATCH v2 1/2] xen/riscv: initialize bootinfo from dtb

2024-10-15 Thread oleksii . kurochko
On Tue, 2024-10-15 at 08:33 +0200, Jan Beulich wrote: > On 10.10.2024 17:30, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/setup.c > > +++ b/xen/arch/riscv/setup.c > > @@ -50,6 +50,8 @@ void __init noreturn start_xen(unsigned long > > bootcpu_id, > >    

Re: [PATCH v2 1/3] xen/riscv: implement virt_to_maddr()

2024-10-08 Thread oleksii . kurochko
On Fri, 2024-10-04 at 18:04 +0200, Oleksii Kurochko wrote: > Implement the virt_to_maddr() function to convert virtual addresses > to machine addresses, including checks for address ranges such as > the direct mapping area (DIRECTMAP_VIRT_START) and the Xen virtual > address space.

Re: [PATCH v5 1/6] xen: introduce DECL_SECTION_WITH_LADDR

2024-10-08 Thread oleksii . kurochko
Hello Shawn, On Fri, 2024-09-27 at 18:32 +0200, Oleksii Kurochko wrote: > Introduce DECL_SECTION_WITH_LADDR in order to signal whether > DECL_SECTION() should specify a load address or not. > > Update {ppc,x86}/xen.lds.S to use DECL_SECTION_WITH_LADDR. > > Signed-off-by

Re: [PATCH v5 0/6] Move {acpi_}device_init() and device_get_class() to common code

2024-10-08 Thread oleksii . kurochko
On Tue, 2024-10-08 at 17:30 +0200, Jan Beulich wrote: > On 08.10.2024 17:25, oleksii.kuroc...@gmail.com wrote: > > Except the comments ( which Jan wrote could be adjusted while > > committing ) for patch 1 everything is properly Acked/Reviewed ( if > > I > > am not missing something ). > > I didn'

[PATCH] MAINTAINERS: Add myself as a reviewer for RISC-V

2024-10-08 Thread Oleksii Kurochko
As an active contributor to Xen's RISC-V port, so add myself to the list of reviewers. Signed-off-by: Oleksii Kurochko --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index fb0ebf0939..6b0b5654d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -

Re: [PATCH v2 1/3] xen/riscv: implement virt_to_maddr()

2024-10-09 Thread oleksii . kurochko
On Tue, 2024-10-08 at 12:34 +0200, Jan Beulich wrote: > On 08.10.2024 12:26, oleksii.kuroc...@gmail.com wrote: > > On Fri, 2024-10-04 at 18:04 +0200, Oleksii Kurochko wrote: > > > @@ -28,7 +29,21 @@ static inline void *maddr_to_virt(paddr_t ma) >

[PATCH v3 0/3] Register Xen's load address as a boot module

2024-10-09 Thread Oleksii Kurochko
ing" patch series as it was merged to staging ) - Other changes please look at the specific patch. --- Oleksii Kurochko (3): xen/riscv: implement virt_to_maddr() xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr() xen/riscv: register Xen's load address as a boot module xen/a

[PATCH v3 1/3] xen/riscv: implement virt_to_maddr()

2024-10-09 Thread Oleksii Kurochko
de of these regions, an assertion will trigger. To implement this, the phys_offset variable is made accessible outside of riscv/mm.c. Signed-off-by: Oleksii Kurochko --- Changes in v3: - Drop ASSERT(va >= (DIRECTMAP_VIRT_START + DIRECTMAP_SIZE)) as it is enough to have 'if (...)' fo

[PATCH v3 2/3] xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr()

2024-10-09 Thread Oleksii Kurochko
Use virt_to_maddr() instead of LINK_TO_LOAD as virt_to_maddr() covers all the cases where LINK_TO_LOAD() is used. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V3: - Add Acked-by: Jan Beulich . --- Changes in V2: - Drop the cast of virt_to_maddr() argument in

[PATCH v3 3/3] xen/riscv: register Xen's load address as a boot module

2024-10-09 Thread Oleksii Kurochko
Avoid using BOOTMOD_XEN region for other purposes or boot modules which could result in memory corruption or undefined behaviour. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V3: - Add Acked-by: Jan Beulich . --- Changes in V2: - Drop local variable xen_bootmodule as

[PATCH v2 0/3] Register Xen's load address as a boot module

2024-10-04 Thread Oleksii Kurochko
ging ) - Other changes please look at the specific patch. --- Oleksii Kurochko (3): xen/riscv: implement virt_to_maddr() xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr() xen/riscv: register Xen's load address as a boot module xen/arch/riscv/include/asm/config.h | 4 xen/ar

[PATCH v2 2/3] xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr()

2024-10-04 Thread Oleksii Kurochko
Use virt_to_maddr() instead of LINK_TO_LOAD as virt_to_maddr() covers all the cases where LINK_TO_LOAD() is used. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Drop the cast of virt_to_maddr() argument in remove_identity_mapping() as this cast is done inside virtu_to_maddr() wrapper

[PATCH v2 1/3] xen/riscv: implement virt_to_maddr()

2024-10-04 Thread Oleksii Kurochko
/mm.c. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Drop casts in virt_to_maddr() for ASSERT which checks that VA is in the range of where Xen is located. - Add UL suffix for or XEN_VIRT_START by using _AC(..., UL) and add inclusion of - Add the comment above return which

[PATCH v2 3/3] xen/riscv: register Xen's load address as a boot module

2024-10-04 Thread Oleksii Kurochko
Avoid using BOOTMOD_XEN region for other purposes or boot modules which could result in memory corruption or undefined behaviour. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Drop local variable xen_bootmodule as it won't be used after initialization. - Drop unnecessary cast fo

Re: [PATCH v8 0/7] device tree mapping

2024-09-30 Thread oleksii . kurochko
On Mon, 2024-09-30 at 10:17 +0200, Jan Beulich wrote: > On 27.09.2024 18:33, Oleksii Kurochko wrote: > > Current patch series introduces device tree mapping for RISC-V > > and necessary things for that such as: > > - Fixmap mapping > > - pmap > > - Xen page table

Re: [PATCH v8 6/7] xen/riscv: page table handling

2024-09-30 Thread oleksii . kurochko
_SIZE as it isn't used. --- Changes in V3: - new patch. ( Technically it is reworked version of the generic approach which I tried to suggest in the previous version ) --- ~ Oleksii On Fri, 2024-09-27 at 18:33 +0200, Oleksii Kurochko wrote: > Implement map_pages_to_xen() which require

Re: [PATCH v8 7/7] xen/riscv: introduce early_fdt_map()

2024-09-30 Thread oleksii . kurochko
0, Oleksii Kurochko wrote: > Introduce function which allows to map FDT to Xen. > > Also, initialization of device_tree_flattened happens using > early_fdt_map(). > > Signed-off-by: Oleksii Kurochko > Acked-by: Jan Beulich > --- >  xen/arch/riscv/include/as

Re: [PATCH v8 0/7] device tree mapping

2024-09-30 Thread oleksii . kurochko
On Mon, 2024-09-30 at 10:32 +0200, Jan Beulich wrote: > On 30.09.2024 10:24, oleksii.kuroc...@gmail.com wrote: > > On Mon, 2024-09-30 at 10:17 +0200, Jan Beulich wrote: > > > On 27.09.2024 18:33, Oleksii Kurochko wrote: > > > > Current patch series introduces

Re: [PATCH v8 0/7] device tree mapping

2024-09-30 Thread oleksii . kurochko
On Mon, 2024-09-30 at 09:27 +0200, Jan Beulich wrote: > On 27.09.2024 18:33, Oleksii Kurochko wrote: > > Current patch series introduces device tree mapping for RISC-V > > and necessary things for that such as: > > - Fixmap mapping > > - pmap >

Re: [PATCH v5 1/6] xen: introduce DECL_SECTION_WITH_LADDR

2024-09-30 Thread oleksii . kurochko
On Mon, 2024-09-30 at 09:20 +0200, Jan Beulich wrote: > On 27.09.2024 18:32, Oleksii Kurochko wrote: > > --- a/xen/arch/x86/xen.lds.S > > +++ b/xen/arch/x86/xen.lds.S > > @@ -3,6 +3,10 @@ > >   > >  #include > >  #include > > + > > +#ifndef EF

Re: [PATCH v1 1/3] xen/riscv: implement virt_to_maddr()

2024-10-02 Thread oleksii . kurochko
On Tue, 2024-10-01 at 17:41 +0200, Jan Beulich wrote: > On 30.09.2024 17:08, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/include/asm/mm.h > > +++ b/xen/arch/riscv/include/asm/mm.h > > @@ -28,7 +28,20 @@ static inline void *maddr_to_virt(paddr_t ma)

Re: [PATCH v1 2/3] xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr()

2024-10-02 Thread oleksii . kurochko
On Tue, 2024-10-01 at 17:44 +0200, Jan Beulich wrote: > On 30.09.2024 17:08, Oleksii Kurochko wrote: > > Except for switching LINK_TO_LOAD() to virt_to_maddr(), > > LINK_TO_LOAD() is dropped, as virt_to_maddr() covers all > > the cases where LINK_TO_LOAD() is used. > >

Re: [PATCH v1 3/3] xen/riscv: register Xen's load address as a boot module

2024-10-02 Thread oleksii . kurochko
On Tue, 2024-10-01 at 17:49 +0200, Jan Beulich wrote: > On 30.09.2024 17:08, Oleksii Kurochko wrote: > > @@ -26,6 +27,8 @@ unsigned char __initdata > > cpu0_boot_stack[STACK_SIZE] > >  void __init noreturn start_xen(unsigned long bootcpu_id, > >  

Re: [PATCH v1 1/2] xen/riscv: initialize bootinfo from dtb

2024-10-02 Thread oleksii . kurochko
On Tue, 2024-10-01 at 17:54 +0200, Jan Beulich wrote: > On 30.09.2024 17:13, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/setup.c > > +++ b/xen/arch/riscv/setup.c > > @@ -28,6 +28,7 @@ void __init noreturn start_xen(unsigned long > > bootcpu_id, > >   

Re: [PATCH v2 1/2] xen/riscv: initialize bootinfo from dtb

2024-10-16 Thread oleksii . kurochko
On Tue, 2024-10-15 at 14:32 +0200, Jan Beulich wrote: > On 15.10.2024 11:11, oleksii.kuroc...@gmail.com wrote: > > On Tue, 2024-10-15 at 08:33 +0200, Jan Beulich wrote: > > > On 10.10.2024 17:30, Oleksii Kurochko wrote: > > > > --- a/xen/arch/riscv/setup.c > &

[PATCH v1 5/5] xen/riscv: finalize boot allocator and transition to boot state

2024-10-16 Thread Oleksii Kurochko
. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 3652cb056d..9680332fee 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -65,6 +65,14 @@ void __init noreturn

[PATCH v1 1/5] xen/riscv: add stub for share_xen_page_with_guest()

2024-10-16 Thread Oleksii Kurochko
of share_xen_page_with_guest() in share_xen_page_with_privileged_guests() from asm/mm.h. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/stubs.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c index 5951b0ce91..c9a590b225 100644 --- a/xen/arch/riscv/stu

[PATCH v1 0/5] Setup memory management

2024-10-16 Thread Oleksii Kurochko
uced as part of this patch series, as setup_directmap_mappings() uses it indirectly through mfn_to_virt(). Oleksii Kurochko (5): xen/riscv: add stub for share_xen_page_with_guest() xen/riscv: implement maddr_to_virt() xen/riscv: introduce setup_mm() xen/riscv: initialize the VMAP_DEFAULT

[PATCH v1 4/5] xen/riscv: initialize the VMAP_DEFAULT virtual range

2024-10-16 Thread Oleksii Kurochko
Call vm_init() to initialize the VMAP_DEFAULT virtual range. To support this, introduce the populate_pt_range() and arch_vmap_virt_end() functions, which are used by vm_init()->vm_init_type(). Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/mm.c| 11 +-- xen/arch/riscv/p

[PATCH v1 2/5] xen/riscv: implement maddr_to_virt()

2024-10-16 Thread Oleksii Kurochko
Implement the `maddr_to_virt()` function to convert a machine address to a virtual address. This function is specifically designed to be used only for the DIRECTMAP region, so a check has been added to ensure that the address does not exceed `DIRECTMAP_SIZE`. Signed-off-by: Oleksii Kurochko

[PATCH v1 3/5] xen/riscv: introduce setup_mm()

2024-10-16 Thread Oleksii Kurochko
performance for page_to_mfn(), mfn_to_page(), and maddr_to_virt(), as there is no need to account for {directmap, frametable}_base_pdx. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/mm.h| 2 + xen/arch/riscv/include/asm/setup.h | 2 + xen/arch/riscv/mm.c| 93

Re: [PATCH v2] Update deprecated SPDX license identifiers

2024-10-18 Thread oleksii . kurochko
On Fri, 2024-10-18 at 14:57 +0100, Frediano Ziglio wrote: > As specified in LICENSES/GPL-2.0: > - GPL-2.0 -> GPL-2.0-only; > - GPL-2.0+ -> GPL-2.0-or-later. > > Signed-off-by: Frediano Ziglio > Reviewed-by: Stefano Stabellini For RISC-V: Reviewed-by: Olek

Re: [PATCH v1 2/5] xen/riscv: implement maddr_to_virt()

2024-10-18 Thread oleksii . kurochko
On Thu, 2024-10-17 at 16:55 +0200, Jan Beulich wrote: > On 16.10.2024 11:15, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/include/asm/mm.h > > +++ b/xen/arch/riscv/include/asm/mm.h > > @@ -25,8 +25,12 @@ > >   > >  static inline void *maddr_to_virt(p

Re: [PATCH v1 3/5] xen/riscv: introduce setup_mm()

2024-10-18 Thread oleksii . kurochko
On Thu, 2024-10-17 at 17:15 +0200, Jan Beulich wrote: > On 16.10.2024 11:15, Oleksii Kurochko wrote: > > > +    if ( map_pages_to_xen((vaddr_t)mfn_to_virt(0), > > +  _mfn(0), nr_mfns, > > +  PAGE_HYPERVISOR_RW) ) > > +

Re: [PATCH v1 1/5] xen/riscv: add stub for share_xen_page_with_guest()

2024-10-18 Thread oleksii . kurochko
On Fri, 2024-10-18 at 15:27 +0200, Jan Beulich wrote: > On 18.10.2024 15:10, oleksii.kuroc...@gmail.com wrote: > > On Thu, 2024-10-17 at 16:51 +0200, Jan Beulich wrote: > > > On 16.10.2024 11:15, Oleksii Kurochko wrote: > > > > To avoid the follo

Re: [PATCH v1 1/5] xen/riscv: add stub for share_xen_page_with_guest()

2024-10-18 Thread oleksii . kurochko
On Thu, 2024-10-17 at 16:51 +0200, Jan Beulich wrote: > On 16.10.2024 11:15, Oleksii Kurochko wrote: > > To avoid the following linkage fail the stub for > > share_xen_page_with_guest() > > is introduced: > > What do you intend to express with "is introduced&quo

Re: [PATCH v1 2/5] xen/riscv: implement maddr_to_virt()

2024-10-21 Thread oleksii . kurochko
On Mon, 2024-10-21 at 08:56 +0100, Alejandro Vallejo wrote: > On Fri Oct 18, 2024 at 2:17 PM BST, oleksii.kurochko wrote: > > On Thu, 2024-10-17 at 16:55 +0200, Jan Beulich wrote: > > > On 16.10.2024 11:15, Oleksii Kurochko wrote: > > > > --- a/xen/arch/riscv/incl

Xen 4.20 release schedule

2024-10-21 Thread oleksii . kurochko
Hello everyone, As there were no objections to the proposed release schedule (https://lore.kernel.org/xen-devel/CAMacjJxEi6PThwH2=nwg3he8eqn39aiaxzcw3bqf7i4ycmj...@mail.gmail.com/ ), I've updated the wiki with the schedule for Xen 4.20 release (https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Rel

[PATCH v2 2/2] xen/riscv: parse and handle fdt command line

2024-10-10 Thread Oleksii Kurochko
Receive Xen's command line passed by DTB using boot_fdt_cmdline() and passed it to cmdline_parse() for further procesinng and setup of Xen-specific parameters. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V2: - add Acked-by: Jan Beulich --- xen/arch/riscv/setup.

[PATCH v2 0/2] Parse and handle command line from dtb

2024-10-10 Thread Oleksii Kurochko
changes for patch 1 ( xen/riscv: initialize bootinfo from dtb ): - Drop local variable fdt_size as it is going to be used only once. --- Oleksii Kurochko (2): xen/riscv: initialize bootinfo from dtb xen/riscv: parse and handle fdt command line xen/arch/riscv/setup.c | 8 1 file

[PATCH v2 1/2] xen/riscv: initialize bootinfo from dtb

2024-10-10 Thread Oleksii Kurochko
Parse DTB during startup, allowing memory banks and reserved memory regions to be set up, along with early device tree node ( chosen, "xen,domain", "reserved-memory", etc ) handling. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Drop local variable fdt_size as it

Re: [PATCH v3 0/6] Enable early bootup of AArch64 MPU systems

2024-10-10 Thread oleksii . kurochko
Hello Ayan, I think that we have to mention in CHANGELOG.md that experimental support of Xen with MPU for Arm is added. ( if I understand correctly what is this patch series about ). Thanks. ~ Oleksii On Thu, 2024-10-10 at 15:03 +0100, Ayan Kumar Halder wrote: > We have enabled early booting of

Re: [PATCH v5 0/6] Move {acpi_}device_init() and device_get_class() to common code

2024-10-08 Thread oleksii . kurochko
lease tell me what should be my next steps? Should I resend this patch series in case I miss something? Thanks. ~ Oleksii On Fri, 2024-09-27 at 18:32 +0200, Oleksii Kurochko wrote: > The {acpi_}device_init() and device_get_class() functions are > identical across > Arm and RISC-V, and t

Re: [PATCH v3 15/19] xen: Update header guards - RISC-V

2024-10-08 Thread oleksii . kurochko
On Tue, 2024-10-08 at 16:34 +0200, Jan Beulich wrote: > On 04.10.2024 10:17, Frediano Ziglio wrote: > > Updated headers related to RISC-V. > > > > Signed-off-by: Frediano Ziglio > > Acked-by: Jan Beulich > > > --- > >  xen/arch/riscv/include/asm/acpi.h   | 6 +++--- > >  xen/arch/riscv/

[PATCH v1] xen/common: move gic_preinit() to common code

2024-10-29 Thread Oleksii Kurochko
() since it is only used once. - Changes the prefix from gic to ic to generalize the code and avoid confusion with Arm’s GIC. Signed-off-by: Oleksii Kurochko --- xen/arch/arm/gic.c | 60 - xen/arch/arm/setup.c | 3 +- xen/common/device.c

Re: [PATCH v4 2/6] xen/arm: mpu: Introduce choice between MMU and MPU

2024-10-29 Thread oleksii . kurochko
tal). > > Simply "Experimental support for Armv8-R". > > The rest of that sentence is going to go stale quite quickly. With suggested by Andrew: Acked-by: Oleksii Kurochko Thanks. ~ Oleksii

Re: [PATCH v1] xen/common: move gic_preinit() to common code

2024-10-29 Thread oleksii . kurochko
On Tue, 2024-10-29 at 17:57 +0100, Jan Beulich wrote: > On 29.10.2024 17:47, Oleksii Kurochko wrote: > > --- a/xen/common/device.c > > +++ b/xen/common/device.c > > @@ -4,10 +4,14 @@ > >   *   xen/arch/arm/device.c > >   */ > >   > > +#include

Re: [PATCH v1] xen/common: move gic_preinit() to common code

2024-10-30 Thread oleksii . kurochko
On Tue, 2024-10-29 at 17:57 +0100, Jan Beulich wrote: > On 29.10.2024 17:47, Oleksii Kurochko wrote: > > --- a/xen/common/device.c > > +++ b/xen/common/device.c > > @@ -4,10 +4,14 @@ > >    *   xen/arch/arm/device.c > >    */ > >   > > +#include &

[PATCH v2] xen/common: Move gic_preinit() to common code

2024-10-30 Thread Oleksii Kurochko
it is only used once. - Change the prefix from gic to ic to clarify that the function is not specific to ARM’s GIC, making it suitable for other architectures as well. Signed-off-by: Oleksii Kurochko --- Changes in v2: - Revert changes connected to moving of gic_acpi_preinit() to common cod

Re: [PATCH v2 1/3] xen/riscv: introduce setup_mm()

2024-10-30 Thread oleksii . kurochko
On Wed, 2024-10-30 at 11:25 +0100, Jan Beulich wrote: > On 23.10.2024 17:50, Oleksii Kurochko wrote: > > Introduce the implementation of setup_mm(), which includes: > > 1. Adding all free regions to the boot allocator, as memory is > > needed > >    to allocate page

[PATCH v3 3/3] xen/riscv: finalize boot allocator and transition to boot state

2024-11-01 Thread Oleksii Kurochko
. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2-V3: - Acked-by: Jan Beulich --- xen/arch/riscv/setup.c | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 3652cb056d..9680332fee 100644 --- a/xen/arch/riscv/setup.c

[PATCH v3 0/3] Setup memory management for RISC-V

2024-11-01 Thread Oleksii Kurochko
n first two patches of v1 started to use changes introduced in "introduce setup_mm()" patch. - add Acked-by for some patch series. - All other details please look at the specific patch. --- Oleksii Kurochko (3): xen/riscv: introduce setup_mm() xen/riscv: initialize the VMAP_DE

[PATCH v3] xen/common: Move gic_dt_preinit() to common code

2024-11-01 Thread Oleksii Kurochko
it suitable for other architectures as well. Signed-off-by: Oleksii Kurochko --- Changes in v3: - s/ic/intc. - Update the commit message. - Move intc_dt_preinit() to common/device-tree/intc.c. - Add declaration of intc_dt_preinit() in xen/device_tree.h. - Revert intc_preinit()-related changes

[PATCH v3 2/3] xen/riscv: initialize the VMAP_DEFAULT virtual range

2024-11-01 Thread Oleksii Kurochko
Call vm_init() to initialize the VMAP_DEFAULT virtual range. To support this, introduce the populate_pt_range() and arch_vmap_virt_end() functions, which are used by vm_init()->vm_init_type(). Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2-V3: - Acked-by: Jan Beul

[PATCH v3 1/3] xen/riscv: introduce setup_mm()

2024-11-01 Thread Oleksii Kurochko
return NULL;") DCE happens and the code is just eliminated. Signed-off-by: Oleksii Kurochko --- Changes in V3: - Update the comment the part where DCE should be mentioned and directmap-related things are touched. - Move ROUNDDOWN to . - s/sizeof(struct page_info)/sizeof(*frame

[PATCH v2 1/3] xen/riscv: introduce setup_mm()

2024-10-23 Thread Oleksii Kurochko
ith_priviliged_guest() is called ( there is no any code in dissambled common/trace.o ) so there is no real call of share_xen_page_with_priviliged_guest(). Signed-off-by: Oleksii Kurochko --- Changes in V2: - merge patch 2 ( xen/riscv: implement maddr_to_virt() ) to the current one as maddr_t

[PATCH v2 3/3] xen/riscv: finalize boot allocator and transition to boot state

2024-10-23 Thread Oleksii Kurochko
. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2: - Acked-by: Jan Beulich --- xen/arch/riscv/setup.c | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 3652cb056d..9680332fee 100644 --- a/xen/arch/riscv/setup.c

[PATCH v2 0/3] Setup memory management for RISC-V

2024-10-23 Thread Oleksii Kurochko
atches to "introduce setup_mm()" patch as after setup_mm() rework all the things in first two patches of v1 started to use changes introduced in "introduce setup_mm()" patch. - add Acked-by for some patch series. - All other details please look at the specific patch. --- Olek

[PATCH v5 1/3] xen/riscv: introduce setup_mm()

2024-11-11 Thread Oleksii Kurochko
fined as stub ("BUG_ON(); return NULL;") DCE happens and the code is just eliminated. Signed-off-by: Oleksii Kurochko --- Changes in V5: - correct the if-condition in virt_to_maddr(): directmap_virt_start -> DIRECTMAP_VIRT_START as `va` argument of virt_to_maddr() is DIRECT

[PATCH v5 0/3] Setup memory management for RISC-V

2024-11-11 Thread Oleksii Kurochko
d Acked-by for some patch series. - All other details please look at the specific patch. --- Oleksii Kurochko (3): xen/riscv: introduce setup_mm() xen/riscv: initialize the VMAP_DEFAULT virtual range xen/riscv: finalize boot allocator and transition to boot state xen/arch/riscv/include/asm

[PATCH v5 3/3] xen/riscv: finalize boot allocator and transition to boot state

2024-11-11 Thread Oleksii Kurochko
. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2-V5: - Acked-by: Jan Beulich --- xen/arch/riscv/setup.c | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 3652cb056d..9680332fee 100644 --- a/xen/arch/riscv/setup.c

[PATCH v2] drivers/char: rename arm-uart.c to uart-init.c

2024-11-11 Thread Oleksii Kurochko
alphabetically sort files in the "ARM (W/ VIRTUALIZATION EXTENSIONS) ARCHITECTURE" section following the renaming of arm-uart.c. Add `select UART_INIT` for CONFIG_ARM to be sure that randconfig won't disable UART_INIT. Signed-off-by: Oleksii Kurochko --- NOTE: I am not insisiting on

[PATCH v5 2/3] xen/riscv: initialize the VMAP_DEFAULT virtual range

2024-11-11 Thread Oleksii Kurochko
Call vm_init() to initialize the VMAP_DEFAULT virtual range. To support this, introduce the populate_pt_range() and arch_vmap_virt_end() functions, which are used by vm_init()->vm_init_type(). Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2-V5: - Acked-by: Jan Beul

Re: [PATCH v1] drivers/char: move dt_uart_init() to dt-uart.c

2024-11-11 Thread oleksii . kurochko
Hi Julien, On Mon, 2024-11-11 at 10:24 +, Julien Grall wrote: > Hi Oleksii, > > On 08/11/2024 14:56, Oleksii Kurochko wrote: > > The `dt_uart_init()` functions is relocated to a new file `dt- > > uart.c` to allow > > for reuse across architectures that utilize the

Re: [PATCH v4 1/3] xen/riscv: introduce setup_mm()

2024-11-11 Thread oleksii . kurochko
On Mon, 2024-11-11 at 11:29 +0100, Jan Beulich wrote: > On 08.11.2024 13:51, Oleksii Kurochko wrote: > > @@ -37,9 +42,9 @@ static inline void *maddr_to_virt(paddr_t ma) > >   */ > >  static inline unsigned long virt_to_maddr(unsigned long va) > >  { > > -  

[PATCH v2 2/3] xen/riscv: initialize the VMAP_DEFAULT virtual range

2024-10-23 Thread Oleksii Kurochko
Call vm_init() to initialize the VMAP_DEFAULT virtual range. To support this, introduce the populate_pt_range() and arch_vmap_virt_end() functions, which are used by vm_init()->vm_init_type(). Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Change in V2: - Acked-by: Jan Beul

Re: [PATCH v5 1/3] xen/riscv: introduce setup_mm()

2024-11-13 Thread oleksii . kurochko
On Tue, 2024-11-12 at 12:22 +0100, Jan Beulich wrote: > On 11.11.2024 19:16, Oleksii Kurochko wrote: > > @@ -25,8 +27,11 @@ > >   > >  static inline void *maddr_to_virt(paddr_t ma) > >  { > > -    BUG_ON("unimplemented"); > > -

Re: Xen 4.20 Development Update [August-October]

2024-11-13 Thread oleksii . kurochko
Hi Bertrand, On Wed, 2024-11-13 at 13:02 +, Bertrand Marquis wrote: > Hi Oleksii, > > > On 12 Nov 2024, at 16:16, Oleksii Kurochko > > wrote: > > > > Hello everyone, > > > > This email only tracks big items for xen.git tree. Please reply for >

Re: Xen 4.20 Development Update [August-October]

2024-11-13 Thread oleksii . kurochko
On Wed, 2024-11-13 at 10:48 +0100, Jan Beulich wrote: > On 12.11.2024 17:16, Oleksii Kurochko wrote: > > === x86 === > > > > *  Expose consistent topology to guests (v7) > >   -  Alejandro Vallejo > >   - > > https://lore.kernel.org/xen-devel/2024102115460

Re: Xen 4.20 Development Update [August-October]

2024-11-13 Thread oleksii . kurochko
On Wed, 2024-11-13 at 14:25 +0100, Jürgen Groß wrote: > On 12.11.24 17:16, Oleksii Kurochko wrote: > > Hello everyone, > > > > This email only tracks big items for xen.git tree. Please reply for > > items you > > would like to see in 4.20 so that people have

Re: [PATCH v2] xen/common: Move gic_preinit() to common code

2024-10-31 Thread oleksii . kurochko
On Thu, 2024-10-31 at 11:29 +0100, Michal Orzel wrote: > > > On 31/10/2024 10:34, Jan Beulich wrote: > > > > > > On 30.10.2024 14:14, Oleksii Kurochko wrote: > > > Introduce ic_preinit() in the common codebase, as it is not > > > architecture-spec

Re: [PATCH v2 1/3] xen/riscv: introduce setup_mm()

2024-10-31 Thread oleksii . kurochko
> > > > > > > > > > Finally, regarding masking off the top bits of mfn, I'm not > > entirely > > clear on how this should work. If I understand correctly, if I mask > > off > > certain top bits in mfn, then I would need to unmask those same top > > bits in maddr_to_virt() and virt_to_maddr(). Is

Re: [PATCH v2] xen/common: Move gic_preinit() to common code

2024-10-31 Thread oleksii . kurochko
On Thu, 2024-10-31 at 11:29 +0100, Michal Orzel wrote: > > > On 31/10/2024 10:34, Jan Beulich wrote: > > > > > > On 30.10.2024 14:14, Oleksii Kurochko wrote: > > > Introduce ic_preinit() in the common codebase, as it is not > > > architecture-spec

Xen 4.20 Development Update [August-October]

2024-11-12 Thread Oleksii Kurochko
tion: Refresh the remaining Debian containers (v2) - Javi Merino - https://lore.kernel.org/xen-devel/cover.1730743077.git.javi.mer...@cloud.com/T/#m5d9acb7cf5db3c2be3d6527de14b69b07812314e * Move gic_preinit() to common code (v2) - Oleksii Kurochko - https://lore.kernel.org/xen-devel/2fe01

Re: [PATCH v1 3/3] xen/common: move device initialization code to common code

2024-09-23 Thread oleksii . kurochko
17:28 +0200, Jan Beulich wrote: > > > > > On 11.09.2024 12:04, Oleksii Kurochko wrote: > > > > > > --- a/xen/common/Makefile > > > > > > +++ b/xen/common/Makefile > > > > > > @@ -6,6 +6,7 @@ obj-$(CONFIG_HYPFS_CONFIG) += config_data.o >

Re: Xen 4.20 release schedule proposal

2024-09-23 Thread oleksii . kurochko
On Thu, 2024-09-19 at 21:30 +0200, Julien Grall wrote: > > > On 19/09/2024 18:10, Oleksii Kurochko wrote: > > Hello everyone, > > > > Following the 8-month release cycle, also taking into account that > > 4.19 > > has been released 27.07.24 and the n

Re: [PATCH v1 2/2] xen: move per-cpu area management into common code

2024-09-23 Thread oleksii . kurochko
Hi Julien, On Sun, 2024-09-22 at 10:23 +0200, Julien Grall wrote: > > +} >  > +#endif> + > > +#ifndef ARCH_CPU_PERCPU_CALLBACK > > +inline int arch_cpu_percpu_callback(struct notifier_block *nfb, > > +    unsigned long action, void > > *hcpu) > > I am not entirely

Re: [PATCH v2 1/5] xen: define ACPI and DT device info sections macros

2024-09-23 Thread oleksii . kurochko
On Mon, 2024-09-23 at 12:08 +0200, Jan Beulich wrote: > On 17.09.2024 18:15, Oleksii Kurochko wrote: > > --- a/xen/include/xen/xen.lds.h > > +++ b/xen/include/xen/xen.lds.h > > @@ -114,6 +114,21 @@ > >   > >  /* List of constructs other than

Re: [PATCH v1 1/2] xen: introduce common macros for per-CPU sections defintion

2024-09-23 Thread oleksii . kurochko
On Mon, 2024-09-23 at 12:56 +0200, Jan Beulich wrote: > On 19.09.2024 17:59, Oleksii Kurochko wrote: > > --- a/xen/arch/x86/xen.lds.S > > +++ b/xen/arch/x86/xen.lds.S > > @@ -321,14 +321,7 @@ SECTIONS > >    DECL_SECTION(.bss) { > >     __bss_start = .

Re: [PATCH v1 2/2] xen: move per-cpu area management into common code

2024-09-23 Thread oleksii . kurochko
On Sun, 2024-09-22 at 10:43 +0200, Andrew Cooper wrote: > > > diff --git a/xen/common/percpu.c b/xen/common/percpu.c > > > new file mode 100644 > > > index 00..3837ef5714 > > > --- /dev/null > > > +++ b/xen/common/percpu.c > > > @@ -0,0 +1,127 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 *

Re: [PATCH v1 2/2] xen: move per-cpu area management into common code

2024-09-23 Thread oleksii . kurochko
On Sun, 2024-09-22 at 10:43 +0200, Andrew Cooper wrote: > On 22/09/2024 10:23 am, Julien Grall wrote: > > On 19/09/2024 17:59, Oleksii Kurochko wrote: > > > diff --git a/xen/arch/x86/percpu.c b/xen/arch/x86/percpu.c > > > index 3205eacea6..33bded8cac 100644 > &

Re: [PATCH v2 2/2] xen: move per-cpu area management into common code

2024-09-26 Thread oleksii . kurochko
On Wed, 2024-09-25 at 17:12 +0200, Jan Beulich wrote: > On 24.09.2024 18:42, Oleksii Kurochko wrote: > > --- a/xen/include/asm-generic/percpu.h > > +++ b/xen/include/asm-generic/percpu.h > > @@ -10,7 +10,14 @@ > >  extern char __per_cpu_start[]; > >  ext

Re: [PATCH v3 1/5] xen: define ACPI and DT device info sections macros

2024-09-26 Thread oleksii . kurochko
On Thu, 2024-09-26 at 08:23 +0200, Jan Beulich wrote: > On 25.09.2024 18:08, oleksii.kuroc...@gmail.com wrote: > > On Wed, 2024-09-25 at 10:36 +0200, Jan Beulich wrote: > > > PPC's desire to use DECL_SECTION() can certainly be covered by > > > providing > > > a (trivial) DECL_SECTION() also for Arm

Re: [PATCH v2 5/5] xen/common: move device initialization code to common code

2024-09-24 Thread oleksii . kurochko
On Mon, 2024-09-23 at 16:43 +0200, Jan Beulich wrote: > On 17.09.2024 18:15, Oleksii Kurochko wrote: > > --- a/xen/common/Kconfig > > +++ b/xen/common/Kconfig > > @@ -12,6 +12,14 @@ config CORE_PARKING > >   bool > >   depends on NR_CPUS > 1 > &

Re: [PATCH] x86/APIC: Remove x2APIC pure cluster mode

2024-09-24 Thread oleksii . kurochko
ing only the code required for logical > addressing when sending IPIs. > > Implements: https://gitlab.com/xen-project/xen/-/issues/189 > > Signed-off-by: Matthew Barnes > --- >  CHANGELOG.md  |  1 + Acked-by: Oleksii Kurochko ~ Oleksii >  docs/mis

[PATCH v2 0/2] Move percpu code to common

2024-09-24 Thread Oleksii Kurochko
: - update the cover letter message. - move CPU_RESUME_FAILED, CPU_REMOVE handling to common code. - rename PERCPU_SECTION to PERCPU_BSS. - drop ARCH_PERCPU_AREA_CHECK and ARCH_CPU_PERCPU_CALLBACK and connected functions. - All other changes look at specific patch. --- Oleksii Kurochko (2): xen

[PATCH v3 3/5] xen/ppc: add section for device information in linker script

2024-09-24 Thread Oleksii Kurochko
the section, respectively. Signed-off-by: Oleksii Kurochko Acked-by: Shawn Anastasio --- Changes in V2: - use refactored DT_DEV_INFO macros. - Add Acked-by: Shawn Anastasio --- xen/arch/ppc/xen.lds.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch

[PATCH v3 1/5] xen: define ACPI and DT device info sections macros

2024-09-24 Thread Oleksii Kurochko
(Arm, PPC, RISC-V), so they are moved to the common xen/xen.lds.h, based on their original definition in Arm. Signed-off-by: Oleksii Kurochko --- Changes in V2: - drop SEC* at the end of ACPI AND DT device info section mancros. - refactor ADEV_INFO and DT_DEV_INFO macros. --- xen/include

[PATCH v3 2/5] xen/arm: use {DT,ACPI}_DEV_INFO for device info sections

2024-09-24 Thread Oleksii Kurochko
Refactor arm/xen.lds.S by replacing the inline definitions for device info sections with the newly introduced {DT,ACPI}_DEV_INFO macros from xen/xen.lds.h. Signed-off-by: Oleksii Kurochko --- Changes in V2: - use refactored ADEV_INFO and DT_DEV_INFO macros. --- xen/arch/arm/xen.lds.S | 10

[PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion

2024-09-24 Thread Oleksii Kurochko
architectures. Refactor the linker scripts for Arm, PPC, and x86 architectures by using the common macro PERCPU_BSS defined in xen/xen.lds.h to handle per-CPU data sections. No functional changes. Signed-off-by: Oleksii Kurochko Acked-by: Julien Grall Acked-by: Jan Beulich --- Changes in V2: - rename

[PATCH v2 2/2] xen: move per-cpu area management into common code

2024-09-24 Thread Oleksii Kurochko
, CPU_REMOVE and freeing of percpu in the case when system_state != SYS_STATE_suspend. Signed-off-by: Oleksii Kurochko --- Changes in V2: - move definition of park_offline_cpus for Arm, PPC and RISC-V to - add to arm/asm/smp.h inclusion of ( at least, it is needed as it uses

[PATCH v3 0/5] Move {acpi_}device_init() and device_get_class() to common code

2024-09-24 Thread Oleksii Kurochko
DT_DEV_INFO - drop DEVICE_INIT config. --- Changes in v2: - Introduce macros for definition of ACPI and Device Tree sections. - Introduce CONFIG_DEVICE_INIT to make common/device.o compilable only for Arm, PPC and RISC-V. --- Oleksii Kurochko (5): xen: define ACPI and DT device info sections macros

[PATCH v3 4/5] xen/riscv: add section for device information in linker script

2024-09-24 Thread Oleksii Kurochko
of the section, respectively. Signed-off-by: Oleksii Kurochko --- Changes in V2: - use refactored DT_DEV_INFO macros. --- xen/arch/riscv/xen.lds.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S index 070b19d915..549c869922 100644

[PATCH v3 5/5] xen/common: move device initialization code to common code

2024-09-24 Thread Oleksii Kurochko
be processed correctly. Additionally, add to `device.c` as functions from this header are used within the file. Signed-off-by: Oleksii Kurochko --- Changes in V2: - drop DEVICE_INIT config. - update the commit message. --- xen/arch/arm/device.c | 71 ++--- xe

[PATCH v4 4/6] xen/ppc: add section for device information in linker script

2024-09-26 Thread Oleksii Kurochko
the section, respectively. Signed-off-by: Oleksii Kurochko Acked-by: Shawn Anastasio --- Changes in V4: - use newly refactored DT_DEV_INFO --- Changes in V3: - use refactored DT_DEV_INFO macros. - Add Acked-by: Shawn Anastasio --- xen/arch/ppc/xen.lds.S | 2 ++ 1 file changed, 2 insertions

[PATCH v3] xen: move per-cpu area management into common code

2024-09-26 Thread Oleksii Kurochko
: Oleksii Kurochko --- Changes in V3: - move __per_cpu_start[] and __per_cpu_data_end[] to xen/percpu.c. - move declaration of __per_cpu_offset[] to xen/percpu.h. - move park_offline_cpus, per_cpu{_ptr}, this_cpu{_ptr} to xen/percpu.h. - drop inclusion of in x86/asm/percpu.h. - add inclusion of ( as

[PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION

2024-09-26 Thread Oleksii Kurochko
Introduce SIMPLE_DECL_SECTION to cover the case when an architecture wants to declare a section without specifying of load address for the section. Update x86/xen.lds.S to use SIMPLE_DECL_SECTION. Signed-off-by: Oleksii Kurochko --- Changes in V4: - new patch --- xen/arch/x86/xen.lds.S| 6

[PATCH v4 2/6] xen: define ACPI and DT device info sections macros

2024-09-26 Thread Oleksii Kurochko
(Arm, PPC, RISC-V), so they are moved to the common xen/xen.lds.h, based on their original definition in Arm. Signed-off-by: Oleksii Kurochko --- Changes in V4: - rename ADEV_INFO to ACPI_DEV_INFO. - refactor ADEV_INFO and DT_DEV_INFO: add alignment and DECL_SECTION. --- Changes in V3: - drop

[PATCH v4 5/6] xen/riscv: add section for device information in linker script

2024-09-26 Thread Oleksii Kurochko
of the section, respectively. Signed-off-by: Oleksii Kurochko --- Changes in V4: - use newly refactored DT_DEV_INFO --- Changes in V3: - use refactored DT_DEV_INFO macros. --- xen/arch/riscv/xen.lds.S | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch

[PATCH v4 3/6] xen/arm: use {DT,ACPI}_DEV_INFO for device info sections

2024-09-26 Thread Oleksii Kurochko
Refactor arm/xen.lds.S by replacing the inline definitions for device info sections with the newly introduced {DT,ACPI}_DEV_INFO macros from xen/xen.lds.h. Signed-off-by: Oleksii Kurochko --- Changes in V4: - use newly refactored ACPI_DEV_INFO and DT_DEV_INFO --- Changes in V3: - use

  1   2   3   4   5   6   7   8   9   10   >