Re: [PATCH v9 5/5] xen/riscv: remove dummy_bss variable

2023-05-30 Thread Bobby Eshleman
t; __aligned(STACK_SIZE); > > -/* > - * To be sure that .bss isn't zero. It will simplify code of > - * .bss initialization. > - * TODO: > - * To be deleted when the first real .bss user appears > - */ > -int dummy_bss __attribute__((unused)); > - > void __init noreturn start_xen(unsigned long bootcpu_id, > paddr_t dtb_addr) > { > -- > 2.40.1 > > Acked-by: Bobby Eshleman

Re: [PATCH v9 2/5] xen/riscv: introduce setup_initial_pages

2023-05-30 Thread Bobby Eshleman
an exception and jump to linker time addresses. > + * Otherwise if load addresses are equal to linker addresses the code > + * after mmu_is_enabled label will be executed without exception. > + */ > +csr_write(CSR_STVEC, LOAD_TO_LINK((unsigned long)&_is_enabled)); > + > +/* Ensure page table writes precede loading the SATP */ > +sfence_vma(); > + > +/* Enable the MMU and load the new pagetable for Xen */ > +csr_write(CSR_SATP, > + PFN_DOWN((unsigned long)stage1_pgtbl_root) | > + RV_STAGE1_MODE << SATP_MODE_SHIFT); > + > +asm volatile ( ".p2align 2" ); > + mmu_is_enabled: > +/* > + * Stack should be re-inited as: > + * 1. Right now an address of the stack is relative to load time > + *addresses what will cause an issue in case of load start address > + *isn't equal to linker start address. > + * 2. Addresses in stack are all load time relative which can be an > + *issue in case when load start address isn't equal to linker > + *start address. > + * > + * We can't return to the caller because the stack was reseted > + * and it may have stash some variable on the stack. > + * Jump to a brand new function as the stack was reseted > + */ > + > +switch_stack_and_jump((unsigned long)cpu0_boot_stack + STACK_SIZE, > + cont_after_mmu_is_enabled); > +} > + > diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c > index 3786f337e0..315804aa87 100644 > --- a/xen/arch/riscv/setup.c > +++ b/xen/arch/riscv/setup.c > @@ -2,6 +2,7 @@ > #include > > #include > +#include > > /* Xen stack for bringing up the first CPU. */ > unsigned char __initdata cpu0_boot_stack[STACK_SIZE] > @@ -26,3 +27,13 @@ void __init noreturn start_xen(unsigned long bootcpu_id, > > unreachable(); > } > + > +void __init noreturn cont_after_mmu_is_enabled(void) > +{ > +early_printk("All set up\n"); > + > +for ( ;; ) > +asm volatile ("wfi"); > + > +unreachable(); > +} > diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S > index 31e0d3576c..fe475d096d 100644 > --- a/xen/arch/riscv/xen.lds.S > +++ b/xen/arch/riscv/xen.lds.S > @@ -172,3 +172,6 @@ ASSERT(IS_ALIGNED(__bss_end,POINTER_ALIGN), > "__bss_end is misaligned") > > ASSERT(!SIZEOF(.got), ".got non-empty") > ASSERT(!SIZEOF(.got.plt), ".got.plt non-empty") > + > +ASSERT(_end - _start <= MB(2), "Xen too large for early-boot assumptions") > + > -- > 2.40.1 > > LGTM. Nice code to boot! Acked-by: Bobby Eshleman

Re: [PATCH v9 3/5] xen/riscv: align __bss_start

2023-05-30 Thread Bobby Eshleman
. = ALIGN(POINTER_ALIGN); > __bss_start = .; > *(.bss.stack_aligned) > -. = ALIGN(PAGE_SIZE); > *(.bss.page_aligned) > . = ALIGN(PAGE_SIZE); > __per_cpu_start = .; > -- > 2.40.1 > > Acked-by: Bobby Eshleman

Re: [PATCH v9 4/5] xen/riscv: setup initial pagetables

2023-05-30 Thread Bobby Eshleman
/arch/riscv/setup.c > +++ b/xen/arch/riscv/setup.c > @@ -21,7 +21,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id, > { > early_printk("Hello from C env\n"); > > -early_printk("All set up\n"); > +setup_initial_pagetables(); > + > +enable_mmu(); > + > for ( ;; ) > asm volatile ("wfi"); > > -- > 2.40.1 > > Acked-by: Bobby Eshleman

Re: [PATCH v9 1/5] xen/riscv: add VM space layout

2023-05-30 Thread Bobby Eshleman
... | 194 GB | L2 0 - 193 | Unused > + * > > + * > +#endif > + */ > + > #if defined(CONFIG_RISCV_64) > # define LONG_BYTEORDER 3 > # define ELFSIZE 64 > -- > 2.40.1 > > Acked-by: Bobby Eshleman

Re: [PATCH v3 3/3] xen/riscv: initialize .bss section

2023-03-16 Thread Bobby Eshleman
> + * To be deleted when the first real .bss user appears > + */ > +int dummy_bss __attribute__((unused)); > + > void __init noreturn start_xen(unsigned long bootcpu_id, > unsigned long dtb_base) > { > -- > 2.39.0 > > Reviewed-by: Bobby Eshleman

Re: [PATCH v3 2/3] xen/riscv: read/save hart_id and dtb_base passed by bootloader

2023-03-16 Thread Bobby Eshleman
SIZE] > __aligned(STACK_SIZE); > > -void __init noreturn start_xen(void) > +void __init noreturn start_xen(unsigned long bootcpu_id, > + unsigned long dtb_base) > { > early_printk("Hello from C env\n"); > > -- > 2.39.0 > > Reviewed-by: Bobby Eshleman

Re: [PATCH v3 1/3] xen/riscv: disable fpu

2023-03-16 Thread Bobby Eshleman
t0, STACK_SIZE > add sp, sp, t0 > -- > 2.39.0 > > My last email had the wrong trailer: Reviewed-by: Bobby Eshleman

Re: [PATCH v3 1/3] xen/riscv: disable fpu

2023-03-16 Thread Bobby Eshleman
t0, STACK_SIZE > add sp, sp, t0 > -- > 2.39.0 > > Acked-by: Bobby Eshleman

Re: [PATCH v1] xen/riscv: make calculation of stack address PC-relative

2023-03-14 Thread Bobby Eshleman
sp, cpu0_boot_stack > +lla sp, cpu0_boot_stack > li t0, STACK_SIZE > add sp, sp, t0 > > -- > 2.39.2 > > Reviewed-by: Bobby Eshleman

Re: [PATCH v3 0/3] Do basic initialization things

2023-03-04 Thread Bobby Eshleman
I just wanted to let you know I have this queued up to review, I’ve just been very overloaded. I’ll give these a review in the coming week. Best, Bobby On Fri, Mar 3, 2023 at 2:24 AM Oleksii Kurochko wrote: > The patch series groups and updates the following patches: > 1. xen/riscv: disable

Re: [PATCH v7 1/2] xen/riscv: introduce early_printk basic stuff

2023-02-01 Thread Bobby Eshleman
On Wed, Feb 01, 2023 at 09:06:21AM +, Julien Grall wrote: > Hi Andrew, > > On 01/02/2023 00:21, Andrew Cooper wrote: > > On 31/01/2023 11:17 pm, Alistair Francis wrote: > > > On Tue, Jan 31, 2023 at 10:03 PM Julien Grall wrote: > > > > On 31/01/2023 11:44, Alistair Francis wrote: > > > > >

Re: [RISC-V] Switch to H-mode

2023-01-23 Thread Bobby Eshleman
On Mon, Jan 23, 2023 at 11:09:13PM +, Andrew Cooper wrote: > On 19/01/2023 1:05 pm, Bobby Eshleman wrote: > > On Mon, Jan 23, 2023 at 06:56:19PM +0200, Oleksii wrote: > >> Hi Alistair and community, > >> > >> I am working on RISC-V support upstream for Xen

Re: [RISC-V] Switch to H-mode

2023-01-23 Thread Bobby Eshleman
On Mon, Jan 23, 2023 at 06:56:19PM +0200, Oleksii wrote: > Hi Alistair and community, > > I am working on RISC-V support upstream for Xen based on your and Bobby > patches. > > Adding the RISC-V support I realized that Xen is ran in S-mode. Output > of OpenSBI: > ... > Domain0 Next Mode

Re: [PATCH v4 3/4] xen/riscv: introduce early_printk basic stuff

2023-01-17 Thread Bobby Eshleman
the basic stuff of early_printk functionality > which will be enough to print 'hello from C environment". > > Originally early_printk.{c,h} was introduced by Bobby Eshleman > (https://github.com/glg-rv/xen/commit/a3c9916bbdff7ad6030055bbee7e53d1aab71384) > but some functionality was

Re: [PATCH v4 2/4] xen/riscv: introduce sbi call to putchar to console

2023-01-17 Thread Bobby Eshleman
On Mon, Jan 16, 2023 at 04:39:30PM +0200, Oleksii Kurochko wrote: > From: Bobby Eshleman > > Originally SBI implementation for Xen was introduced by > Bobby Eshleman but it was removed > all the stuff for simplicity except SBI call for putting > character to console. > &

Re: [PATCH v2 6/8] xen/riscv: introduce early_printk basic stuff

2023-01-09 Thread Bobby Eshleman
-y += sbi.o > > obj-y += setup.o > > diff --git a/xen/arch/riscv/early_printk.c > b/xen/arch/riscv/early_printk.c > > new file mode 100644 > > index 00..88da5169ed > > --- /dev/null > > +++ b/xen/arch/riscv/early_printk.c > > @@ -0,0 +1,33

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-06 Thread Bobby Eshleman
On Fri, Jan 06, 2023 at 05:16:31PM +, Andrew Cooper wrote: > On 20/12/2022 6:23 am, Bobby Eshleman wrote: > > On Fri, Jan 06, 2023 at 03:14:25PM +0200, Oleksii Kurochko wrote: > >> The patch introduce sbi_putchar() SBI call which is necessary > >> to implement init

Re: [PATCH v1 4/8] xen/riscv: introduce sbi call to putchar to console

2023-01-06 Thread Bobby Eshleman
b/xen/arch/riscv/include/asm/sbi.h > @@ -0,0 +1,34 @@ > +/* SPDX-License-Identifier: (GPL-2.0-or-later) */ > +/* > + * Copyright (c) 2021 Vates SAS. > + * > + * Taken from xvisor, modified by Bobby Eshleman (bobby.eshle...@gmail.com). > + * > + * Taken/modified from Xvisor

Re: [XEN v3] Xen: Ensure "xenheap_bits - PAGE_SHIFT" can be used as a rhs operand of shift operator

2022-12-02 Thread Bobby Eshleman
On Fri, Dec 02, 2022 at 12:56:06PM +, Andrew Cooper wrote: > On 02/12/2022 12:35, Ayan Kumar Halder wrote: > > Currently this change will not have any impact on the existing > > architectures. > > The following table illustrates PADDR_BITS vs BITS_PER_LONG of different > > archs > > > >

Re: Arch-neutral name for hardware interrupt support

2021-11-01 Thread Bobby Eshleman
On Mon, Nov 01, 2021 at 10:47:26AM +, Andrew Cooper wrote: > Hello, > > On ARM, the GIC is a hard prerequisite for VMs. > > I can't remember what the state of RISCV is, but IIRC there is still > some debate over how interrupts are expected to work under virt. > Yes sir, that addition to

[PATCH v4 6/6] x86: change asm/debugger.h to xen/debugger.h

2021-09-28 Thread Bobby Eshleman
it is no longer required, arm/debugger.h is removed. Signed-off-by: Bobby Eshleman --- Changes in v4: - Replace #include with `struct cpu_user_regs` xen/arch/x86/traps.c | 1 + xen/common/domain.c| 2 +- xen/common/gdbstub.c | 2 +- xen/common/keyhandler.c

[PATCH v4 5/6] arch/x86: move domain_pause_for_debugger() to domain.h

2021-09-28 Thread Bobby Eshleman
domain_pause_for_debugger() was previously in debugger.h. This commit moves it to domain.h because its implementation is in domain.c. Signed-off-by: Bobby Eshleman --- Changes in v3: - domain_pause_for_debugger() is now moved into debugger.h, not a new file debugger.c Changes in v4: - Don't

[PATCH v4 4/6] x86/gdbsx: expand dbg_rw_mem() inline

2021-09-28 Thread Bobby Eshleman
Because dbg_rw_mem() has only a single call site, this commit expands it inline. Signed-off-by: Bobby Eshleman --- Changes in v4: - Add DCO xen/arch/x86/gdbsx.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/gdbsx.c b/xen/arch

[PATCH v4 3/6] arch/x86: rename debug.c to gdbsx.c

2021-09-28 Thread Bobby Eshleman
adds a stub that would preserve the functioning of that call site if the #ifdef CONFIG_GDBSX were to ever be removed or the function were to ever be called outside of such an ifdef block. Signed-off-by: Bobby Eshleman --- Changes in v4: - Alphebetize Makefile addition - Fix broken header guard

[PATCH v4 2/6] x86/debugger: separate Xen and guest debugging debugger_trap_* functions

2021-09-28 Thread Bobby Eshleman
of debugger_trap_entry() are removed completely (when the trapnr is not int3/debug). This commit is one of a series geared towards removing the unnecessary requirement that all architectures to implement . Signed-off-by: Bobby Eshleman --- Changes in v4: - Reword commit message for accuracy (make

[PATCH v4 1/6] arm/traps: remove debugger_trap_fatal() calls

2021-09-28 Thread Bobby Eshleman
ARM doesn't actually use debugger_trap_* anything, and is stubbed out. This commit simply removes the unneeded calls. Signed-off-by: Bobby Eshleman --- xen/arch/arm/traps.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 4ccb6e7d18

[PATCH v4 0/6] Remove unconditional arch dependency on asm/debugger.h

2021-09-28 Thread Bobby Eshleman
!CONFIG_CRASH_DEBUG - Adds stronger separation between gdbstub, gdbsx, and generic debugger code. v4 simply includes the review feedback from v3 with no other big changes (as was the case for v3 in comparison to v2). Bobby Eshleman (6): arm/traps: remove debugger_trap_fatal() calls x86/debugger

Re: [PATCH v3 3/6] arch/x86: rename debug.c to gdbsx.c

2021-08-24 Thread Bobby Eshleman
On Tue, Aug 24, 2021, 2:20 PM Jan Beulich wrote: > On 18.08.2021 22:29, Bobby Eshleman wrote: > > --- /dev/null > > +++ b/xen/include/asm-x86/gdbsx.h > > @@ -0,0 +1,17 @@ > > +#ifndef __X86_GDBX_H > > +#define __X86_GDBX_H__ > > + > > +#ifdef C

[PATCH v3 6/6] x86: change asm/debugger.h to xen/debugger.h

2021-08-18 Thread Bobby Eshleman
it is no longer required, arm/debugger.h is removed. Signed-off-by: Bobby Eshleman --- Changes in v3: - No longer introduces a fake TRAP_invalid_op for arm to consume, it is not necessary given the removal of the arm calls now precedes this patch. - Instead of defining prototypes that arch

[PATCH v3 5/6] arch/x86: move domain_pause_for_debugger() to domain.h

2021-08-18 Thread Bobby Eshleman
domain_pause_for_debugger() was previously in debugger.h. This commit moves it to domain.h because its implementation is in domain.c. Signed-off-by: Bobby Eshleman --- Changes in v3: - domain_pause_for_debugger() is now moved into debugger.h, not a new file debugger.c xen/arch/x86/hvm/svm

[PATCH v3 2/6] x86/debugger: separate Xen and guest debugging debugger_trap_* functions

2021-08-18 Thread Bobby Eshleman
requirement that all architectures to implement . Signed-off-by: Bobby Eshleman --- xen/arch/x86/domain.c | 2 +- xen/arch/x86/traps.c | 48 -- xen/include/asm-x86/debugger.h | 42 ++--- 3 files changed, 31 insertions(+), 61

[PATCH v3 3/6] arch/x86: rename debug.c to gdbsx.c

2021-08-18 Thread Bobby Eshleman
adds a stub that would preserve the functioning of that call site if the #ifdef CONFIG_GDBSX were to ever be removed or the function were to ever be called outside of such an ifdef block. Signed-off-by: Bobby Eshleman --- xen/arch/x86/Makefile | 2 +- xen/arch/x86/domctl.c

[PATCH v3 4/6] x86/gdbsx: expand dbg_rw_mem() inline

2021-08-18 Thread Bobby Eshleman
Because dbg_rw_mem() has only a single call site, this commit expands it inline. --- xen/arch/x86/gdbsx.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/gdbsx.c b/xen/arch/x86/gdbsx.c index adea0f017b..4cb8e042f9 100644 ---

[PATCH v3 1/6] arm/traps: remove debugger_trap_fatal() calls

2021-08-18 Thread Bobby Eshleman
ARM doesn't actually use debugger_trap_* anything, and is stubbed out. This commit simply removes the unneeded calls. Signed-off-by: Bobby Eshleman --- xen/arch/arm/traps.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 4ccb6e7d18

[PATCH v3 0/6] Remove unconditional arch dependency on asm/debugger.h

2021-08-18 Thread Bobby Eshleman
into the gdbstub… but further generalization is unnecessary while it is still only backed by the gdbstub. As I'm not *exactly* an expert on this code, so feel free to inform me of my confusion where you see it. Bobby Eshleman (6): arm/traps: remove debugger_trap_fatal() calls x86/debugger: separate

[PATCH v2 4/4] x86/debug: move domain_pause_for_debugger to debugger.c

2021-07-14 Thread Bobby Eshleman
The function domain_pause_for_debugger() is conditionally compiled if CONFIG_CRASH_DEBUG=y. Instead of placing an extra #ifdef inside domain.c, this commit moves domain_pause_for_debugger() into x86/debugger.c which is only built by Kbuild given CONFIG_CRASH_DEBUG=y. Signed-off-by: Bobby

[PATCH v2 2/4] build: use common stubs for debugger_trap_* functions if !CONFIG_CRASH_DEBUG

2021-07-14 Thread Bobby Eshleman
Previously Xen required all architectures implement the debugger_trap_* functions whether or not it actually needs them. This commit makes debugger_trap* functions resolve to arch-specific function definitions if CONFIG_CRASH_DEBUG=y, but resolves to a set of common no-op stubs if

[PATCH v2 3/4] x86/debug: move debugger_trap_entry into debugger.c not inlined

2021-07-14 Thread Bobby Eshleman
The function debugger_trap_entry() is somewhat large for an inlined function. This commit moves debugger_trap_entry() into debugger.c and makes it not inlined. Signed-off-by: Bobby Eshleman --- Changes in v2: - Move obj-$(CONFIG_CRASH_DEBUG) += debugger.o to be in alphabetical order

[PATCH v2 1/4] arm/traps: remove debugger_trap_fatal() calls

2021-07-14 Thread Bobby Eshleman
ARM doesn't actually use debugger_trap_* anything, and is stubbed out. Simply remove the calls. This also renders TRAP_invalid_op unused in any common code, so remove that definition too. Signed-off-by: Bobby Eshleman --- xen/arch/arm/traps.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH v2 0/4] Remove unconditional arch dependency on asm/debugger.h

2021-07-14 Thread Bobby Eshleman
86 code conditionally compiled by CONFIG_CRASH_DEBUG into arch/x86/debugger.c, which is now conditionally built for CONFIG_CRASH_DEBUG via Kbuild (i.e., obj-$(CONFIG_CRASH_DEBUG)). * Tries to improve the x86 implementation by not inlining large functions (but preserving inlining for those that seemed "small&

[PATCH 4/4] x86/debug: move domain_pause_for_debugger to debugger.c

2021-07-12 Thread Bobby Eshleman
The function domain_pause_for_debugger() is conditionally compiled if CONFIG_CRASH_DEBUG=y. Instead of placing an extra #ifdef inside domain.c, this commit moves domain_pause_for_debugger() into x86/debugger.c which is only built by Kbuild given CONFIG_CRASH_DEBUG=y. Signed-off-by: Bobby

[PATCH 3/4] x86/debug: move debugger_trap_entry into debugger.c not inlined

2021-07-12 Thread Bobby Eshleman
The function debugger_trap_entry() is rather large for an inlined function. This commit moves debugger_trap_entry() into debugger.c and makes it not inlined. Signed-off-by: Bobby Eshleman --- xen/arch/x86/Makefile | 1 + xen/arch/x86/debugger.c| 41

[PATCH 2/4] arm/traps: remove debugger_trap_fatal() calls

2021-07-12 Thread Bobby Eshleman
ARM doesn't actually use debugger_trap_* anything, and is stubbed out. Simply remove the calls. This also renders TRAP_invalid_op unused in any common code, so remove that definition too. Signed-off-by: Bobby Eshleman --- xen/arch/arm/traps.c | 6 -- xen/include/xen/debugger.h | 5

[PATCH 1/4] build: use common stubs for debugger_trap_* functions if !CONFIG_CRASH_DEBUG

2021-07-12 Thread Bobby Eshleman
if !CONFIG_CRASH_DEBUG, which avoids requiring every arch to carry its own stubs. This means asm/debugger.h may also be dropped for architectures that do not need this functionality. Inside xen/debugger.h: * If !CONFIG_CRASH_DEBUG, use stubs. * Otherwise, include arch-specific Signed-off-by: Bobby

[PATCH 0/4] Remove unconditional arch dependency on asm/debugger.h

2021-07-12 Thread Bobby Eshleman
IG_CRASH_DEBUG into arch/x86/debugger.c, which is now conditionally built for CONFIG_CRASH_DEBUG via Kbuild (i.e., obj-$(CONFIG_CRASH_DEBUG)). * Tries to improve the x86 implementation by not inlining large functions (but preserving inlining for those that seemed "small"). Bobby

Re: [PATCH v3 0/5] Support Secure Boot for multiboot2 Xen

2021-02-22 Thread Bobby Eshleman
Hey all, I just wanted to request more feedback on this series and put it on the radar, while acknowledging that I'm sure given the recent code freeze it is a busy time for everybody. Best, Bob

Re: [PATCH v3 1/5] xen: add XEN_BUILD_POSIX_TIME

2021-01-22 Thread Bobby Eshleman
On Fri, Jan 22, 2021 at 12:27:29PM +0100, Jan Beulich wrote: > On 22.01.2021 01:51, Bobby Eshleman wrote: > > export XEN_BUILD_DATE ?= $(shell LC_ALL=C date) > > export XEN_BUILD_TIME ?= $(shell LC_ALL=C date +%T) > > export XEN_BUILD_HOST ?= $(shell

Re: [PATCH v3 0/5] Support Secure Boot for multiboot2 Xen

2021-01-22 Thread Bobby Eshleman
On Fri, Jan 22, 2021 at 10:39:28AM +0100, Jan Beulich wrote: > On 22.01.2021 01:51, Bobby Eshleman wrote: > > I followed with v2 feedback and attempted to convert the PE/COFF header > > into C instead of ASM. Unfortunately, this was only possible for the > > first part (L

[PATCH v3 5/5] xen/x86/efi: Verify dom0 kernel with SHIM_LOCK protocol in efi_multiboot2()

2021-01-21 Thread Bobby Eshleman
From: Daniel Kiper This splits out efi_shim_lock() into common code and uses it to verify the dom0 kernel in efi_multiboot2(). Signed-off-by: Daniel Kiper Signed-off-by: Bobby Eshleman --- xen/arch/x86/boot/head.S| 20 ++-- xen/arch/x86/efi/efi-boot.h | 6 ++ xen

[PATCH v3 4/5] xen/x86: add some addresses to the Multiboot2 header

2021-01-21 Thread Bobby Eshleman
MULTIBOOT2_HEADER_TAG_ENTRY_ADDRESS and MULTIBOOT2_HEADER_TAG_ENTRY_ADDRESS_EFI64 tags close to each other to make the header more readable. The Multiboot2 protocol spec can be found at https://www.gnu.org/software/grub/manual/multiboot2/ Signed-off-by: Daniel Kiper Signed-off-by: Bobby Eshleman

[PATCH v3 2/5] xen/x86: manually build xen.mb.efi binary

2021-01-21 Thread Bobby Eshleman
-by: Daniel Kiper Signed-off-by: Bobby Eshleman --- xen/Makefile| 20 +++--- xen/arch/x86/Makefile | 7 +- xen/arch/x86/arch.mk| 2 + xen/arch/x86/boot/Makefile | 1 + xen/arch/x86/boot/head.S| 1 + xen/arch/x86/boot/pecoff.S | 123

[PATCH v3 3/5] xen/x86: add some addresses to the Multiboot header

2021-01-21 Thread Bobby Eshleman
be found at https://www.gnu.org/software/grub/manual/multiboot/ Signed-off-by: Daniel Kiper Signed-off-by: Bobby Eshleman --- xen/arch/x86/boot/head.S | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index

[PATCH v3 1/5] xen: add XEN_BUILD_POSIX_TIME

2021-01-21 Thread Bobby Eshleman
From: Daniel Kiper POSIX time is required to fill the TimeDateStamp field in the PE header. Use SOURCE_DATE_EPOCH if available, otherwise use `date +%s` (available on both Linux and FreeBSD). Signed-off-by: Daniel Kiper Signed-off-by: Bobby Eshleman --- xen/Makefile | 2

[PATCH v3 0/5] Support Secure Boot for multiboot2 Xen

2021-01-21 Thread Bobby Eshleman
This is version 3 for a patch set sent out to the ML in 2018 [1] to support UEFI Secure Boot for Xen on multiboot2 platforms. A new binary, xen.mb.efi, is built. It contains the mb2 header as well as a hand-crafted PE/COFF header. The dom0 kernel is verified using the shim lock protocol. I

Re: Xen and RISC-V Design Session

2020-07-08 Thread Bobby Eshleman
On Wed, Jul 08, 2020 at 06:20:47AM -0700, Alistair Francis wrote: > > Thanks! Just submitted the proposal. > > It would be really great to have Bobby attend (on CC) as he has been > working on it. I'm not sure what timezone he is in though. > Hey Alistair, I am on the west coast in the USA,

Re: [RFC XEN PATCH 19/23] riscv: Add the lib directory

2020-06-29 Thread Bobby Eshleman
On Mon, Jun 22, 2020 at 01:38:20PM +0200, Jan Beulich wrote: > On 22.01.2020 02:58, Bobby Eshleman wrote: > > From: Alistair Francis > > > > Add the lib directory with find_next_bit support. > > > > This was taken from Linux > > As was Arm64's

Re: [RFC XEN PATCH 22/23] riscv: Add sysctl.c

2020-06-29 Thread Bobby Eshleman
On Mon, Jun 22, 2020 at 01:43:40PM +0200, Jan Beulich wrote: > On 22.01.2020 02:59, Bobby Eshleman wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/sysctl.c > > @@ -0,0 +1,31 @@ > > +/** >

Re: [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-06-29 Thread Bobby Eshleman
On Tue, Jun 16, 2020 at 01:16:10PM -0700, Stefano Stabellini wrote: > On Mon, 15 Jun 2020, Bobby Eshleman wrote: > > On Tue, Jun 16, 2020 at 01:10:17AM +, Alistair Francis wrote: > > > On Mon, 2020-06-15 at 18:03 -0700, Stefano Stabellini wrote: > > > > Any

Re: [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-06-15 Thread Bobby Eshleman
On Tue, Jun 16, 2020 at 01:10:17AM +, Alistair Francis wrote: > On Mon, 2020-06-15 at 18:03 -0700, Stefano Stabellini wrote: > > Any updates? I am looking forward to this :-) > It has been on a slow burn since I became a new dad (shortly after the RFC). I've gradually regained free time, and

Re: [RFC] UEFI Secure Boot on Xen Hosts

2020-05-19 Thread Bobby Eshleman
On Wed, Apr 29, 2020 at 05:51:08PM -0500, Bobby Eshleman wrote: > > # Option #1: PE/COFF and Shim > ... snip ... > > # Option #3: Lean on Grub2's LoadFile2() Verification > ... snip ... It's safe to say that the options boiled down to #1 and #3. Seeing as how we may no

Re: [RFC] UEFI Secure Boot on Xen Hosts

2020-05-05 Thread Bobby Eshleman
On Thu, Apr 30, 2020 at 01:41:12PM +0200, Ard Biesheuvel wrote: > On Thu, 30 Apr 2020 at 13:15, Daniel Kiper wrote: > > Anyway, the advantage of this new protocol is that it uses UEFI API to > > load and execute PE kernel and its modules. This means that it will be > > architecture independent.

[RFC] UEFI Secure Boot on Xen Hosts

2020-04-29 Thread Bobby Eshleman
. Thanks, Bobby Eshleman # References 1. Daniel Kiper's patchset: https://lists.xenproject.org/archives/html/xen-devel/2018-06/msg01292.html 2. Linux loading initrd with LoadFile2(): https://lkml.org/lkml/2020/2/17/331 3. The vendor media guid for initrd: https://git.kernel.org/pub

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-27 Thread Bobby Eshleman
On Sat, Jan 25, 2020 at 05:11:18PM +, Andrew Cooper wrote: > On 25/01/2020 03:26, Bobby Eshleman wrote: > > On Fri, Jan 24, 2020 at 01:41:38PM +, Andrew Cooper wrote: > >> Other areas where you can reduce the minimum build would be to put some > >>

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-24 Thread Bobby Eshleman
On Fri, Jan 24, 2020 at 01:41:38PM +, Andrew Cooper wrote: > On 22/01/2020 01:58, Bobby Eshleman wrote: > > Currently, this patchset really only sets up virtual memory for Xen and > > initializes UART to enable print output. None of RISC-V's > > virtualization support has

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-24 Thread Bobby Eshleman
On Thu, Jan 23, 2020 at 11:44:02PM +, Lars Kurth wrote: > If you add your name/email address to > https://cryptpad.fr/pad/#/2/pad/edit/D9vGzihPxxAOe6RFPz0sRCf+/ > I will CC > you on the next invite > They are usually the 1st

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-24 Thread Bobby Eshleman
On Thu, Jan 23, 2020 at 04:02:56PM +, Andrew Cooper wrote: > > We have https://gitlab.com/xen-project/xen/pipelines which runs a load > of containerised builds.  How easy is it to set up a containerised > RISC-V cross-compiler environment? > It's pretty easy. I personally use a Docker

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-22 Thread Bobby Eshleman
On Wed, Jan 22, 2020 at 04:27:39PM +, Lars Kurth wrote: > > You should also leverage the developer summit: see > https://events.linuxfoundation.org/xen-summit/program/cfp/ > > CfP closes March 6th. Design sessions can be submitted

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-22 Thread Bobby Eshleman
On Wed, Jan 22, 2020 at 02:57:47PM +, Andrew Cooper wrote: > How much time do you have to put towards the port?  Is this something in > your free time, or something you are doing as part of work?  Ultimately, > we are going to need to increase the level of RISC-V knowledge in the > community

Re: [Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-22 Thread Bobby Eshleman
On Wed, Jan 22, 2020 at 01:05:11PM -0800, Stefano Stabellini wrote: > On Wed, 22 Jan 2020, Andrew Cooper wrote: > > > My big questions are: > > > Does the Xen project have interest in RISC-V? > > > > There is very large downstream interest in RISC-V.  So a definite yes. > > Definite Yes from

[Xen-devel] [RFC XEN PATCH 09/23] riscv: Add domain.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/domain.c | 273 1 file changed, 273 insertions(+) create mode 100644 xen/arch/riscv/domain.c diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c new file mode 100644

[Xen-devel] [RFC XEN PATCH 17/23] riscv: Add vm_event.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/vm_event.c | 42 +++ 1 file changed, 42 insertions(+) create mode 100644 xen/arch/riscv/vm_event.c diff --git a/xen/arch/riscv/vm_event.c b/xen/arch/riscv/vm_event.c new file mode

[Xen-devel] [RFC XEN PATCH 18/23] riscv: Add p2m.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/p2m.c | 261 +++ 1 file changed, 261 insertions(+) create mode 100644 xen/arch/riscv/p2m.c diff --git a/xen/arch/riscv/p2m.c b/xen/arch/riscv/p2m.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 15/23] riscv: Add traps.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/traps.c | 56 ++ 1 file changed, 56 insertions(+) create mode 100644 xen/arch/riscv/traps.c diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c new file mode 100644

[Xen-devel] [RFC XEN PATCH 02/23] HACK: Makefile: Don't build Xen tools

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- Makefile | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 512d6b73c8..7936f3a368 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: dist -include config/Toplevel.mk

[Xen-devel] [RFC XEN PATCH 07/23] riscv: Add asm-offsets.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/asm-offsets.c | 38 1 file changed, 38 insertions(+) create mode 100644 xen/arch/riscv/asm-offsets.c diff --git a/xen/arch/riscv/asm-offsets.c b/xen/arch/riscv/asm-offsets.c new

[Xen-devel] [RFC XEN PATCH 10/23] riscv: Add domctl.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/domctl.c | 53 + 1 file changed, 53 insertions(+) create mode 100644 xen/arch/riscv/domctl.c diff --git a/xen/arch/riscv/domctl.c b/xen/arch/riscv/domctl.c new file mode 100644

[Xen-devel] [RFC XEN PATCH 21/23] riscv: Add percpu.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/percpu.c | 84 + 1 file changed, 84 insertions(+) create mode 100644 xen/arch/riscv/percpu.c diff --git a/xen/arch/riscv/percpu.c b/xen/arch/riscv/percpu.c new file mode 100644

[Xen-devel] [RFC XEN PATCH 16/23] riscv: Add irq.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/irq.c | 107 +++ 1 file changed, 107 insertions(+) create mode 100644 xen/arch/riscv/irq.c diff --git a/xen/arch/riscv/irq.c b/xen/arch/riscv/irq.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 12/23] riscv: Add time.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/time.c | 74 +++ 1 file changed, 74 insertions(+) create mode 100644 xen/arch/riscv/time.c diff --git a/xen/arch/riscv/time.c b/xen/arch/riscv/time.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 19/23] riscv: Add the lib directory

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Add the lib directory with find_next_bit support. This was taken from Linux Signed-off-by: Alistair Francis --- xen/arch/riscv/lib/Makefile| 1 + xen/arch/riscv/lib/find_next_bit.c | 284 + 2 files changed, 285 insertions(+)

[Xen-devel] [RFC XEN PATCH 08/23] riscv: Add delay.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/delay.c | 114 + 1 file changed, 114 insertions(+) create mode 100644 xen/arch/riscv/delay.c diff --git a/xen/arch/riscv/delay.c b/xen/arch/riscv/delay.c new file mode 100644

[Xen-devel] [RFC XEN PATCH 11/23] riscv: Add guestcopy.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/guestcopy.c | 158 + 1 file changed, 158 insertions(+) create mode 100644 xen/arch/riscv/guestcopy.c diff --git a/xen/arch/riscv/guestcopy.c b/xen/arch/riscv/guestcopy.c new file

[Xen-devel] [RFC XEN PATCH 06/23] riscv: Add riscv to tools/libxc header files

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- tools/libxc/include/xenctrl.h | 7 + tools/libxc/xc_core.h | 2 ++ tools/libxc/xc_core_riscv.h | 57 +++ 3 files changed, 66 insertions(+) create mode 100644 tools/libxc/xc_core_riscv.h

[Xen-devel] [RFC XEN PATCH 03/23] riscv: makefiles and Kconfig

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Bobby Eshleman Signed-off-by: Alistair Francis --- config/riscv64.mk| 7 + xen/Makefile | 2 +- xen/Rules.mk | 2 +- xen/arch/Kconfig | 1

[Xen-devel] [RFC XEN PATCH 20/23] riscv: Add smpboot.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/smpboot.c | 114 +++ 1 file changed, 114 insertions(+) create mode 100644 xen/arch/riscv/smpboot.c diff --git a/xen/arch/riscv/smpboot.c b/xen/arch/riscv/smpboot.c new file mode

[Xen-devel] [RFC XEN PATCH 14/23] riscv: Add shutdown.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/shutdown.c | 24 1 file changed, 24 insertions(+) create mode 100644 xen/arch/riscv/shutdown.c diff --git a/xen/arch/riscv/shutdown.c b/xen/arch/riscv/shutdown.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 23/23] riscv: Add iommu.c

2020-01-21 Thread Bobby Eshleman
Signed-off-by: Bobby Eshleman --- xen/drivers/passthrough/riscv/iommu.c | 74 +++ 1 file changed, 74 insertions(+) create mode 100644 xen/drivers/passthrough/riscv/iommu.c diff --git a/xen/drivers/passthrough/riscv/iommu.c b/xen/drivers/passthrough/riscv/iommu.c new

[Xen-devel] [RFC XEN PATCH 01/23] HACK: OE Build changes

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- config/StdGNU.mk| 12 ++-- tools/configure | 32 tools/firmware/Makefile | 12 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/config/StdGNU.mk

[Xen-devel] [RFC XEN PATCH 13/23] riscv: Add smp.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/smp.c | 41 + 1 file changed, 41 insertions(+) create mode 100644 xen/arch/riscv/smp.c diff --git a/xen/arch/riscv/smp.c b/xen/arch/riscv/smp.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 05/23] riscv: early setup code

2020-01-21 Thread Bobby Eshleman
those values from the DTB. Signed-off-by: Alistair Francis Signed-off-by: Bobby Eshleman --- xen/arch/riscv/head.S | 180 xen/arch/riscv/mm.c| 925 + xen/arch/riscv/setup.c | 122 ++ 3 files changed, 1227 insertions(+) create mode 100644

[Xen-devel] [RFC XEN PATCH 22/23] riscv: Add sysctl.c

2020-01-21 Thread Bobby Eshleman
From: Alistair Francis Signed-off-by: Alistair Francis --- xen/arch/riscv/sysctl.c | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 xen/arch/riscv/sysctl.c diff --git a/xen/arch/riscv/sysctl.c b/xen/arch/riscv/sysctl.c new file mode 100644 index

[Xen-devel] [RFC XEN PATCH 00/23] xen: beginning support for RISC-V

2020-01-21 Thread Bobby Eshleman
is Bobby Eshleman, I'm a software engineer at Star Lab / Wind River on the ARM team, mostly having worked in the Linux kernel. I've also been involved a good amount with Xen on ARM here, mostly dealing with tooling, deployment, and testing. A lot of this patchset is heavily inspired by the Xen