xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bob Eshleman <bobbyeshleman@gmail.com>
To: Connor Davis <connojdavis@gmail.com>, xen-devel@lists.xenproject.org
Cc: Alistair Francis <alistair23@gmail.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Jan Beulich <jbeulich@suse.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v3 4/5] xen: Add files needed for minimal riscv build
Date: Fri, 14 May 2021 14:53:52 -0700	[thread overview]
Message-ID: <97815ecd-7335-9c85-5df8-802ed119d518@gmail.com> (raw)
In-Reply-To: <a7d2d43d0d9de9e10a3e92bc6f977d6f4b53bef6.1621017334.git.connojdavis@gmail.com>

On 5/14/21 11:53 AM, Connor Davis wrote:
> Add arch-specific makefiles and configs needed to build for
> riscv64. Also add a minimal head.S that is a simple infinite loop.
> head.o can be built with
> 
> $ make XEN_TARGET_ARCH=riscv64 SUBSYSTEMS=xen -C xen TARGET=head.o
> 

I recently realized that the Linux kernel build uses `ARCH=riscv`
with 32 vs 64 being differentiated by Kconfig opts (and __riscv_xlen).
I think `riscv64` was inherited by `arm64`.  This is something I'd
like to eventually change the Xen build to (i.e.,
`XEN_TARGET_ARCH=riscv make`) would it be possible for us to get that
in this series?

...

> diff --git a/xen/include/asm-riscv/config.h b/xen/include/asm-riscv/config.h
> new file mode 100644
> index 0000000000..84cb436dc1
> --- /dev/null
> +++ b/xen/include/asm-riscv/config.h
> @@ -0,0 +1,110 @@
> +/******************************************************************************
> + * config.h
> + *
> + * A Linux-style configuration list.
> + */
> +
> +#ifndef __RISCV_CONFIG_H__
> +#define __RISCV_CONFIG_H__
> +

...

> +
> +#ifdef CONFIG_RISCV_64
> +
> +/*
> + * RISC-V Layout:
> + *   0x0000000000000000 - 0x0000003fffffffff (256GB, L2 slots [0-255])
> + *     Unmapped
> + *   0x0000004000000000 - 0xffffffbfffffffff
> + *     Inaccessible: sv39 only supports 39-bit sign-extended VAs.
> + *   0xffffffc000000000 - 0xffffffc0001fffff (2MB, L2 slot [256])
> + *     Unmapped
> + *   0xffffffc000200000 - 0xffffffc0003fffff (2MB, L2 slot [256])
> + *     Xen text, data, bss
> + *   0xffffffc000400000 - 0xffffffc0005fffff (2MB, L2 slot [256])
> + *     Fixmap: special-purpose 4K mapping slots
> + *   0xffffffc000600000 - 0xffffffc0009fffff (4MB, L2 slot [256])
> + *     Early boot mapping of FDT
> + *   0xffffffc000a00000 - 0xffffffc000bfffff (2MB, L2 slot [256])
> + *     Early relocation address, used when relocating Xen and later
> + *     for livepatch vmap (if compiled in)
> + *   0xffffffc040000000 - 0xffffffc07fffffff (1GB, L2 slot [257])
> + *     VMAP: ioremap and early_ioremap
> + *   0xffffffc080000000 - 0xffffffc13fffffff (3GB, L2 slots [258..260])
> + *     Unmapped
> + *   0xffffffc140000000 - 0xffffffc1bfffffff (2GB, L2 slots [261..262])
> + *     Frametable: 48 bytes per page for 133GB of RAM
> + *   0xffffffc1c0000000 - 0xffffffe1bfffffff (128GB, L2 slots [263..390])
> + *     1:1 direct mapping of RAM
> + *   0xffffffe1c0000000 - 0xffffffffffffffff (121GB, L2 slots [391..511])
> + *     Unmapped
> + */
> +
What is the benefit of moving the layout up to 0xffffffc000000000?

-- 
Bobby Eshleman
SE at Vates SAS


  reply	other threads:[~2021-05-14 21:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 18:53 [PATCH v3 0/5] Minimal build for RISCV Connor Davis
2021-05-14 18:53 ` [PATCH v3 1/5] xen/char: Default HAS_NS16550 to y only for X86 and ARM Connor Davis
2021-05-16 22:48   ` Alistair Francis
2021-05-17 11:56   ` Jan Beulich
2021-05-17 23:43     ` Connor Davis
2021-05-14 18:53 ` [PATCH v3 2/5] xen/common: Guard iommu symbols with CONFIG_HAS_PASSTHROUGH Connor Davis
2021-05-17 11:16   ` Jan Beulich
2021-05-17 13:52     ` Connor Davis
2021-05-17 15:42     ` Julien Grall
2021-05-18  4:11       ` Connor Davis
2021-05-18  6:27         ` Jan Beulich
2021-05-18 14:06           ` Julien Grall
2021-05-18 15:13             ` Jan Beulich
2021-05-18 15:17               ` Julien Grall
2021-05-14 18:53 ` [PATCH v3 3/5] xen: Fix build when !CONFIG_GRANT_TABLE Connor Davis
2021-05-17 11:22   ` Jan Beulich
2021-05-17 23:46     ` Connor Davis
2021-05-18  3:58     ` Connor Davis
2021-05-18  6:31       ` Jan Beulich
2021-05-14 18:53 ` [PATCH v3 4/5] xen: Add files needed for minimal riscv build Connor Davis
2021-05-14 21:53   ` Bob Eshleman [this message]
2021-05-14 23:47     ` Connor Davis
2021-05-18  1:43       ` Bob Eshleman
2021-05-18  4:05         ` Connor Davis
2021-05-17 11:51   ` Jan Beulich
2021-05-18  4:58     ` Connor Davis
2021-05-18  6:33       ` Jan Beulich
2021-05-14 18:53 ` [PATCH v3 5/5] automation: Add container for riscv64 builds Connor Davis
2021-05-14 21:01   ` Bob Eshleman
2021-05-14 23:54     ` Connor Davis
2021-05-17 23:20 ` [PATCH v3 0/5] Minimal build for RISCV Roman Shaposhnik

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=97815ecd-7335-9c85-5df8-802ed119d518@gmail.com \
    --to=bobbyeshleman@gmail.com \
    --cc=alistair23@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=connojdavis@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).