[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

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

2024-02-26 Thread Oleksii
On Mon, 2024-02-26 at 15:20 +0100, Jan Beulich wrote: > On 26.02.2024 13:58, Oleksii wrote: > > On Mon, 2024-02-26 at 12:28 +0100, Jan Beulich wrote: > > > On 26.02.2024 12:18, Oleksii wrote: > > > > On Mon, 2024-02-26 at 10:45 +0100, Jan Beulich wrote: > > >

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

2024-02-26 Thread Oleksii
On Mon, 2024-02-26 at 12:28 +0100, Jan Beulich wrote: > On 26.02.2024 12:18, Oleksii wrote: > > On Mon, 2024-02-26 at 10:45 +0100, Jan Beulich wrote: > > > On 23.02.2024 13:23, Oleksii wrote: > > > > > > > > > > >

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

2024-02-26 Thread Oleksii
On Mon, 2024-02-26 at 10:45 +0100, Jan Beulich wrote: > On 23.02.2024 13:23, Oleksii wrote: > > > > > > > > > As 1- and 2-byte cases are emulated I decided that is not > > > > > > to > > > > > > provide > > > >

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

2024-02-23 Thread Oleksii
On Mon, 2024-02-19 at 09:06 +0100, Jan Beulich wrote: > On 16.02.2024 12:16, Oleksii wrote: > > On Thu, 2024-02-15 at 17:43 +0100, Jan Beulich wrote: > > > On 15.02.2024 17:38, Oleksii wrote: > > > > On Tue, 2024-02-13 at 14:33 +0100, Jan Beulich wrote: > >

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

2024-02-23 Thread Oleksii
e > accesses are a problem in the emulation loop, things can be changed > to explicit barriers, without touching the 4- and 8-byte cases. I am confused then a little bit if emulated case is not an issue. For 4- and 8-byte cases for xchg .aqrl is used, for relaxed and aqcuire version of xchg barries are used. The similar is done for cmpxchg. If something will be needed to change in emulation loop it won't require to change 4- and 8-byte cases. ~ Oleksii

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

2024-02-21 Thread Oleksii
On Wed, 2024-02-21 at 12:00 +0100, Jan Beulich wrote: > On 20.02.2024 21:30, Oleksii wrote: > > On Mon, 2024-02-19 at 13:18 +0100, Jan Beulich wrote: > > > On 19.02.2024 12:59, Oleksii wrote: > > > > Hi Julien, > > > > > > > > On Sun, 2024-

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

2024-02-20 Thread Oleksii
On Mon, 2024-02-19 at 13:18 +0100, Jan Beulich wrote: > On 19.02.2024 12:59, Oleksii wrote: > > Hi Julien, > > > > On Sun, 2024-02-18 at 18:30 +, Julien Grall wrote: > > > Hi Oleksii, > > > > > > Title: Typo s/introdure/introduce/ > >

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

2024-02-20 Thread Oleksii
On Wed, 2024-02-14 at 11:03 +0100, Jan Beulich wrote: > On 14.02.2024 10:54, Oleksii wrote: > > On Mon, 2024-02-12 at 16:03 +0100, Jan Beulich wrote: > > > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > > >  As [PATCH v6 0/9] Introduce generic headers > > &g

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

2024-02-20 Thread Oleksii
Hi Shawn, Could you please take a look at the patch and PPC-related changes ( xen/arch/ppc/include/asm/bitops.h )? Thanks in advance. ~ Oleksii On Fri, 2024-02-09 at 18:58 +0100, Oleksii Kurochko wrote: > find-next-bit.c is common for Arm64, PPC and RISCV64, > so it is moved to x

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

2024-02-20 Thread Oleksii
Hello Shawn, Could you please take a look at the patch and PPC-related changes in xen/arch/ppc/include/asm/time.h ? Thanks in advance. ~ Oleksii On Fri, 2024-02-02 at 20:03 +0200, Oleksii Kurochko wrote: > Move the macros mentioned in the commit subject to their appropriate > loc

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

2024-02-20 Thread Oleksii
Hello Shawn, Would you mind taking a look at this patch? Thanks in advance. Best regards, Oleksii On Fri, 2024-02-16 at 13:39 +0100, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko > --- > Changed in V8: >  - nothing changed. only rebase. > --- > Changes

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

2024-02-20 Thread Oleksii
Oleksii On Fri, 2024-02-16 at 13:39 +0100, Oleksii Kurochko wrote: > 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.

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

2024-02-20 Thread Oleksii
Hi Julien, On Mon, 2024-02-19 at 19:00 +, Julien Grall wrote: > Hi, > > On 16/02/2024 12:39, Oleksii Kurochko wrote: > > The current patch is a follow-up to the patch titled: > > xen/asm-generic: introduce generic device.h > > Also, a prerequisite for t

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

2024-02-19 Thread Oleksii
On Mon, 2024-02-19 at 15:12 +0100, Jan Beulich wrote: > On 19.02.2024 15:00, Oleksii wrote: > > On Sun, 2024-02-18 at 19:00 +, Julien Grall wrote: > > > On 05/02/2024 15:32, Oleksii Kurochko wrote: > > > > --- /dev/null > > > > +++ b/xen/arch/riscv/in

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

2024-02-19 Thread Oleksii
Hi Julien, On Sun, 2024-02-18 at 18:22 +, Julien Grall wrote: > Hi, > > On 05/02/2024 15:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > > -- > > Changes in V4: > >   - add Acked-by: Jan Beulich

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

2024-02-19 Thread Oleksii
Hi Julien, On Sun, 2024-02-18 at 19:22 +, Julien Grall wrote: > Hi, > > On 05/02/2024 15:32, Oleksii Kurochko wrote: > > From: Bobby Eshleman > > > > Additionally, this patch introduces macros in fence.h, > > which are utilized in atomic.h. > > >

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

2024-02-19 Thread Oleksii
intend to keep the code as-is (including style)? If not, then I > woudl consider to drop the cast on the three lines above and ... Changes have already been made in this header, so it makes sense to remove these casts. Thanks. ~ Oleksii

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

2024-02-19 Thread Oleksii
On Mon, 2024-02-19 at 12:22 +0100, Jan Beulich wrote: > On 15.02.2024 14:41, Oleksii wrote: > > > > +    : "=r" (ret), "+A" (*ptr) \ > > > > +    : "r" (new) \ > > > > +    : "memory" ); \ > &g

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

2024-02-19 Thread Oleksii
On Sun, 2024-02-18 at 19:00 +, Julien Grall wrote: > > > On 05/02/2024 15:32, Oleksii Kurochko wrote: > > The header was taken from Linux kernl 6.4.0-rc1. > > > > Addionally, were updated: > > * add emulation of {cmp}xchg for 1/2 byte types > > This e

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

2024-02-19 Thread Oleksii
Hi Julien, On Sun, 2024-02-18 at 18:30 +, Julien Grall wrote: > Hi Oleksii, > > Title: Typo s/introdure/introduce/ > > On 05/02/2024 15:32, Oleksii Kurochko wrote: > > The header is similar between Arm, PPC, and RISC-V, > > so it has been moved to asm-generic. &

[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

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

2024-02-16 Thread Oleksii
On Thu, 2024-02-15 at 17:43 +0100, Jan Beulich wrote: > On 15.02.2024 17:38, Oleksii wrote: > > On Tue, 2024-02-13 at 14:33 +0100, Jan Beulich wrote: > > > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > > > + depends on LLD_VERSION >= 1500

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

2024-02-16 Thread Oleksii
m? None of the other three > architectures use literal numbers here, thus making clear what > values are actually meant. If you can't use suitable constants, > please add a comment. This numbers are incorrect for RISC-V, it should be 12 + 9 ( PAGE_SHIFT + VPN_BITS ). I did some comparision of how some macros are defined in PPC and missed to update that. ~ Oleksii

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

2024-02-15 Thread Oleksii
> > On 14/02/2024 09:32, Oleksii wrote: > > On Tue, 2024-02-13 at 18:09 +, Julien Grall wrote: > > > > +#ifdef CONFIG_HAS_PASSTHROUGH > > > > +    struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU > > > > instance data */ > > >

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

2024-02-15 Thread Oleksii
On Tue, 2024-02-13 at 14:33 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/Kconfig > > +++ b/xen/arch/riscv/Kconfig > > @@ -45,6 +45,13 @@ config RISCV_ISA_C > >   > >     If unsure, say Y. > >

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

2024-02-15 Thread Oleksii
ded that is not to provide sfx argument for emulation macros as it will not have to much affect on emulated types and just consume more performance on acquire and release version of sc/ld instructions. > > > > No RISCV_..._BARRIER for use here and ... > > > +    ret__; \ > > +}) > > + > > +#define __cmpxchg(ptr, o, n, s) \ > > +({ \ > > +    __typeof__(*(ptr)) ret__; \ > > +    ret__ = (__typeof__(*(ptr))) \ > > +    __cmpxchg_generic(ptr, (unsigned long)(o), (unsigned > > long)(n), \ > > +  s, ".rl", "", " fence rw, rw\n"); \ > > ... here? And anyway, wouldn't it make sense to have > > #define cmpxchg(ptr, o, n) __cmpxchg(ptr, o, n, sizeof(*(ptr)) > > to limit redundancy? > > Plus wouldn't > > #define __cmpxchg(ptr, o, n, s) \ >     ((__typeof__(*(ptr))) \ > __cmpxchg_generic(ptr, (unsigned long)(o), (unsigned long)(n), \ >    s, ".rl", "", " fence rw, rw\n")) > > be shorter and thus easier to follow as well? As I notice only now, > this would apparently apply further up as well. I understand your point about "#define cmpxchg(ptr, o, n) __cmpxchg(", but I can't undestand how the definition of __cmxchng should be done shorter. Could you please clarify that? ~ Oleksii

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

2024-02-14 Thread Oleksii
On Wed, 2024-02-14 at 10:52 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > --- > >  Changes in V4: > >   - Update version of GCC (12.2) and GNU Binutils (2.39) to the > > version > >     wh

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:20 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > again with a nit, though: > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/event.h

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:18 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > > Nevertheless ... > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/time.h >

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:16 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > with two more nits: > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/p2m.h > >

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

2024-02-14 Thread Oleksii
On Tue, 2024-02-13 at 12:36 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > From: Bobby Eshleman > > > > Additionally, this patch introduces macros in fence.h, > > which are utilized in atomic.h. > > These are used in an earlier

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

2024-02-14 Thread Oleksii
On Tue, 2024-02-13 at 12:05 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > 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_*(). >

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:13 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich Thanks for Ack. ~ Oleksii

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:58 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/bitops.h > > @@ -0,0 +1,164 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* Copyright (C) 2012 Regent

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:10 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > asm/iommu.h shouldn't > > ... need to ... > > > be included when CONFIG_HAS_PASSTHROUGH > > isn't enabled. > > As is ifdef-ed by CONFIG_HAS_PASSTHROUGH

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:07 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich Thanks! ~ Oleksii

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:05 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > 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: > >

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:03 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Some headers are the same as asm-generic verions of them > > so use them instead of arch-specific headers. > > Just to mention it (I'll commit this as is, unless as

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

2024-02-14 Thread Oleksii
Hi Julien, On Tue, 2024-02-13 at 17:18 +, Julien Grall wrote: > Hi Oleksii, > > On 09/02/2024 17:58, Oleksii Kurochko wrote: > > find-next-bit.c is common for Arm64, PPC and RISCV64, > > so it is moved to xen/lib. > > > > PPC has been transitioned to gener

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 15:15 +0100, Jan Beulich wrote: > On 09.02.2024 18:58, Oleksii Kurochko wrote: > > find-next-bit.c is common for Arm64, PPC and RISCV64, > > so it is moved to xen/lib. > > > > PPC has been transitioned to generic functions from find-next-bi

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

2024-02-14 Thread Oleksii
Hi Julien, On Tue, 2024-02-13 at 18:12 +, Julien Grall wrote: > Hi Oleksii, > > On 09/02/2024 18:00, Oleksii Kurochko wrote: > > The following changes were done as a result of switching to > > asm-generic/device.h: > >   * DEVICE_GIC was renamed to DEVICE_INT

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

2024-02-14 Thread Oleksii
On Tue, 2024-02-13 at 18:09 +, Julien Grall wrote: > Hi Oleksii, > > On 09/02/2024 18:00, Oleksii Kurochko wrote: > > diff --git a/xen/include/asm-generic/device.h b/xen/include/asm- > > generic/device.h > > new file mode 100644 > > index 00..6e5665827

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

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 15:19 +0100, Jan Beulich wrote: > On 09.02.2024 19:00, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/include/asm-generic/device.h > > @@ -0,0 +1,149 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef __AS

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

2024-02-14 Thread Oleksii
Hi Julien, > On 13/02/2024 17:40, Julien Grall wrote: > > Hi Oleksii, > > > > On 09/02/2024 18:00, Oleksii Kurochko wrote: > > > The header is shared between several archs so it is > > > moved to asm-generic. > > > > > > Sw

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

2024-02-12 Thread Oleksii
On Mon, 2024-02-12 at 09:39 +0100, Michal Orzel wrote: > Hi Oleksii, Hi Michal, > > On 09/02/2024 19:00, Oleksii Kurochko wrote: > > > > > > This patch introduces the file riscv-fixed-randconfig.yaml, > > which includes all configurations that should be d

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

2024-02-12 Thread Oleksii
On Mon, 2024-02-12 at 09:12 +0100, Michal Orzel wrote: > Hi Oleksii, Hi Michal, > > On 09/02/2024 19:00, Oleksii Kurochko wrote: > > > > > > Kconfig tool expects each configuration to be on a new line. > > > > The current version of the build script p

[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

Re: Xen 4.19 release status tracking list

2024-02-09 Thread Oleksii
On Thu, 2024-02-08 at 16:58 +, Julien Grall wrote: > Hi Oleksii, Hi Julien, > > On 05/02/2024 19:23, Oleksii Kurochko wrote: > > Hello everyone, > > > > I would like to share with you a list for status tracking based on > > Xen ML: > > > > Arm:

Re: Xen 4.19 release status tracking list

2024-02-09 Thread Oleksii
On Tue, 2024-02-06 at 10:24 +0100, Jan Beulich wrote: > On 05.02.2024 20:23, Oleksii Kurochko wrote: > > Hello everyone, > > > > I would like to share with you a list for status tracking based on > > Xen ML: > > > > Arm: > >   * [PATCH v5 00/13] Arm

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

2024-02-09 Thread Oleksii
On Thu, 2024-02-08 at 21:30 +, Julien Grall wrote: > Hi Oleksii, Hi Julien, > > On 02/02/2024 18:03, Oleksii Kurochko wrote: > > Move the macros mentioned in the commit subject to their > > appropriate > > locations. > > Additionally, eliminate the depen

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

2024-02-09 Thread Oleksii
On Thu, 2024-02-08 at 17:42 +0100, Jan Beulich wrote: > On 02.02.2024 19:03, Oleksii Kurochko wrote: > > Move the macros mentioned in the commit subject to their > > appropriate > > locations. > > Additionally, eliminate the dependency of xen/lib.h from xen/bug.h >

Xen 4.19 release status tracking list

2024-02-05 Thread Oleksii Kurochko
rking on. Have a nice week! Best regards, Oleksii

[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

<    1   2   3   4   5   6   7   8   9   10   >