From: Andrew Jones <andrew.jones@linux.dev>
To: kvm-riscv@lists.infradead.org
Subject: [kvm-unit-tests PATCH 2/3] riscv: setup: Apply VA_BASE check to rv64
Date: Wed, 7 Aug 2024 17:16:32 +0200 [thread overview]
Message-ID: <20240807151629.144168-7-andrew.jones@linux.dev> (raw)
In-Reply-To: <20240807151629.144168-5-andrew.jones@linux.dev>
The VA_BASE check in setup() also applies to rv64, as is clear from
the later VA_BASE check in mem_allocator_init(), which ensures
freemem_start < freemem_end < VA_BASE.
Fixes: 6895ce6dc618 ("riscv: Populate memregions and switch to page allocator")
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
lib/riscv/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/riscv/setup.c b/lib/riscv/setup.c
index e0b5f6f7daf5..2c7792a5b0bd 100644
--- a/lib/riscv/setup.c
+++ b/lib/riscv/setup.c
@@ -193,7 +193,7 @@ void setup(const void *fdt, phys_addr_t freemem_start)
const char *bootargs;
int ret;
- assert(sizeof(long) == 8 || freemem_start < VA_BASE);
+ assert(freemem_start < VA_BASE);
freemem = __va(freemem_start);
freemem_push_fdt(&freemem, fdt);
--
2.45.2
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <andrew.jones@linux.dev>
To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org
Cc: atishp@rivosinc.com, cade.richard@berkeley.edu, jamestiotio@gmail.com
Subject: [kvm-unit-tests PATCH 2/3] riscv: setup: Apply VA_BASE check to rv64
Date: Wed, 7 Aug 2024 17:16:32 +0200 [thread overview]
Message-ID: <20240807151629.144168-7-andrew.jones@linux.dev> (raw)
In-Reply-To: <20240807151629.144168-5-andrew.jones@linux.dev>
The VA_BASE check in setup() also applies to rv64, as is clear from
the later VA_BASE check in mem_allocator_init(), which ensures
freemem_start < freemem_end < VA_BASE.
Fixes: 6895ce6dc618 ("riscv: Populate memregions and switch to page allocator")
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
lib/riscv/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/riscv/setup.c b/lib/riscv/setup.c
index e0b5f6f7daf5..2c7792a5b0bd 100644
--- a/lib/riscv/setup.c
+++ b/lib/riscv/setup.c
@@ -193,7 +193,7 @@ void setup(const void *fdt, phys_addr_t freemem_start)
const char *bootargs;
int ret;
- assert(sizeof(long) == 8 || freemem_start < VA_BASE);
+ assert(freemem_start < VA_BASE);
freemem = __va(freemem_start);
freemem_push_fdt(&freemem, fdt);
--
2.45.2
next prev parent reply other threads:[~2024-08-07 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 15:16 [kvm-unit-tests PATCH 0/3] riscv: 32-bit should use phys_addr_t Andrew Jones
2024-08-07 15:16 ` Andrew Jones
2024-08-07 15:16 ` [kvm-unit-tests PATCH 1/3] riscv: Fix virt_to_phys again Andrew Jones
2024-08-07 15:16 ` Andrew Jones
2024-08-07 15:16 ` Andrew Jones [this message]
2024-08-07 15:16 ` [kvm-unit-tests PATCH 2/3] riscv: setup: Apply VA_BASE check to rv64 Andrew Jones
2024-08-07 15:16 ` [kvm-unit-tests PATCH 3/3] riscv: Support up to 34-bit physical addresses on rv32, sort of Andrew Jones
2024-08-07 15:16 ` Andrew Jones
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=20240807151629.144168-7-andrew.jones@linux.dev \
--to=andrew.jones@linux.dev \
--cc=kvm-riscv@lists.infradead.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.