All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii <oleksii.kurochko@gmail.com>
To: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Cc: Bob Eshleman <bobbyeshleman@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Connor Davis <connojdavis@gmail.com>,
	Julien Grall <julien@xen.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Gianluca Guida <gianluca@rivosinc.com>,
	 "xen-devel@lists.xenproject.org"
	<xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v4 1/2] arch/riscv: initial RISC-V support to build/run minimal Xen
Date: Thu, 05 Jan 2023 18:24:14 +0200	[thread overview]
Message-ID: <8ab7b45a75cdfa332954c8a112cf9b54b4d35c62.camel@gmail.com> (raw)
In-Reply-To: <439a5b7624dbf4d4ff6acbb9b3a6f15b777ba0fc.camel@gmail.com>

On Thu, 2023-01-05 at 18:10 +0200, Oleksii wrote:
> On Thu, 2023-01-05 at 15:48 +0000, Andrew Cooper wrote:
> > On 05/01/2023 1:40 pm, Jan Beulich wrote:
> > > On 05.01.2023 13:01, Oleksii Kurochko wrote:
> > > > To run in debug mode should be done the following instructions:
> > > >  $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \
> > > >         -kernel xen/xen -s -S
> > > >  # In separate terminal:
> > > >  $ riscv64-buildroot-linux-gnu-gdb
> > > >  $ target remote :1234
> > > >  $ add-symbol-file <xen_src>/xen/xen-syms 0x80200000
> > > >  $ hb *0x80200000
> > > >  $ c # it should stop at instruction j 0x80200000 <start>
> > > This suggests to me that Xen is meant to run at VA 0x80200000,
> > > whereas ...
> > > 
> > > > --- a/xen/arch/riscv/include/asm/config.h
> > > > +++ b/xen/arch/riscv/include/asm/config.h
> > > > @@ -1,6 +1,9 @@
> > > >  #ifndef __RISCV_CONFIG_H__
> > > >  #define __RISCV_CONFIG_H__
> > > >  
> > > > +#include <xen/const.h>
> > > > +#include <xen/page-size.h>
> > > > +
> > > >  #if defined(CONFIG_RISCV_64)
> > > >  # define LONG_BYTEORDER 3
> > > >  # define ELFSIZE 64
> > > > @@ -28,7 +31,7 @@
> > > >  
> > > >  /* Linkage for RISCV */
> > > >  #ifdef __ASSEMBLY__
> > > > -#define ALIGN .align 2
> > > > +#define ALIGN .align 4
> > > >  
> > > >  #define ENTRY(name)                                \
> > > >    .globl name;                                     \
> > > > @@ -36,6 +39,10 @@
> > > >    name:
> > > >  #endif
> > > >  
> > > > +#define XEN_VIRT_START  _AT(UL, 0x00200000)
> > > ... here you specify a much lower address (and to be honest even
> > > 0x80200000
> > > looks pretty low to me for 64-bit, and perhaps even for 32-bit).
> > > Could you
> > > clarify what the plans here are? Maybe this is merely a temporary
> > > thing,
> > > but not called out as such?
> > 
> > It's stale from v1 which had:
> > 
> > #define XEN_VIRT_START  0x80200000
Let's switch XEN_VIRT_START to 0x0000000080200000 while we don't have
any MMU support as 0x80200000 is an address where OpenSBI will load
binary (in our case Xen).
> > 
> > 
> > But honestly, I don't think the qemu details in the commit message
> > are
> > useful.  This series is just about making "make build" work.
> > 
> > The next series (being worked on, but not posted yet) is only a few
> > patches and gets a full Gitlab CI smoke test, at which point the
> > smoke
> > test shell script is the reference for how to invoke qemu.
> > 
> > 
> > I'm happy to R-by this series and drop that part of the commit
> > message
> > on commit.
> > 
> I'm happy with that. Thanks.
> > ~Andrew
> 
~ Oleksii



  reply	other threads:[~2023-01-05 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 12:01 [PATCH v4 0/2] Add minimal RISC-V Xen build and build testing Oleksii Kurochko
2023-01-05 12:01 ` [PATCH v4 1/2] arch/riscv: initial RISC-V support to build/run minimal Xen Oleksii Kurochko
2023-01-05 13:40   ` Jan Beulich
2023-01-05 15:48     ` Andrew Cooper
2023-01-05 16:10       ` Oleksii
2023-01-05 16:24         ` Oleksii [this message]
2023-01-05 16:39           ` Andrew Cooper
2023-01-05 12:01 ` [PATCH v4 2/2] automation: add RISC-V 64 cross-build tests for Xen Oleksii Kurochko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ab7b45a75cdfa332954c8a112cf9b54b4d35c62.camel@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=alistair.francis@wdc.com \
    --cc=anthony.perard@citrix.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=gianluca@rivosinc.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.