[PATCH v6 05/20] xen/bitops: implement fls{l}() in common logic

2024-03-15 Thread Oleksii Kurochko
34: note: in expansion of macro 'min' 1843 | unsigned int inc_order = min(MAX_ORDER, flsl(e - s) - 1); generic_fls{l} was used instead of __builtin_clz{l}(x) as if x is 0, the result in undefined. Signed-off-by: Oleksii Kurochko --- Changes in V6: - new patch for the patch series.

[PATCH v6 12/20] xen/riscv: add definition of __read_mostly

2024-03-15 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 v6 17/20] xen/riscv: introduce vm_event_*() functions

2024-03-15 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5-V6: - 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 v6 02/20] xen/riscv: disable unnecessary configs

2024-03-15 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 V6: - Nothing changed. Only rebase. --- Changes in V5

[PATCH v6 07/20] xen/riscv: introduce bitops.h

2024-03-15 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 --- Changes in V6: - rebase clean ups were done: drop unused asm-generic includes --- Chan

[PATCH v6 03/20] xen/riscv: introduce extenstion support check by compiler

2024-03-15 Thread Oleksii Kurochko
. In the future, a feature will be introduced to check whether an extension is supported at runtime. However, this feature requires functionality for parsing device tree source (DTS), which is not yet available. Signed-off-by: Oleksii Kurochko --- Changes in V6: - new patch for this patch series

[PATCH v6 10/20] xen/riscv: introduce atomic.h

2024-03-15 Thread Oleksii Kurochko
/atomics-ops.h - drop atomic##prefix##_{cmp}xchg_{release, aquire, release}() as they are not used in Xen. - update the defintion of atomic##prefix##_{cmp}xchg according to {cmp}xchg() implementation in Xen. Signed-off-by: Bobby Eshleman Signed-off-by: Oleksii Kurochko --- Changes in V6

[PATCH v6 11/20] xen/riscv: introduce monitor.h

2024-03-15 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4/V5/V6: - 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

[PATCH v6 06/20] xen/bitops: put __ffs() and ffz() into linux compatible header

2024-03-15 Thread Oleksii Kurochko
that such cases are not encountered in the current code. Signed-off-by: Oleksii Kurochko --- Changes in V6: - new patch for the patch series. --- xen/arch/arm/include/asm/arm64/bitops.h | 21 - xen/arch/ppc/include/asm/bitops.h | 21 - xen/drivers

[PATCH v6 04/20] xen/asm-generic: introduce generic non-atomic test_*bit()

2024-03-15 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 V6: - Nothing changed ( only rebase ) --- Changes in V5: - new patch --- xen/include/asm-generic/bitops

[PATCH v6 00/20] Enable build of full Xen for RISC-V

2024-03-15 Thread Oleksii Kurochko
g.h as mostly functionilty of bug.h is 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 (20): automation: introduce fixed ran

[PATCH v6 08/20] xen/riscv: introduce cmpxchg.h

2024-03-15 Thread Oleksii Kurochko
loop OR fence.tso; loop: lr.{w|d}; ; sc.{w|d}∗ ; bnez loop atomic loop: lr.{w|d}.aq; ; sc.{w|d}.aqrl; bnez loop Table A.5: Mappings from Linux memory primitives to RISC-V primitives ``` Signed-off-by: Oleksii Kurochko --- Changes in V6: - update the commit

[PATCH v6 01/20] automation: introduce fixed randconfig for RISC-V

2024-03-15 Thread Oleksii Kurochko
This patch introduces the anchor riscv-fixed-randconfig, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko Reviewed-by: Michal Orzel Acked-by: Stefano Stabellini --- Changes in V6: - new patch

[PATCH v5 22/23] xen/riscv: enable full Xen build

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- Changes in V5: - 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 is compiled

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

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - Code style fixes. - drop introduced TOOLCHAIN_HAS_ZIHINTPAUSE and use as-insn instead and use as-insn istead. --- Changes in V4: - Change message -> subject in "Changes in V3" - Documentation about system requirem

[PATCH v5 14/23] xen/riscv: introduce monitor.h

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Waiting for dependency to be merged: [PATCH v6 0/9] Introduce generic headers (https://lore.kernel.org/xen-devel/84568b0c24a5ec96244f3f34537e9a148367facf.1707499278.git.oleksii.kuroc...@gmail.com/) --- Changes in V4/V5: - Nothing changed. Only rebase

[PATCH v5 21/23] xen/rirscv: add minimal amount of stubs to build full Xen

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - drop unrelated changes - assert_failed("unimplmented...") change to BUG_ON() --- Changes in V4: - added new stubs which are necessary for compilation after rebase: __cpu_up(), __cpu_disable(), __cpu_die() from smpboot.

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

2024-02-26 Thread Oleksii Kurochko
, 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: - update the commit message and README file with additional explanation about GCC and GNU Binutils version. Additionally, it was added information about

[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 v5 17/23] xen/riscv: add minimal stuff to page.h to build full Xen

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V5: - Nothing changed. Only rebase. --- Changes in V4: --- - Change message -> subject in "Changes in V3" - s/BUG/BUG_ON("...") - Do proper rebase ( pfn_to_paddr() and paddr_to_pfn() aren't remov

[PATCH v5 20/23] xen/riscv: introduce vm_event_*() functions

2024-02-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V5: - 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 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 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 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 03/23] xen/riscv: introduce nospec.h

2024-02-26 Thread Oleksii Kurochko
ion. Also, there are no speculation execution barriers. Therefore, functions evaluate_nospec() and block_speculation() should remain empty until a specific platform has an extension to deal with speculation execution. Signed-off-by: Oleksii Kurochko --- Changes in V5: - new patch --- xen/a

[PATCH v5 16/23] xen/riscv: add required things to current.h

2024-02-26 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: - Nothing changed. Only rebase. --- Changes in V4: - BUG() was changed to BUG_ON("unimplemented"); - Change "xen/bug.h" to "xen/lib.h&quo

[PATCH v5 07/23] xen/asm-generic: introduce generic hweight64()

2024-02-26 Thread Oleksii Kurochko
The generic hweight() function 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/hweight.h | 13 + 1 file changed, 13 insertions(+) create

[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 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 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 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 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 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 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 v9 6/7] xen/ppc: switch PPC to use asm-generic/device.h

2024-02-16 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changed in V8: - nothing changed. only rebase. --- Changes in V7: - newly introduced patch which is based on the previous version of the patch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen

[PATCH v9 4/7] xen/asm-generic: introduce generic device.h

2024-02-16 Thread Oleksii Kurochko
iommu related things with CONFIG_HAS_PASSTHROUGH. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V9: - move 'struct device_desc' to #ifdef CONFIG_HAS_DEVICE_TREE as it is expected to have this structure only in case of CONFIG_HAS_DEVICE_TREE. - rename name_, namestr_

[PATCH v9 0/7] Introduce generic headers

2024-02-16 Thread Oleksii Kurochko
bably not so generic as I expected, I'll back to it if it will be necessary in the future ) - [PATCH v1 28/29] xen/asm-generic: introduce stub header p2m.h ( probably not so generic as I expected, I'll back to it if it will be necessary in the future ) - For the rest of the patches please loo

[PATCH v9 3/7] xen/asm-generic: ifdef inclusion of

2024-02-16 Thread Oleksii Kurochko
Beulich Signed-off-by: Oleksii Kurochko Acked-by: Tamas K Lengyel Acked-by: Julien Grall --- Changes in V9: - Acked-by: Julien Grall --- Changes in V8: - Add Acked-by: Tamas K Lengyel --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Remove the way how CONFIG_MEM_ACCESS

[PATCH v9 5/7] xen/arm: switch Arm to use asm-generic/device.h

2024-02-16 Thread Oleksii Kurochko
by CONFIG_HAS_DEVICE_TREE, _sdevice, _edevice, device_init(), and device_get_class should also be protected. However, this protection was not implemented because Arm always has CONFIG_HAS_DEVICE_TREE=y at the moment. Signed-off-by: Oleksii Kurochko Reviewed-by: Julien Grall --- Changes in V9

[PATCH v9 2/7] xen/asm-generic: introduce stub header monitor.h

2024-02-16 Thread Oleksii Kurochko
The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Tamas K Lengyel Acked

[PATCH v9 7/7] xen/asm-generic: fold struct devarch into struct dev

2024-02-16 Thread Oleksii Kurochko
mu" to "dev->iommu". Suggested-by: Julien Grall Signed-off-by: Oleksii Kurochko --- This patch can be merged with patches 4 and 5 of this patch series. --- Changes in V9: - newly introduced patch. --- xen/drivers/passthrough/arm/smmu.c | 12 ++-- xen/includ

[PATCH v9 1/7] automation: introduce fixed randconfig for RISC-V

2024-02-16 Thread Oleksii Kurochko
This patch introduces the anchor riscv-fixed-randconfig, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko --- The patch were introduced after discussion in a topic: https://lore.kernel.org/xen

[PATCH v8 6/7] xen/arm: switch Arm to use asm-generic/device.h

2024-02-09 Thread Oleksii Kurochko
acpi_device_desc was guarded in asm-generic, also functions acpi_device_init() was guarded too as they are using structure acpi_device_desc inside. * drop arm/include/asm/device.h and update arm/include/asm/Makefile to use asm-generic/device.h instead. Signed-off-by: Oleksii Kurochko

[PATCH v8 4/7] xen/asm-generic: ifdef inclusion of

2024-02-09 Thread Oleksii Kurochko
Beulich Signed-off-by: Oleksii Kurochko Acked-by: Tamas K Lengyel --- Changes in V8: - Add Acked-by: Tamas K Lengyel --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Remove the way how CONFIG_MEM_ACCESS is disabled for PPC and RISC-V. - Disable the config in ppc64_defconfig

[PATCH v8 0/7] Introduce generic headers

2024-02-09 Thread Oleksii Kurochko
TCH v1 28/29] xen/asm-generic: introduce stub header p2m.h ( probably not so generic as I expected, I'll back to it if it will be necessary in the future ) - For the rest of the patches please look at changes for each patch separately. --- Oleksii Kurochko (7): automation: ensure value

[PATCH v8 2/7] automation: introduce fixed randconfig for RISC-V

2024-02-09 Thread Oleksii Kurochko
This patch introduces the file riscv-fixed-randconfig.yaml, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko --- The patch were introduced after discussion in a topic: https://lore.kernel.org/xen

[PATCH v8 3/7] xen/asm-generic: introduce stub header monitor.h

2024-02-09 Thread Oleksii Kurochko
The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Tamas K Lengyel --- Changes

[PATCH v8 7/7] xen/ppc: switch PPC to use asm-generic/device.h

2024-02-09 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V7: - newly introduced patch which is based on the previous version of the patch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53

[PATCH v8 5/7] xen/asm-generic: introduce generic device.h

2024-02-09 Thread Oleksii Kurochko
iommu related things with CONFIG_HAS_PASSTHROUGH. Signed-off-by: Oleksii Kurochko --- Changes in V8: - drop #ifdef HAS_PCI around DEV_PCI in enum device_type to be consistent with DEVICE_PCI_HOSTBRIDGE - drop the comment above enum device_type, after DEV_PCI is alaways present in enum

[PATCH v8 1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line

2024-02-09 Thread Oleksii Kurochko
-by: Oleksii Kurochko --- Changes in V8: - Nothing changed. Only rebase --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/scripts/build | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v2] xen/lib: introduce generic find next bit operations

2024-02-09 Thread Oleksii Kurochko
-arch/20211005054059.475634-5-yury.no...@gmail.com/ Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- docs/misra/exclude-list.json | 8 +- xen/arch/arm/arm64/lib/Makefile | 2 +- xen/arch/arm/include/asm/arm64/bitops.h | 46 +-- xen/arch

Xen 4.19 release status tracking list

2024-02-05 Thread Oleksii Kurochko
Hello everyone, I would like to share with you a list for status tracking based on Xen ML: Arm: * [PATCH v5 00/13] Arm cache coloring [ https://lore.kernel.org/xen-devel/20240102095138.17933-1-carlo.non...@minervasys.tech/ ] * [PATCH v1 repost 0/4] xen/arm64: Rework the MMU-off code (idmap)

[PATCH v4 28/30] xen/rirscv: add minimal amount of stubs to build full Xen

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - added new stubs which are necessary for compilation after rebase: __cpu_up(), __cpu_disable(), __cpu_die() from smpboot.c - back changes related to printk() in early_printk() as they should be removed in the next patch to avoid

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

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - Update version of GCC (12.2) and GNU Binutils (2.39) to the version which are in Xen's contrainter for RISC-V --- Changes in V3: - new patch --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index

[PATCH v4 24/30] xen/riscv: add minimal stuff to page.h to build full Xen

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: --- - Change message -> subject in "Changes in V3" - s/BUG/BUG_ON("...") - Do proper rebase ( pfn_to_paddr() and paddr_to_pfn() aren't removed ). --- Changes in V3: - update the commit subje

[PATCH v4 29/30] xen/riscv: enable full Xen build

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- 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 is compiled now. - drop printk() related changes in riscv

[PATCH v4 27/30] xen/riscv: introduce vm_event_*() functions

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- 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 a/xen/arch/riscv/Makefile b/xen/arch/riscv

[PATCH v4 22/30] xen/riscv: define an address of frame table

2024-02-05 Thread Oleksii Kurochko
Also, the patch adds some helpful macros that assist in avoiding the redefinition of memory layout for each MMU mode. Signed-off-by: Oleksii Kurochko --- Changes in V4: - move "#define VPN_BITS (9)" inside CONFIG_RISCV_64 as for SV32 it should be defined differently. - drop SLOTN_

[PATCH v4 23/30] xen/riscv: add required things to current.h

2024-02-05 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 V4: - BUG() was changed to BUG_ON("unimplemented"); - Change "xen/bug.h" to "xen/lib.h" as BUG_ON is defined in xen/lib.h. - Add Acke

[PATCH v4 26/30] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - update an argument name of PFN_ORDERN macros. - drop pad at the end of 'struct page_info'. - Change message -> subject in "Changes in V3" - delete duplicated macros from riscv/mm.h - fix identation in struct page_info -

[PATCH v4 18/30] xen/riscv: introduce time.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - s/BUG()/BUG_ON("unimplemented") --- Changes in V3: - Acked-by: Jan Beulich - add SPDX - Add new line --- Changes in V2: - change xen/lib.h to xen/bug.h - remove inclusion of as it's not needed. --- xen/

[PATCH v4 25/30] xen/riscv: add minimal stuff to processor.h to build full Xen

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - Change message -> subject in "Changes in V3" - Documentation about system requirement was added. In the future, it can be checked if the extension is supported by system __riscv_isa_extension_available() ( https://gitlab.co

[PATCH v4 21/30] xen/riscv: add definition of __read_mostly

2024-02-05 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 v4 20/30] xen/riscv: introduce monitor.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Taking into account conversion in [PATCH v6 0/9] Introduce generic headers (https://lore.kernel.org/xen-devel/cover.1703072575.git.oleksii.kuroc...@gmail.com/) this patch can be changed --- Changes in V4: - Nothing changed. Only rebase. --- Changes in V3

[PATCH v4 15/30] xen/riscv: introduce irq.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - Change BUG to BUG_ON("unimplemented"). - Add Acked-by: Jan Beulich --- Changes in V3: - add SPDX - remove all that was wraped to HAS_DEVICETREE_... as for RISC-V it is going to be always selected.

[PATCH v4 17/30] xen/riscv: introduce regs.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich -- Changes in V4: - add Acked-by: Jan Beulich - s/BUG()/BUG_ON("unimplemented") --- Changes in V3: - update the commit message - add Acked-by: Jan Beulich - remove "include " and use a forward declaration instea

[PATCH v4 09/30] xen/riscv: introduce bitops.h

2024-02-05 Thread Oleksii Kurochko
ffs * ffsl * fls * flsl * ffs * ffz * find_first_bit_set * hweight64 * test_bit Some of the introduced bit operations are included in asm-generic, as they exhibit similarity across multiple architectures. Signed-off-by: Oleksii Kurochko --- Changes in V4: - updated the commit message: drop

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

2024-02-05 Thread Oleksii Kurochko
the Author of commit with introduction of asm/atomic.h. - update some definition from spinlock.h. - code style changes. --- Bobby Eshleman (1): xen/riscv: introduce atomic.h Oleksii Kurochko (29): xen/riscv: disable unnecessary configs xen/riscv: use some asm-generic headers xen: add support

[PATCH v4 14/30] xen/riscv: introduce atomic.h

2024-02-05 Thread Oleksii Kurochko
From: Bobby Eshleman Additionally, this patch introduces macros in fence.h, which are utilized in atomic.h. atomic##prefix##_*xchg_*(atomic##prefix##_t *v, c_t n) were updated to use __*xchg_generic(). Signed-off-by: Oleksii Kurochko --- Changes in V4: - do changes related to the updates

[PATCH v4 06/30] xen: avoid generation of empty asm/iommu.h

2024-02-05 Thread Oleksii Kurochko
h to avoid generation of empty asm/iommu.h for now. Signed-off-by: Oleksii Kurochko --- Changes in V4: - Update the commit message. --- Changes in V3: - new patch. --- xen/include/xen/iommu.h | 4 1 file changed, 4 insertions(+) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index

[PATCH v4 19/30] xen/riscv: introduce event.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - s/BUG()/BUG_ON("unimplemented") - s/xen\/bug.h/xen\/lib.h as BUG_ON is defined in xen/lib.h. --- Changes in V3: - add SPDX - add BUG() inside stubs. - update the commit message --- Changes in V2: - Nothing changed. Only rebase

[PATCH v4 11/30] xen/riscv: introduce smp.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - update the V3 changes ( remove that cpu_is_offline() was droped and instead of message used subject ) - drop cpu_is_offline() as it was moved to xen/smp.h. --- Changes in V3: - add SPDX. - drop unnessary #ifdef. - fix "No new

[PATCH v4 16/30] xen/riscv: introduce p2m.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - update the comment above p2m_type_t. RISC-V has only 2 free for use bits in PTE, not 4 as Arm. - update the comment after p2m_ram_rw: s/guest/domain/ as this also applies for dom0. - return INVALID_MFN in gfn_to_mfn() instead of mfn(0

[PATCH v4 04/30] xen/riscv: introduce cpufeature.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - Nothing changed. Only rebase --- Changes in V3: - add SPDX and footer - update declaration of cpu_nr_siblings() to return unsigned int instead of int. - add Acked-by: Jan Beulich --- Changes in V2: - Nothing

[PATCH v4 12/30] xen/riscv: introduce cmpxchg.h

2024-02-05 Thread Oleksii Kurochko
The header was taken from Linux kernl 6.4.0-rc1. Addionally, were updated: * add emulation of {cmp}xchg for 1/2 byte types * replace tabs with spaces * replace __* varialbed with *__ * introduce generic version of xchg_* and cmpxchg_*. Signed-off-by: Oleksii Kurochko --- Changes in V4: - Code

[PATCH v4 01/30] xen/riscv: disable unnecessary configs

2024-02-05 Thread Oleksii Kurochko
This patch disables unnecessary configs for two cases: 1. By utilizing EXTRA_FIXED_RANDCONFIG and risc-fixed-randconfig.yaml file for randconfig builds (GitLab CI jobs). 2. By using tiny64_defconfig for non-randconfig builds. Signed-off-by: Oleksii Kurochko --- Changes in V4: - Nothing

[PATCH v4 07/30] xen/asm-generic: introdure nospec.h

2024-02-05 Thread Oleksii Kurochko
The header is similar between Arm, PPC, and RISC-V, so it has been moved to asm-generic. Arm's nospec.h was taken as a base with updated guards: _ASM_ARM_NOSPEC_H -> _ASM_GENERIC_NOSPEC_H Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - Rebase the pa

[PATCH v4 13/30] xen/riscv: introduce io.h

2024-02-05 Thread Oleksii Kurochko
The header taken form Linux 6.4.0-rc1 and is based on arch/riscv/include/asm/mmio.h. Addionally, to the header was added definions of ioremap_*(). Signed-off-by: Oleksii Kurochko --- Changes in V4: - delete inner parentheses in macros. - s/u/uint. --- Changes in V3: - re-sync with linux

[PATCH v4 10/30] xen/riscv: introduce flushtlb.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - s/BUG/BUG_ON(...) --- Changes in V3: - add SPDX & footer - add Acked-by: Jan Beulich --- Changes in V2: - Nothing changed. Only rebase. --- xen/arch/riscv/include/asm/flushtlb.h | 34 ++

[PATCH v4 02/30] xen/riscv: use some asm-generic headers

2024-02-05 Thread Oleksii Kurochko
Some headers are the same as asm-generic verions of them so use them instead of arch-specific headers. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- As [PATCH v6 0/9] Introduce generic headers (https://lore.kernel.org/xen-devel/cover.1703072575.git.oleksii.kuroc...@gmail.com

[PATCH v4 08/30] xen/riscv: introduce setup.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - Nothing changed. Only rebase --- Changes in V3: - add SPDX - add Acked-by: Jan Beulich --- Changes in V2: - Nothing changed. Only rebase. --- xen/arch/riscv/include/asm/setup.h | 17 + 1 file

[PATCH v4 05/30] xen/riscv: introduce guest_atomics.h

2024-02-05 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V4: - Drop in guest_testop() and guest_bitop() casts of function arguments. - Change "commit message" to "commit title" in "Changes in V3" to be more precise about what was changed. - use BUG_ON("unimplemen

[PATCH v4 03/30] xen: add support in public/hvm/save.h for PPC and RISC-V

2024-02-05 Thread Oleksii Kurochko
No specific header is needed to include in public/hvm/save.h for PPC and RISC-V for now. Code related to PPC was changed based on the comment: https://lore.kernel.org/xen-devel/c2f3280e-2208-496b-a0b5-fda1a2076...@raptorengineering.com/ Signed-off-by: Oleksii Kurochko --- Changes in V4

[PATCH] xen: move BUG_ON(), WARN_ON(), ASSERT(), ASSERT_UNREACHABLE() to xen/bug.h

2024-02-02 Thread Oleksii Kurochko
.h depends on xen/lib.h functionality and only xen/bug.h is needed. cpufeature.h requires the inclusion of ; otherwise, the following error will occur: ld: common/monitor.o:/build/xen/./arch/x86/include/asm/cpufeature.h:41: multiple definitions of `__cacheline_aligned'; Signed-off-by: Oleksi

[PATCH v7 0/7] Introduce generic headers

2024-01-26 Thread Oleksii Kurochko
not so generic as I expected, I'll back to it if it will be necessary in the future ) - [PATCH v1 28/29] xen/asm-generic: introduce stub header p2m.h ( probably not so generic as I expected, I'll back to it if it will be necessary in the future ) - For the rest of the patches please look at cha

[PATCH v7 6/7] xen/arm: switch Arm to use asm-generic/device.h

2024-01-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/arm/device.c | 5 ++ xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/gic-v2.c | 4 +- xen/arch/arm/gic-v3.c | 6 +- xen/arch/arm/gic.c| 4 +- xen/arch/arm/include/asm/Makefile | 1

[PATCH v7 3/7] xen/asm-generic: introduce stub header monitor.h

2024-01-26 Thread Oleksii Kurochko
The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V7: - Drop definition

[PATCH v7 2/7] automation: introduce fixed randconfig for RISC-V

2024-01-26 Thread Oleksii Kurochko
This patch introduces the file riscv-fixed-randconfig.yaml, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko --- The patch were introduced after discussion in a topic: https://lore.kernel.org/xen

[PATCH v7 7/7] xen/ppc: switch PPC to use asm-generic/device.h

2024-01-26 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V7: - newly introduced patch which is based on the previous version of the patch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53

[PATCH v7 5/7] xen/asm-generic: introduce generic device.h

2024-01-26 Thread Oleksii Kurochko
. - #ifdef-ing iommu related things with CONFIG_HAS_PASSTHROUGH. Signed-off-by: Oleksii Kurochko --- Changes in V7: - keeping DEVICE_PCI_HOSTBRIDGE available for every build based on the reply: https://lore.kernel.org/xen-devel/926a5c12-7f02-42ec-92a8-1c82d060c...@xen.org/ - add comment

[PATCH v7 4/7] xen/asm-generic: ifdef inclusion of

2024-01-26 Thread Oleksii Kurochko
Beulich Signed-off-by: Oleksii Kurochko --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Remove the way how CONFIG_MEM_ACCESS is disabled for PPC and RISC-V. - Disable the config in ppc64_defconfig and tiny64_defconfig (RISC-V). --- Changes in V5: - Added dependencies

[PATCH v7 1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line

2024-01-26 Thread Oleksii Kurochko
-by: Oleksii Kurochko --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/scripts/build | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automation/scripts/build b/automation/scripts

[PATCH] xen/lib: introduce generic find next bit operations

2024-01-26 Thread Oleksii Kurochko
find-next-bit.c is common for Arm64, PPC and RISCV64, so it is moved to xen/lib. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- docs/misra/exclude-list.json | 4 - xen/arch/arm/arm64/lib/Makefile | 2 +- xen/arch/arm/include/asm/arm64/bitops.h

[PATCH v3 32/34] xen/rirscv: add minimal amount of stubs to build full Xen

2023-12-22 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V3: - code style fixes. - update attribute for frametable_base_pdx and frametable_virt_end to __ro_after_init. insteaf of read_mostly. - use BUG() instead of assert_failed/WARN for newly introduced stubs. - drop "#include "

[PATCH v3 29/34] xen/riscv: add minimal stuff to page.h to build full Xen

2023-12-22 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V3: - update the commit message - add implemetation of PAGE_HYPERVISOR macros - add Acked-by: Jan Beulich - drop definition of pfn_to_addr, and paddr_to_pfn in --- Changes in V2: - Nothing changed. Only rebase. --- xen

[PATCH v3 28/34] xen/riscv: add required things to current.h

2023-12-22 Thread Oleksii Kurochko
Add minimal requied things to be able to build full Xen. Signed-off-by: Oleksii Kurochko --- Changes in V3: - add SPDX - drop a forward declaration of struct vcpu; - update guest_cpu_user_regs() macros - replace get_processor_id with smp_processor_id - update the commit message - code

[PATCH v3 13/34] xen/riscv: introduce cmpxchg.h

2023-12-22 Thread Oleksii Kurochko
The header was taken from Linux kernl 6.4.0-rc1. Addionally, were updated: * add emulation of {cmp}xchg for 1/2 byte types * replace tabs with spaces * replace __* varialbed with *__ Signed-off-by: Oleksii Kurochko --- Changes in V3: - update the commit message - add emulation of {cmp}xchg_

<    1   2   3   4   5   6   7   8   >