[PATCH v5 09/23] xen/riscv: introduce bitops.h

2024-02-26 Thread Oleksii Kurochko
ted macros/defines. * convert identations from tabs to spaces. * inside generic__test_and_* use 'bitops_uint_t' instead of 'unsigned long' to be generic. Signed-off-by: Oleksii Kurochko --- Patches 04 - 08 of this patch series are prerequisite for this patch. --- Changes in

[PATCH v5 11/23] xen/riscv: introduce cmpxchg.h

2024-02-26 Thread Oleksii Kurochko
atomic_cmpxchg(v, 0, 1); r1 = READ_ONCE(*x); } exists (u=1 /\ v=1 /\ 0:r1=0 /\ 1:r1=0) [1] https://marc.info/?l=linux-kernel=151930201102853=2 https://groups.google.com/a/groups.riscv.org/forum/#!topic/isa-dev/hKywNHBkAXM https://marc.info/?l=linux-kernel=151633436614259=2 ``` Signed-off-

[PATCH v5 19/23] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - update the comment around "struct domain *domain;" : zero -> NULL - fix ident. for unsigned long val; - put page_to_virt() and virt_to_page() close to each other. - drop unnessary leading underscore - drop a space befor

[PATCH v5 15/23] xen/riscv: add definition of __read_mostly

2024-02-26 Thread Oleksii Kurochko
The definition of __read_mostly should be removed in: https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ The patch introduces it in arch-specific header to not block enabling of full Xen build for RISC-V. Signed-off-by: Oleksii Kurochko --- - [PATCH] move

[PATCH v5 10/23] xen/riscv: introduces acrquire, release and full barriers

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/arch/riscv/include/asm/fence.h | 9 + 1 file changed, 9 insertions(+) create mode 100644 xen/arch/riscv/include/asm/fence.h diff --git a/xen/arch/riscv/include/asm/fence.h b/xen/arch/riscv/include/asm/fence.h

[PATCH v5 01/23] xen/riscv: disable unnecessary configs

2024-02-26 Thread Oleksii Kurochko
This patch disables unnecessary configs for two cases: 1. By utilizing EXTRA_FIXED_RANDCONFIG for randconfig builds (GitLab CI jobs). 2. By using tiny64_defconfig for non-randconfig builds. Signed-off-by: Oleksii Kurochko --- Changes in V5: - Rebase and drop duplicated configs

[PATCH v5 12/23] xen/riscv: introduce io.h

2024-02-26 Thread Oleksii Kurochko
the header was added definions of ioremap_*(). Signed-off-by: Oleksii Kurochko --- Changes in V5: - Xen code style related fixes - drop #define _raw_{read,write}{b,w,l,d,q} _raw_{read,write}{b,w,l,d,q} - drop cpu_to_le16() - remove unuused argument in _io_ar() - update the commit message - drop

[PATCH v5 05/23] xen/asm-generic: introduce generic find first set bit functions

2024-02-26 Thread Oleksii Kurochko
These functions can be useful for architectures that don't have corresponding arch-specific instructions. Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/include/asm-generic/bitops/__ffs.h| 47 +++ xen/include/asm-generic/bitops/ffs.h

[PATCH v5 02/23] xen/riscv: use some asm-generic headers

2024-02-26 Thread Oleksii Kurochko
in the arch-specific folder. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V5: - Nothing changed. Only rebase. - update the commit message. - drop the message above revision log as there is no depenency for this patch from other patch series. --- Changes in V4: - removed

[PATCH v5 00/23] [PATCH v4 00/30] Enable build of full Xen for RISC-V

2024-02-26 Thread Oleksii Kurochko
on of it. - change the Author of commit with introduction of asm/atomic.h. - update some definition from spinlock.h. - code style changes. --- Oleksii Kurochko (23): xen/riscv: disable unnecessary configs xen/riscv: use some asm-generic headers xen/riscv: introduce nospec.h xen/asm-generic: i

[PATCH v5 04/23] xen/asm-generic: introduce generic fls() and flsl() functions

2024-02-26 Thread Oleksii Kurochko
These functions can be useful for architectures that don't have corresponding arch-specific instructions. Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/include/asm-generic/bitops/fls.h | 18 ++ xen/include/asm-generic/bitops/flsl.h | 10

[PATCH v5 06/23] xen/asm-generic: introduce generic ffz()

2024-02-26 Thread Oleksii Kurochko
The generic ffz() can be useful for architectures that don't have corresponding arch-specific instruction. Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/include/asm-generic/bitops/ffz.h | 18 ++ 1 file changed, 18 insertions(+) create mode 100644

[PATCH v5 08/23] xen/asm-generic: introduce generic non-atomic test_*bit()

2024-02-26 Thread Oleksii Kurochko
* BITOP_WORD * BITOP_TYPE These functions and macros can be useful for architectures that don't have corresponding arch-specific instructions. Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/include/asm-generic/bitops/bitops-bits.h | 21 + .../asm-generic/bitops/generic

[PATCH v5 13/23] xen/riscv: introduce atomic.h

2024-02-26 Thread Oleksii Kurochko
/atomics-ops.h Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko --- Changes in V5: - fence.h changes were moved to separate patch as patches related to io.h and cmpxchg.h, which are dependecies for this patch, also needed changes in fence.h - remove accessing of zero-length array

[PATCH v11 7/9] xen/riscv: add minimal amount of stubs to build full Xen

2024-05-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V7-V11: - Only rebase was done. --- Changes in V6: - update the commit in stubs.c around /* ... common/irq.c ... */ - add Acked-by: Jan Beulich --- Changes in V5: - drop unrelated changes - assert_failed("unimplm

[PATCH v11 4/9] xen/riscv: introduce bitops.h

2024-05-24 Thread Oleksii Kurochko
* __test_and_set_bit Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V11: - Nothing changed. Only rebase was done. --- Changes in V10: - update the error message BITS_PER_LONG -> BITOP_BITS_PER_WORD --- Changes in V9: - add Acked-by: Jan Beulich - d

[PATCH v11 9/9] xen/README: add compiler and binutils versions for RISC-V64

2024-05-24 Thread Oleksii Kurochko
to utilize Clang, it's important to note that, currently, there is no Xen RISC-V CI job in place to verify the seamless functioning of the build with Clang. Signed-off-by: Oleksii Kurochko -- Changes in V5-V11: - Nothing changed. Only rebase. --- Changes in V6: - update the message in README

[PATCH v11 1/9] xen/riscv: disable unnecessary configs

2024-05-24 Thread Oleksii Kurochko
requires asm/perf.h and asm/perfc-defn.h, so it is also disabled for now, as RISC-V hasn't introduced this headers yet. LIVEPATCH isn't ready for RISC-V too and it can be overriden by randconfig, so to avoid compilation errors for randconfig it is disabled for now. Signed-off-by: Oleksii Kurochko

[PATCH v11 8/9] xen/riscv: enable full Xen build

2024-05-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- At least this patch cann't be merged w/o Andrew's patch series is merged as ffs related functions are used from that patch series: https://lore.kernel.org/xen-devel/20240313172716.2325427-1-andrew.coop...@citrix.com/T/#t

[PATCH v11 3/9] xen/bitops: implement fls{l}() in common logic

2024-05-24 Thread Oleksii Kurochko
rototype of the per-architecture fls{l}() functions was changed to return 'unsigned int' to align with the generic implementation of these functions and avoid introducing signed/unsigned mismatches. Signed-off-by: Oleksii Kurochko --- The current one patch can be merged w/o waiting of Andrew's patc

[PATCH v11 2/9] xen: introduce generic non-atomic test_*bit()

2024-05-24 Thread Oleksii Kurochko
* __test_and_set_bit() will be defined using arch__test_and_set_bit() and generic__test_and_set_bit(). Signed-off-by: Oleksii Kurochko --- Reviewed-by: Jan Beulich jbeul...@suse.com? Jan gave his R-by for the previous version of the patch, but some changes were done, so I wasn't sure if I could use th

[PATCH v11 6/9] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-05-24 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V8-V11: - Nothing changed only rebase. --- Changes in V7: - update argument type of maddr_to_virt() function: unsigned long -> paddr_t - rename argument of PFN_ORDER(): pfn -> pg. - add Acked-by: Jan Beulich --- C

[PATCH v11 5/9] xen/riscv: add definition of __read_mostly

2024-05-24 Thread Oleksii Kurochko
The definition of __read_mostly should be removed in: https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ The patch introduces it in arch-specific header to not block enabling of full Xen build for RISC-V. Signed-off-by: Oleksii Kurochko --- - [PATCH] move

[PATCH v11 0/9] Enable build of full Xen for RISC-V

2024-05-24 Thread Oleksii Kurochko
- update some definition from spinlock.h. - code style changes. --- Oleksii Kurochko (9): xen/riscv: disable unnecessary configs xen: introduce generic non-atomic test_*bit() xen/bitops: implement fls{l}() in common logic xen/riscv: introduce bitops.h xen/riscv: add definition of __read_m

[PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-17 Thread Oleksii Kurochko
t_bit(). Signed-off-by: Oleksii Kurochko --- The context ("* Find First Set bit. Bits are labelled from 1." in xen/bitops.h ) suggests there's a dependency on an uncommitted patch. It happens becuase the current patch series is based on Andrew's patch series ( htt

[PATCH v10 00/14] Enable build of full Xen for RISC-V

2024-05-17 Thread Oleksii Kurochko
s used. - align arch-riscv.h with Arm's version of it. - change the Author of commit with introduction of asm/atomic.h. - update some definition from spinlock.h. - code style changes. --- Oleksii Kurochko (14): xen/riscv: disable unnecessary configs xen: introduce generic non-atomic test_*bit

[PATCH v10 08/14] xen/riscv: add definition of __read_mostly

2024-05-17 Thread Oleksii Kurochko
The definition of __read_mostly should be removed in: https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ The patch introduces it in arch-specific header to not block enabling of full Xen build for RISC-V. Signed-off-by: Oleksii Kurochko --- - [PATCH] move

[PATCH v10 07/14] xen/riscv: introduce monitor.h

2024-05-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4-V10: - Nothing changed. Only rebase. --- Changes in V3: - new patch. --- xen/arch/riscv/include/asm/monitor.h | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 xen/arch/riscv/include/asm/monitor.h diff --git

[PATCH v10 04/14] xen/riscv: introduce bitops.h

2024-05-17 Thread Oleksii Kurochko
* __test_and_set_bit Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V10: - update the error message BITS_PER_LONG -> BITOP_BITS_PER_WORD --- Changes in V9: - add Acked-by: Jan Beulich - drop redefinition of bitop_uint_t in asm/types.h as some operation in

[PATCH v10 01/14] xen/riscv: disable unnecessary configs

2024-05-17 Thread Oleksii Kurochko
requires asm/perf.h and asm/perfc-defn.h, so it is also disabled for now, as RISC-V hasn't introduced this headers yet. LIVEPATCH isn't ready for RISC-V too and it can be overriden by randconfig, so to avoid compilation errors for randconfig it is disabled for now. Signed-off-by: Oleksii Kurochko

[PATCH v10 12/14] xen/riscv: add minimal amount of stubs to build full Xen

2024-05-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V7-V10: - Only rebase was done. --- Changes in V6: - update the commit in stubs.c around /* ... common/irq.c ... */ - add Acked-by: Jan Beulich --- Changes in V5: - drop unrelated changes - assert_failed("unimplm

[PATCH v10 05/14] xen/riscv: introduce cmpxchg.h

2024-05-17 Thread Oleksii Kurochko
".aqrl" was approved by (the author of the RVWMO spec) [2] [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/1391516953-14541-1-git-send-email-will.dea...@arm.com/ [2] https://lore.kernel.org/linux-riscv/41e01514-74ca-84f2-f5cc-2645c444f...@nvidia.com/ Signed-off-by: Oleksii K

[PATCH v10 06/14] xen/riscv: introduce atomic.h

2024-05-17 Thread Oleksii Kurochko
kernel/patch/1391516953-14541-1-git-send-email-will.dea...@arm.com/ [2] https://lore.kernel.org/linux-riscv/41e01514-74ca-84f2-f5cc-2645c444f...@nvidia.com/ Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V10: - drop unnessary parentheses around p i

[PATCH v10 14/14] xen/README: add compiler and binutils versions for RISC-V64

2024-05-17 Thread Oleksii Kurochko
to utilize Clang, it's important to note that, currently, there is no Xen RISC-V CI job in place to verify the seamless functioning of the build with Clang. Signed-off-by: Oleksii Kurochko --- Changes in V5-V10: - Nothing changed. Only rebase. --- Changes in V6: - update the message in README

[PATCH v10 09/14] xen/riscv: add required things to current.h

2024-05-17 Thread Oleksii Kurochko
Add minimal requied things to be able to build full Xen. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V5-V10: - Nothing changed. Only rebase. --- Changes in V4: - BUG() was changed to BUG_ON("unimplemented"); - Change "xen/bug.h" to "xen/li

[PATCH v10 03/14] xen/bitops: implement fls{l}() in common logic

2024-05-17 Thread Oleksii Kurochko
rototype of the per-architecture fls{l}() functions was changed to return 'unsigned int' to align with the generic implementation of these functions and avoid introducing signed/unsigned mismatches. Signed-off-by: Oleksii Kurochko --- The patch is almost independent from Andrew's patch series

[PATCH v10 11/14] xen/riscv: introduce vm_event_*() functions

2024-05-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5-V10: - Only rebase was done. --- Changes in V4: - New patch. --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/vm_event.c | 19 +++ 2 files changed, 20 insertions(+) create mode 100644 xen/arch/riscv/vm_event.c diff --git

[PATCH v10 10/14] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-05-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V8-V10: - Nothing changed only rebase. --- Changes in V7: - update argument type of maddr_to_virt() function: unsigned long -> paddr_t - rename argument of PFN_ORDER(): pfn -> pg. - add Acked-by: Jan Beulich --- C

[PATCH v10 13/14] xen/riscv: enable full Xen build

2024-05-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- Changes in V5-V10: - Nothing changed. Only rebase. --- Changes in V4: - drop stubs for irq_actor_none() and irq_actor_none() as common/irq.c is compiled now. - drop defintion of max_page in stubs.c as common/page_alloc.c

[PATCH for-4.19? v12 0/8] *Enable build of full Xen for RISC-V

2024-05-29 Thread Oleksii Kurochko
introduction of asm/atomic.h. - update some definition from spinlock.h. - code style changes. --- Oleksii Kurochko (8): xen/riscv: disable unnecessary configs xen: introduce generic non-atomic test_*bit() xen/riscv: introduce bitops.h xen/riscv: add definition of __read_mostly xen/r

[PATCH v12 3/8] xen/riscv: introduce bitops.h

2024-05-29 Thread Oleksii Kurochko
* __test_and_set_bit Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V11-V12: - Nothing changed. Only rebase was done. --- Changes in V10: - update the error message BITS_PER_LONG -> BITOP_BITS_PER_WORD --- Changes in V9: - add Acked-by: Jan Beulich - d

[PATCH v12 2/8] xen: introduce generic non-atomic test_*bit()

2024-05-29 Thread Oleksii Kurochko
t_bit(). Signed-off-by: Oleksii Kurochko --- Changes in V12: - revert change of moving the definition of BITS_PER_BYTE from /bitops.h to xen/bitops.h. ( a separate patch will be provided to put BITS_PER_BYTE to proper place ) - drop comments on top of generic_*() functions and update the com

[PATCH v12 5/8] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-05-29 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V8-V12: - Nothing changed only rebase. --- Changes in V7: - update argument type of maddr_to_virt() function: unsigned long -> paddr_t - rename argument of PFN_ORDER(): pfn -> pg. - add Acked-by: Jan Beulich --- C

[PATCH v12 8/8] xen/README: add compiler and binutils versions for RISC-V64

2024-05-29 Thread Oleksii Kurochko
to utilize Clang, it's important to note that, currently, there is no Xen RISC-V CI job in place to verify the seamless functioning of the build with Clang. Signed-off-by: Oleksii Kurochko -- Changes in V5-V12: - Nothing changed. Only rebase. --- Changes in V6: - update the message in README

[PATCH v12 6/8] xen/riscv: add minimal amount of stubs to build full Xen

2024-05-29 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V7-V12: - Only rebase was done. --- Changes in V6: - update the commit in stubs.c around /* ... common/irq.c ... */ - add Acked-by: Jan Beulich --- Changes in V5: - drop unrelated changes - assert_failed("unimplm

[PATCH v12 1/8] xen/riscv: disable unnecessary configs

2024-05-29 Thread Oleksii Kurochko
requires asm/perf.h and asm/perfc-defn.h, so it is also disabled for now, as RISC-V hasn't introduced this headers yet. LIVEPATCH isn't ready for RISC-V too and it can be overriden by randconfig, so to avoid compilation errors for randconfig it is disabled for now. Signed-off-by: Oleksii Kurochko

[PATCH v12 7/8] xen/riscv: enable full Xen build

2024-05-29 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- At least this patch cann't be merged w/o Andrew's patch series is merged as ffs related functions are used from that patch series: https://lore.kernel.org/xen-devel/20240313172716.2325427-1-andrew.coop...@citrix.com/T/#t

[PATCH v12 4/8] xen/riscv: add definition of __read_mostly

2024-05-29 Thread Oleksii Kurochko
The definition of __read_mostly should be removed in: https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ The patch introduces it in arch-specific header to not block enabling of full Xen build for RISC-V. Signed-off-by: Oleksii Kurochko --- - [PATCH] move

<    3   4   5   6   7   8