[PATCH v5 3/3] xen/ppc: mm-radix: Allocate all paging structures at runtime

2024-09-26 Thread Shawn Anastasio
size of the Process Table to its maximum supported value (on POWER9). Signed-off-by: Shawn Anastasio --- Changes in v5: - Add more clarification comments to min/max mfn variable decls. Changes in v4: - use mfn_add in initial_page_alloc() - zero pages returned by initial_page_alloc() xen

[PATCH v5 0/3] Early Boot Allocation on Power

2024-09-26 Thread Shawn Anastasio
wly-broken behavior in bootfdt.c regarding handling of DT reserved memory maps. Thanks, Shawn Shawn Anastasio (3): xen/device-tree: Let DT reserve map entries overlap reserved-memory xen/ppc: Enable bootfdt and boot allocator xen/ppc: mm-radix: Allocate all paging structures at runtime xe

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

2024-09-26 Thread Shawn Anastasio
ootinfo.reserved_mem") Signed-off-by: Shawn Anastasio --- xen/common/device-tree/bootfdt.c | 28 +++- xen/common/device-tree/bootinfo.c | 11 +-- xen/include/xen/bootfdt.h | 3 ++- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/xen/common/de

[PATCH v5 2/3] xen/ppc: Enable bootfdt and boot allocator

2024-09-26 Thread Shawn Anastasio
when booted directly from skiboot. Since this means that Xen can now boot without a BOOTMOD_FDT present in bootinfo, clarify this fact in a comment above BOOTMOD_FDT's definition. Signed-off-by: Shawn Anastasio Acked-by: Julien Grall --- Changes in v5: - Drop setup.c's unnecessary `boo

Re: [PATCH v4 6/6] xen/ppc: mm-radix: Allocate all paging structures at runtime

2024-09-26 Thread Shawn Anastasio
Hi Jan, I'm revisiting this series and wanted to follow up on your comments. On 4/24/24 9:46 AM, Jan Beulich wrote: > On 12.04.2024 05:55, Shawn Anastasio wrote: >> +/* >> + * A thin wrapper for alloc_boot_pages that keeps track of the maximum and >> + * minimum mfn

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

2024-09-19 Thread Shawn Anastasio
Hi Oleksii, On 9/17/24 11:15 AM, Oleksii Kurochko wrote: > Introduce conditional macros to define device > information sections based on the configuration of ACPI > or device tree support. These sections are required for > common code of device initialization and getting an information > about a d

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

2024-09-19 Thread Shawn Anastasio
s, which leaves the actual section declaration here in xen.lds.S and just uses the macro to fill in the definition. Whether or not that route is ultimately taken though, this change is fine from the PPC end of things: Acked-by: Shawn Anastasio Thanks, Shawn

Re: [PATCH 2/2] ppc/shutdown: Implement machine_{halt,restart}()

2024-07-08 Thread Shawn Anastasio
ents(NULL); > + > +} while ( rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT ); > + > +for ( ;; ) > +opal_poll_events(NULL); > +} > + Other than that, looks great. Reviewed-by: Shawn Anastasio Thanks, Shawn

Re: [PATCH for-4.19] ppc/riscv: fix arch_acquire_resource_check()

2024-05-05 Thread Shawn Anastasio
x27;xen/ppc: Define minimal stub headers required for full > build') > Signed-off-by: Roger Pau Monné > --- This makes sense to me. This stub implementation was definitely an oversight on my part. Acked-by: Shawn Anastasio Thanks, Shawn

Re: [PATCH v2 01/13] ppc/boot: Run constructors on boot

2024-05-29 Thread Shawn Anastasio
Hi Andrew, On 5/24/24 3:03 PM, Andrew Cooper wrote: > PPC collects constructors, but doesn't run them yet. Do so. > > They'll shortly be used to confirm correct behaviour of the bitops primitives. > > Signed-off-by: Andrew Cooper > --- Looks good to me. Acked-

Re: [PATCH 1/2] arch/irq: Make irq_ack_none() mandatory

2024-06-05 Thread Shawn Anastasio
stub irq_ack_none(). > > For ARM and x86, export the existing {ack,end}_none() helpers, gaining an irq_ > prefix for consisntency with everything else in no_irq_type. > > No functional change. > > Signed-off-by: Andrew Cooper For the PPC parts: Acked-by: Shawn Anastasio a Thanks, Shawn

Re: [PATCH 2/2] arch/irq: Centralise no_irq_type

2024-06-05 Thread Shawn Anastasio
o_irq_type into common/irq.c, and into .rodata for good > measure. > > No functional change, but a whole lot less tangled. > > Signed-off-by: Andrew Cooper Acked-by: Shawn Anastasio Thanks, Shawn

Re: [PATCH for-4.19] xen/arch: Centralise __read_mostly and __ro_after_init

2024-06-20 Thread Shawn Anastasio
e.h __read_mostly from the PPC tree should be a relatively simple follow up patch from my end. Acked-by: Shawn Anastasio Thanks, Shawn

Re: XenSummit: Empty per-arch files

2023-07-14 Thread Shawn Anastasio
On 6/28/23 6:32 AM, Andrew Cooper wrote: > Hello, Hi Andrew, > This wasn't a formal discussion point at XenSummit, but Oleksii pointed > out that it was still a problem, hence this thread. > > As we take on more architectures, it becomes more and more important for > things to be handled in a mo

Re: [PATCH v3 1/3] xen/ppc: Set up a basic C environment

2023-07-17 Thread Shawn Anastasio
On 7/17/23 10:38 AM, Jan Beulich wrote: > On 06.07.2023 21:04, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/include/asm/config.h >> +++ b/xen/arch/ppc/include/asm/config.h >> @@ -43,7 +43,7 @@ >> >> #define SMP_CACHE_BYTES (1 << 6) >> >&g

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Shawn Anastasio
On 7/17/23 11:17 AM, Jan Beulich wrote: > On 06.07.2023 21:04, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/Makefile >> +++ b/xen/arch/ppc/Makefile >> @@ -1,5 +1,7 @@ >> obj-$(CONFIG_PPC64) += ppc64/ >> >> +obj-y += boot-of.init.o >> +obj-$(CONFIG_

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Shawn Anastasio
Quick followup, On 7/17/23 1:32 PM, Shawn Anastasio wrote: > On 7/17/23 11:17 AM, Jan Beulich wrote: >> This could do with using ARRAY_SIZE(rets). Same again below. > > Sure, will do this. ARRAY_SIZE is defined in which can't yet be included due to missing headers. I could

Re: [PATCH v3 1/8] common: move a few macros out of xen/lib.h

2023-07-18 Thread Shawn Anastasio
ine PASTE_(a, b) a ## b > +#define PASTE(a, b) PASTE_(a, b) > + > +#define __STR(...) #__VA_ARGS__ > +#define STR(...) __STR(__VA_ARGS__) > + > +#endif /* __MACROS_H__ */ > + > +/* > + * Local variables: > + * mode: C > + * c-file-style: "BSD" > + * c-basic-offset: 4 > + * indent-tabs-mode: nil > + * End: > + */ Reviewed-by: Shawn Anastasio

[PATCH v4 0/4] Early serial on Power

2023-07-18 Thread Shawn Anastasio
ecessary braces for single-line statements - Remove unnecessary license text when SPDX header is present - Fix alphabetical ordering of object declarations in Makefile - Drop 'extern' from enter_of prototype, ensure prototypes have argument names Shawn Anastasio (4): common

[PATCH v4 4/4] automation: Add smoke test for ppc64le

2023-07-18 Thread Shawn Anastasio
Add an initial smoke test that boots xen on a ppc64/pseries machine and checks for a magic string. Based on the riscv smoke test. Eventually the powernv9 (POWER9 bare metal) machine type will want to be tested as well, but for now we only boot on pseries. Signed-off-by: Shawn Anastasio Reviewed

[PATCH v4 1/4] common: Move a few more standalone macros from xen/lib.h to xen/macros.h

2023-07-18 Thread Shawn Anastasio
Move a few more macros which have no dependencies on other headers from xen/lib.h to xen/macros.h. Notably, this includes BUILD_BUG_ON* and ARRAY_SIZE. --- xen/include/xen/lib.h| 28 xen/include/xen/macros.h | 32 2 files changed, 3

[PATCH v4 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-18 Thread Shawn Anastasio
in a future patch. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig.debug | 5 + xen/arch/ppc/Makefile | 2 + xen/arch/ppc/boot-of.c | 113 +++ xen/arch/ppc/configs/ppc64_defconfig| 1 + xen/arch/ppc/early_pri

[PATCH v4 2/4] xen/ppc: Set up a basic C environment

2023-07-18 Thread Shawn Anastasio
Update ppc64/head.S to set up an initial boot stack, zero the .bss section, and jump to C. Also refactor the endian fixup trampoline into its own macro, since it will need to be used in multiple places, including every time we make a call into firmware (see next commit). Signed-off-by: Shawn

Re: [PATCH v4 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-20 Thread Shawn Anastasio
On 7/19/23 9:05 AM, Jan Beulich wrote: > Before you/we grow more assembly code, may I re-raise a request regarding > readability: I think it would be nice if operands started at a fixed column, > unless the insn mnemonic is unusually long. Where exactly to draw the line > is up to each archtecture;

Re: [PATCH v4 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-21 Thread Shawn Anastasio
On 7/19/23 9:05 AM, Jan Beulich wrote: > On 18.07.2023 22:20, Shawn Anastasio wrote: >> +void __init boot_of_init(unsigned long vec) >> +{ >> +int bof_chosen; >> + >> +of_vec = vec; >> + >> +/* Get a handle to the default console *

[PATCH v5 1/4] common: Move a few more standalone macros from xen/lib.h to xen/macros.h

2023-07-21 Thread Shawn Anastasio
Move a few more macros which have no dependencies on other headers from xen/lib.h to xen/macros.h. Notably, this includes BUILD_BUG_ON* and ARRAY_SIZE. Signed-off-by: Shawn Anastasio Reviewed-by: Jan Beulich --- xen/include/xen/lib.h| 28 xen/include/xen

[PATCH v5 4/4] automation: Add smoke test for ppc64le

2023-07-21 Thread Shawn Anastasio
Add an initial smoke test that boots xen on a ppc64/pseries machine and checks for a magic string. Based on the riscv smoke test. Eventually the powernv9 (POWER9 bare metal) machine type will want to be tested as well, but for now we only boot on pseries. Signed-off-by: Shawn Anastasio Reviewed

[PATCH v5 2/4] xen/ppc: Set up a basic C environment

2023-07-21 Thread Shawn Anastasio
into firmware. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Makefile| 2 ++ xen/arch/ppc/include/asm/asm-defns.h | 40 xen/arch/ppc/include/asm/config.h| 2 +- xen/arch/ppc/ppc64/head.S| 38 +- xen/arch/ppc

[PATCH v5 0/4] Early serial on Power

2023-07-21 Thread Shawn Anastasio
dering of object declarations in Makefile - Drop 'extern' from enter_of prototype, ensure prototypes have argument names Shawn Anastasio (4): common: Move a few more standalone macros from xen/lib.h to xen/macros.h xen/ppc: Set up a basic C environment xen/ppc: Implement e

[PATCH v5 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-21 Thread Shawn Anastasio
in a future patch. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig.debug | 5 + xen/arch/ppc/Makefile | 2 + xen/arch/ppc/boot-of.c | 113 +++ xen/arch/ppc/configs/ppc64_defconfig| 1 + xen/arch/ppc/early_pri

Re: [PATCH v5 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-24 Thread Shawn Anastasio
On 7/24/23 7:40 AM, Jan Beulich wrote: > On 21.07.2023 19:02, Shawn Anastasio wrote: >> On typical Power VMs (e.g. QEMU's -M pseries), a variety of services >> including an early serial console are provided by Open Firmware. >> Implement the required interfaces to call in

Re: [PATCH v5 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-26 Thread Shawn Anastasio
On 7/26/23 10:32 AM, Jan Beulich wrote: > On 24.07.2023 17:06, Shawn Anastasio wrote: >> On 7/24/23 7:40 AM, Jan Beulich wrote: >>> On 21.07.2023 19:02, Shawn Anastasio wrote: >>>> On typical Power VMs (e.g. QEMU's -M pseries), a variety of services >>

Re: [PATCH v5 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-26 Thread Shawn Anastasio
On 7/26/23 10:45 AM, Jan Beulich wrote: > On 26.07.2023 17:42, Shawn Anastasio wrote: >> On 7/26/23 10:32 AM, Jan Beulich wrote: >>> On 24.07.2023 17:06, Shawn Anastasio wrote: >>>> On 7/24/23 7:40 AM, Jan Beulich wrote: >>>>> On 21.07.2023 19:02, Shawn

[PATCH 4/5] xen/ppc: Parse device tree for OPAL node on PowerNV

2023-07-28 Thread Shawn Anastasio
build doesn't yet work, but libfdt and its xen/lib dependency can be made to build by defining a few stub headers. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig | 1 + xen/arch/ppc/Makefile| 1 + xen/arch/ppc/arch.mk | 4 +-- xe

[PATCH 0/5] xen/ppc: Add PowerNV bare metal support

2023-07-28 Thread Shawn Anastasio
systems where this port is likely to be the most useful. In addition to adding support for the PowerNV boot protocol and firmware interface, changes required to get libfdt from xen/libfdt building are included. This is required to obtain the firmware entrypoint address on PowerNV. Thanks, Shawn Shawn

[PATCH 5/5] xen/ppc: Implement early serial console on PowerNV

2023-07-28 Thread Shawn Anastasio
Implement the OPAL firmware calls required to write to the serial console on PowerNV systems. Unlike pseries/Open Firmware, the OPAL firmware interface can be used past early boot and as such the relevant functions are not marked as __init. Signed-off-by: Shawn Anastasio --- xen/arch/ppc

[PATCH 2/5] xen/ppc: Switch to medium PIC code model

2023-07-28 Thread Shawn Anastasio
when the MMU is off. This prevents Open Firmware from loading Xen at an offset from its base load address, so the DECL_SECTION hack in xen.lds.S is no longer required. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/arch.mk | 2 +- xen/arch/ppc/include/asm/asm-defns.h | 7 +

[PATCH 3/5] xen/ppc: Add OPAL API definition header file

2023-07-28 Thread Shawn Anastasio
OPAL (OpenPower Abstraction Layer) is the interface exposed by firmware on PowerNV (bare metal) systems. Import Linux's header definining the API and related information. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/include/asm/opal-api.h | 1190 +++ 1 file ch

[PATCH 1/5] xen/lib: Move simple_strtoul from common/vsprintf.c to lib

2023-07-28 Thread Shawn Anastasio
Move the simple_strtoul routine which is used throughout the codebase from vsprintf.c to its own file in xen/lib. This allows libfdt to be built on ppc64 even though xen/common doesn't build yet. Signed-off-by: Shawn Anastasio --- xen/common/vsprintf.c

[PATCH 0/3] xen/ppc: Add early Radix MMU support

2023-07-28 Thread Shawn Anastasio
address is 0x0, we are able to run at the correct address both before and after the MMU is enabled. Additionally, as the Radix MMU was only added in ISA 3.0 (POWER9), this series also drops support for POWER8 for now, to avoid having a non-working build configuration in-tree. Thanks, Shawn Shawn

[PATCH 1/3] xen/ppc: Bump minimum target ISA to 3.0 (POWER9)

2023-07-28 Thread Shawn Anastasio
In preparation for implementing ISA3+ Radix MMU support, drop ISA 2.07B from the supported ISA list to avoid having a non-working configuration in tree. It can be re-added at a later point when Hash MMU support is added. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig | 7 +-- xen

[PATCH 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-07-28 Thread Shawn Anastasio
start execution at XEN_VIRT_START after the copy since hardware will ignore the top 4 address bits when operating in Real Mode (MMU off). Signed-off-by: Shawn Anastasio --- xen/arch/ppc/ppc64/head.S | 27 +++ 1 file changed, 27 insertions(+) diff --git a/xen/arch/ppc/ppc64

[PATCH 3/3] xen/ppc: Implement initial Radix MMU support

2023-07-28 Thread Shawn Anastasio
Add code to construct early identity-mapped page tables as well as the required process and partition tables to enable the MMU. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Makefile| 2 + xen/arch/ppc/include/asm/bitops.h| 11 ++ xen/arch/ppc/include/asm/mm.h

Re: [PATCH 1/5] xen/lib: Move simple_strtoul from common/vsprintf.c to lib

2023-07-31 Thread Shawn Anastasio
On 7/31/23 10:52 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> Move the simple_strtoul routine which is used throughout the codebase >> from vsprintf.c to its own file in xen/lib. >> >> This allows libfdt to be built on ppc64 even though xen/

Re: [PATCH 2/5] xen/ppc: Switch to medium PIC code model

2023-07-31 Thread Shawn Anastasio
On 7/31/23 10:58 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/ppc64/head.S >> +++ b/xen/arch/ppc/ppc64/head.S >> @@ -1,9 +1,11 @@ >> /* SPDX-License-Identifier: GPL-2.0-or-later */ >> >> #include >>

Re: [PATCH 3/5] xen/ppc: Add OPAL API definition header file

2023-07-31 Thread Shawn Anastasio
On 7/31/23 10:59 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> OPAL (OpenPower Abstraction Layer) is the interface exposed by firmware >> on PowerNV (bare metal) systems. Import Linux's header definining the >> API and related information. &g

Re: [PATCH 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-07-31 Thread Shawn Anastasio
On 7/31/23 10:46 AM, Jan Beulich wrote: > On 29.07.2023 00:21, Shawn Anastasio wrote: >> Introduce a small assembly loop in `start` to copy the kernel to >> physical address 0 before continuing. This ensures that the physical >> address lines up with XEN_VIRT_START (0xc00

Re: [PATCH] common: move simple_strto{,u}l{,l}() to lib/

2023-08-01 Thread Shawn Anastasio
meric digits. > > Requested-by: Shawn Anastasio > Signed-off-by: Jan Beulich > --- > Further changes I was considering: > - "value" doesn't need to be unsigned long, and even less so unsigned > long long, > - strtoull.c could simply include strtoul

Re: [PATCH 2/5] xen/ppc: Switch to medium PIC code model

2023-08-01 Thread Shawn Anastasio
On 8/1/23 7:20 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> @@ -11,16 +13,19 @@ ENTRY(start) >> FIXUP_ENDIAN >> >> /* set up the TOC pointer */ >> -LOAD_IMM32(%r2, .TOC.) >> +bcl 20, 31, .+4 >> +1:

Re: [PATCH 4/5] xen/ppc: Parse device tree for OPAL node on PowerNV

2023-08-01 Thread Shawn Anastasio
On 7/31/23 11:06 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/arch.mk >> +++ b/xen/arch/ppc/arch.mk >> @@ -10,5 +10,5 @@ CFLAGS += -mstrict-align -mcmodel=medium -mabi=elfv2 -fPIC >> -mno-altivec -mno-vsx >> LDFLAG

Re: [PATCH 5/5] xen/ppc: Implement early serial console on PowerNV

2023-08-01 Thread Shawn Anastasio
On 8/1/23 6:19 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/include/asm/asm-defns.h >> +++ b/xen/arch/ppc/include/asm/asm-defns.h >> @@ -23,6 +23,18 @@ >> addis reg,%r2,name@toc@ha;

[PATCH 0/4] xen/ppc: Add PowerNV bare metal support

2023-08-01 Thread Shawn Anastasio
ting of opal.c, opal-calls.S, asm-defns.h - Consistently use label in TOC address calculation in head.S Shawn Anastasio (4): xen/ppc: Switch to medium PIC code model xen/ppc: Add OPAL API definition header file xen/ppc: Parse device tree for OPAL node on PowerNV xen/ppc: Implement early seria

[PATCH 3/4] xen/ppc: Parse device tree for OPAL node on PowerNV

2023-08-01 Thread Shawn Anastasio
build doesn't yet work, but libfdt and its xen/lib dependency can be made to build by defining a few stub headers. Signed-off-by: Shawn Anastasio --- Changed in v2: - Remove ALL_LIBS-y override xen/arch/ppc/Kconfig | 1 + xen/arch/ppc/Makefile| 1 + xe

[PATCH 4/4] xen/ppc: Implement early serial console on PowerNV

2023-08-01 Thread Shawn Anastasio
Implement the OPAL firmware calls required to write to the serial console on PowerNV systems. Unlike pseries/Open Firmware, the OPAL firmware interface can be used past early boot and as such the relevant functions are not marked as __init. Signed-off-by: Shawn Anastasio --- Changed in v2

[PATCH 2/4] xen/ppc: Add OPAL API definition header file

2023-08-01 Thread Shawn Anastasio
OPAL (OpenPower Abstraction Layer) is the interface exposed by firmware on PowerNV (bare metal) systems. Import Linux's header definining the API and related information. >From Linux commit 5321d1b1afb9a17302c6cec79f0cbf823eb0d3fc Signed-off-by: Shawn Anastasio --- Changed in v2: - A

[PATCH 1/4] xen/ppc: Switch to medium PIC code model

2023-08-01 Thread Shawn Anastasio
when the MMU is off. This prevents Open Firmware from loading Xen at an offset from its base load address, so the DECL_SECTION hack in xen.lds.S is no longer required. Signed-off-by: Shawn Anastasio --- Changed in v2: - Remove stray newline - Use label instead of .+4 in TOC setup branch xen

Re: [PATCH 0/4] xen/ppc: Add PowerNV bare metal support

2023-08-01 Thread Shawn Anastasio
On 8/1/23 7:11 PM, Shawn Anastasio wrote: > Hello all, Apologies, the subject should indicate that this is a v2 but I forgot to pass the appropriate argument to git-send-email. Thanks, Shawn

[PATCH 1/9] xen/common: Add missing #includes treewide

2023-08-02 Thread Shawn Anastasio
A few files treewide depend on defininitions in headers that they don't include. This works when arch headers end up including the required headers by chance, but broke on ppc64 with only minimal/stub arch headers. Signed-off-by: Shawn Anastasio --- xen/common/memory.c | 1 + xen/c

[PATCH 4/9] xen/ppc: Implement bitops.h

2023-08-02 Thread Shawn Anastasio
Implement bitops.h, based on Linux's implementation as of commit 5321d1b1afb9a17302c6cec79f0cbf823eb0d3fc Signed-off-by: Shawn Anastasio --- xen/arch/ppc/include/asm/bitops.h | 331 +- 1 file changed, 327 insertions(+), 4 deletions(-) diff --git a/xen/arc

[PATCH 3/9] xen/ppc: Implement atomic.h

2023-08-02 Thread Shawn Anastasio
Implement atomic.h for PPC, based off of the original Xen 3.2 implementation. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/include/asm/atomic.h | 387 ++ xen/arch/ppc/include/asm/memory.h | 34 +++ 2 files changed, 421 insertions(+) create mode 100644 xen/arch

[PATCH 2/9] xen/ppc: Add public/arch-ppc.h

2023-08-02 Thread Shawn Anastasio
Signed-off-by: Shawn Anastasio --- xen/include/public/arch-ppc.h | 140 ++ 1 file changed, 140 insertions(+) create mode 100644 xen/include/public/arch-ppc.h diff --git a/xen/include/public/arch-ppc.h b/xen/include/public/arch-ppc.h new file mode 100644 index

[PATCH 0/9] ppc: Enable full Xen build

2023-08-02 Thread Shawn Anastasio
just call BUG(). A few miscellaneous changes were also made to non-ppc code as well, namely a few missing header fixes as well as an ARM-ism in the ns16550 driver. Thanks, Shawn Shawn Anastasio (9): xen/common: Add missing #includes treewide xen/ppc: Add public/arch-ppc.h xen/ppc: Implement

[PATCH 8/9] xen/ppc: Add stub function and symbol definitions

2023-08-02 Thread Shawn Anastasio
Add stub function and symbol definitions required by common code. If the file that the definition is supposed to be located in doesn't already exist yet, temporarily place its definition in the new stubs.c Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Makefile | 1 + xen/arch/p

[PATCH 6/9] ns16550: Guard accesses to `vuart` field by CONFIG_ARM

2023-08-02 Thread Shawn Anastasio
ff-by: Shawn Anastasio --- xen/drivers/char/ns16550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 212a9c49ae..c0598efb27 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -1797,11 +1797,13 @@ static int _

[PATCH 7/9] xen/ppc: Define bug frames table in linker script

2023-08-02 Thread Shawn Anastasio
Define the bug frames table in ppc's linker script as is done by other architectures. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/xen.lds.S | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S index 2fa81d5a83..692aa34add 1

[PATCH 5/9] xen/ppc: Define minimal stub headers required for full build

2023-08-02 Thread Shawn Anastasio
Additionally, change inclusion of asm/ headers to corresponding xen/ ones throughout arch/ppc now that they work. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig | 1 + xen/arch/ppc/include/asm/altp2m.h| 39 xen/arch/ppc/include/asm/bug.h

[PATCH 9/9] xen/ppc: Enable full Xen build

2023-08-02 Thread Shawn Anastasio
Bring ppc's Makefile and arch.mk in line with arm and x86 to disable the build overrides and enable the full Xen build. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Makefile | 16 +++- xen/arch/ppc/arch.mk | 3 --- 2 files changed, 15 insertions(+), 4 deletions(-) diff --

Re: [PATCH 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-08-03 Thread Shawn Anastasio
On 8/1/23 1:08 AM, Jan Beulich wrote: > On 01.08.2023 01:37, Shawn Anastasio wrote: >> On 7/31/23 10:46 AM, Jan Beulich wrote: >>> On 29.07.2023 00:21, Shawn Anastasio wrote: >>>> +/* If we're at the correct address, skip copy */ >>>> +cmpld

Re: [PATCH 4/4] xen/ppc: Implement early serial console on PowerNV

2023-08-07 Thread Shawn Anastasio
On 8/7/23 10:05 AM, Jan Beulich wrote: > On 02.08.2023 02:11, Shawn Anastasio wrote: >> Implement the OPAL firmware calls required to write to the serial >> console on PowerNV systems. Unlike pseries/Open Firmware, the OPAL >> firmware interface can be used past early boot and

Re: [PATCH 1/4] xen/ppc: Switch to medium PIC code model

2023-08-07 Thread Shawn Anastasio
On 8/2/23 2:16 AM, Jan Beulich wrote: > On 02.08.2023 02:11, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/include/asm/asm-defns.h >> +++ b/xen/arch/ppc/include/asm/asm-defns.h >> @@ -16,6 +16,13 @@ >> lis reg, (val) @h;

Re: [PATCH 1/9] xen/common: Add missing #includes treewide

2023-08-08 Thread Shawn Anastasio
On 8/7/23 10:39 AM, Jan Beulich wrote: > On 03.08.2023 01:02, Shawn Anastasio wrote: >> A few files treewide depend on defininitions in headers that they >> don't include. This works when arch headers end up including the >> required headers by chance, but broke on pp

Re: [PATCH 2/9] xen/ppc: Add public/arch-ppc.h

2023-08-08 Thread Shawn Anastasio
On 8/7/23 10:51 AM, Jan Beulich wrote: > On 03.08.2023 01:02, Shawn Anastasio wrote: >> Signed-off-by: Shawn Anastasio >> --- >> xen/include/public/arch-ppc.h | 140 ++ >> 1 file changed, 140 insertions(+) >> create mode 100

Re: [PATCH 3/9] xen/ppc: Implement atomic.h

2023-08-08 Thread Shawn Anastasio
On 8/7/23 11:13 AM, Jan Beulich wrote: > On 03.08.2023 01:02, Shawn Anastasio wrote: >> Implement atomic.h for PPC, based off of the original Xen 3.2 >> implementation. > > Since likely that originally came from Linux, did you cross check that > Linux hasn't gained

Re: [PATCH 4/9] xen/ppc: Implement bitops.h

2023-08-08 Thread Shawn Anastasio
On 8/8/23 3:36 AM, Jan Beulich wrote: > On 03.08.2023 01:03, Shawn Anastasio wrote: >> Implement bitops.h, based on Linux's implementation as of commit >> 5321d1b1afb9a17302c6cec79f0cbf823eb0d3fc > > But with PPC32 bits dropped afaics, and with leading hard tabs replace

Re: [PATCH 5/9] xen/ppc: Define minimal stub headers required for full build

2023-08-09 Thread Shawn Anastasio
On 8/8/23 4:12 AM, Jan Beulich wrote: > On 03.08.2023 01:03, Shawn Anastasio wrote: >> --- /dev/null >> +++ b/xen/arch/ppc/include/asm/altp2m.h >> @@ -0,0 +1,39 @@ >> +/* >> + * Alternate p2m >> + * >> + * Copyright (c) 2014, Intel Corporation. >>

Re: [PATCH 3/3] xen/ppc: Implement initial Radix MMU support

2023-08-09 Thread Shawn Anastasio
On 8/1/23 8:18 AM, Jan Beulich wrote: > On 29.07.2023 00:21, Shawn Anastasio wrote: >> --- /dev/null >> +++ b/xen/arch/ppc/include/asm/bitops.h >> @@ -0,0 +1,11 @@ >> +#ifndef _ASM_PPC_BITOPS_H >> +#define _ASM_PPC_BITOPS_H >> + >> +#include > &g

[PATCH v2 0/3] xen/ppc: Add early Radix MMU support

2023-08-09 Thread Shawn Anastasio
address is 0x0, we are able to run at the correct address both before and after the MMU is enabled. Additionally, as the Radix MMU was only added in ISA 3.0 (POWER9), this series also drops support for POWER8 for now, to avoid having a non-working build configuration in-tree. Thanks, Shawn Shawn

[PATCH v2 1/3] xen/ppc: Bump minimum target ISA to 3.0 (POWER9)

2023-08-09 Thread Shawn Anastasio
In preparation for implementing ISA3+ Radix MMU support, drop ISA 2.07B from the supported ISA list to avoid having a non-working configuration in tree. It can be re-added at a later point when Hash MMU support is added. Signed-off-by: Shawn Anastasio --- v2: no changes. xen/arch/ppc/Kconfig

[PATCH v2 3/3] xen/ppc: Implement initial Radix MMU support

2023-08-09 Thread Shawn Anastasio
Add code to construct early identity-mapped page tables as well as the required process and partition tables to enable the MMU. Signed-off-by: Shawn Anastasio --- v2: - Add missing ')' to mm.h/maddr_to_virt definition - Add missing parens around `va` argument in XEN_PT_INDEX_LV

[PATCH v2 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-08-09 Thread Shawn Anastasio
start execution at XEN_VIRT_START after the copy since hardware will ignore the top 4 address bits when operating in Real Mode (MMU off). Signed-off-by: Shawn Anastasio --- v2: - Fix definition of XEN_VIRT_START macro which incorrectly used _AT instead of _AC. - Use _start instead of start

[PATCH v3 1/3] xen/ppc: Bump minimum target ISA to 3.0 (POWER9)

2023-08-09 Thread Shawn Anastasio
In preparation for implementing ISA3+ Radix MMU support, drop ISA 2.07B from the supported ISA list to avoid having a non-working configuration in tree. It can be re-added at a later point when Hash MMU support is added. Signed-off-by: Shawn Anastasio --- v3: no changes. v2: no changes. xen

[PATCH v3 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-08-09 Thread Shawn Anastasio
start execution at XEN_VIRT_START after the copy since hardware will ignore the top 4 address bits when operating in Real Mode (MMU off). Signed-off-by: Shawn Anastasio --- v3: no changes. v2: - Fix definition of XEN_VIRT_START macro which incorrectly used _AT instead of _AC. - Use _start

[PATCH v3 0/3] xen/ppc: Add early Radix MMU support

2023-08-09 Thread Shawn Anastasio
also drops support for POWER8 for now, to avoid having a non-working build configuration in-tree. Thanks, Shawn Shawn Anastasio (3): xen/ppc: Bump minimum target ISA to 3.0 (POWER9) xen/ppc: Relocate kernel to physical address 0 on boot xen/ppc: Implement initial Radix MMU support xen/arch

[PATCH v3 3/3] xen/ppc: Implement initial Radix MMU support

2023-08-09 Thread Shawn Anastasio
Add code to construct early identity-mapped page tables as well as the required process and partition tables to enable the MMU. Signed-off-by: Shawn Anastasio --- v3: - Add XEN_PT_SIZE_LVL() macro for calculating the size in bytes of a page directory/page table structure. - Add alignment

[PATCH 0/3] Initial support for Power

2023-06-07 Thread Shawn Anastasio
-m 256M -kernel xen/ppc64/head.o \ -vga none -serial mon:stdio -nographic Thanks, Shawn Shawn Anastasio (3): xen: Add files needed for minimal Power build xen/ppc: Implement early serial printk on PaPR/pseries maintainers: Add PPC64 maintainer MAINTAINERS

[PATCH 3/3] maintainers: Add PPC64 maintainer

2023-06-07 Thread Shawn Anastasio
Signed-off-by: Shawn Anastasio --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1bb7a6a839..bcd36f9019 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -451,6 +451,9 @@ M: Wei Liu S: Supported T: git https://xenbits.xenproject.org

[PATCH 1/3] xen: Add files needed for minimal Power build

2023-06-07 Thread Shawn Anastasio
similar enough for reuse. Signed-off-by: Shawn Anastasio --- config/ppc64.mk | 5 + xen/Makefile | 5 +- xen/arch/ppc/Kconfig | 42 + xen/arch/ppc/Kconfig.debug | 0 xen/arch/ppc/Makefile

[PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries

2023-06-07 Thread Shawn Anastasio
patch. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig.debug | 5 + xen/arch/ppc/Makefile| 3 +- xen/arch/ppc/boot_of.c | 122 +++ xen/arch/ppc/configs/openpower_defconfig | 1 + xen/arch/ppc/early_pri

Re: [PATCH 0/3] Initial support for Power

2023-06-07 Thread Shawn Anastasio
On Wed Jun 7, 2023 at 1:07 PM CDT, Andrew Cooper wrote: > Oh wow - this is a surprise, but certainly a good one. I'm glad to hear that! > We've recently done just a similar exercise with RISCV64, starting with > getting cross-compilation and a basic smoke test into our CI. I see. I used the init

Re: [PATCH 0/3] Initial support for Power

2023-06-08 Thread Shawn Anastasio
On Wed Jun 7, 2023 at 2:30 PM CDT, Andrew Cooper wrote: > Ok, in which case you probably want a first patch series doing: > > 1) New docker container (only - this wants to be taken early and set up > in CI) > 2) one-or-more initial build system + head.S infinite loop patch.  > Probably the maintain

Re: [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries

2023-06-09 Thread Shawn Anastasio
On Fri Jun 9, 2023 at 5:12 AM CDT, Julien Grall wrote: > Strictly speaking we can refuse any code. That count for license as > well. Anyway, I didn't request a change here. I merely pointed out that > any use of GPLv2+ should be justified because on Arm most of the people > don't pay attention o

Re: [PATCH 1/3] xen: Add files needed for minimal Power build

2023-06-09 Thread Shawn Anastasio
On Fri Jun 9, 2023 at 4:15 AM CDT, Jan Beulich wrote: > > --- /dev/null > > +++ b/config/ppc64.mk > > @@ -0,0 +1,5 @@ > > +CONFIG_PPC64 := y > > +CONFIG_PPC64_64 := y > > +CONFIG_PPC64_$(XEN_OS) := y > > The first of the 64-s here are a little odd; looking at RISC-V's > counterpart, wouldn't this w

Re: [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries

2023-06-09 Thread Shawn Anastasio
On Fri Jun 9, 2023 at 4:22 AM CDT, Jan Beulich wrote: > > xen/arch/ppc/Kconfig.debug | 5 + > > xen/arch/ppc/Makefile| 3 +- > > xen/arch/ppc/boot_of.c | 122 +++ > > xen/arch/ppc/configs/openpower_defconfig | 1 + > > x

Re: [PATCH 3/3] maintainers: Add PPC64 maintainer

2023-06-09 Thread Shawn Anastasio
On Fri Jun 9, 2023 at 4:04 AM CDT, Jan Beulich wrote: > On 07.06.2023 17:06, Shawn Anastasio wrote: > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -451,6 +451,9 @@ M: Wei Liu > > S: Supported > > T: git https://xenbits.xenproject.org/git-http/ovmf.g

Re: [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries

2023-06-09 Thread Shawn Anastasio
On Fri Jun 9, 2023 at 11:07 AM CDT, Julien Grall wrote: > Thanks for the explanations. To clarify, are you saying that all the > files will be GPLv2+ or just some? My idea was to license any file where I expect there to derivations from existing code as GPLv2+, and fall back to GPLv2-only for new

[PATCH v2 0/4] Initial support for Power

2023-06-12 Thread Shawn Anastasio
headers from minimal build patch - Fixed ordering of MAINTAINERS patch + add F: line - Fix config/ppc64.mk option names - Clarify Kconfig Baseline ISA option help strings Shawn Anastasio (4): automation: Add container for ppc64le builds xen: Add files needed for minimal ppc64le build

[PATCH v2 2/4] xen: Add files needed for minimal ppc64le build

2023-06-12 Thread Shawn Anastasio
Endian mode specifically, and does not boot on older machines. Additionally, this initial skeleton only implements the PaPR/pseries boot protocol which allows it to be booted in a standard QEMU virtual machine: $ qemu-system-ppc64 -M pseries-5.2 -m 256M -kernel xen/xen Signed-off-by: Shawn

[PATCH v2 3/4] automation: Add ppc64le cross-build jobs

2023-06-12 Thread Shawn Anastasio
Add build jobs to cross-compile Xen for ppc64le. Signed-off-by: Shawn Anastasio --- automation/gitlab-ci/build.yaml | 60 + 1 file changed, 60 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 420ffa5acb

[PATCH v2 1/4] automation: Add container for ppc64le builds

2023-06-12 Thread Shawn Anastasio
Add a container for cross-compiling xen for ppc64le. Signed-off-by: Shawn Anastasio --- .../build/debian/bullseye-ppc64le.dockerfile | 28 +++ automation/scripts/containerize | 1 + 2 files changed, 29 insertions(+) create mode 100644 automation/build/debian

[PATCH v2 4/4] maintainers: Add ppc64 maintainer

2023-06-12 Thread Shawn Anastasio
Signed-off-by: Shawn Anastasio --- MAINTAINERS | 4 1 file changed, 4 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1bb7a6a839..8966175400 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6 +460,10 @@ X: xen/arch/x86/acpi/lib.c F: xen/drivers/cpufreq/ F: xen

  1   2   3   4   >