All of lore.kernel.org
 help / color / mirror / Atom feed
From: ~elta <elta@git.sr.ht>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bin Meng <bin.meng@windriver.com>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH qemu] target/riscv/cpu.c: Fix elen check
Date: Thu, 15 Dec 2022 16:27:14 +0800	[thread overview]
Message-ID: <167221089290.19963.15278757025657303819-0@git.sr.ht> (raw)

From: Dongxue Zhang <elta.era@gmail.com>

Should be cpu->cfg.elen in range [8, 64].

Signed-off-by: Dongxue Zhang <elta.era@gmail.com>
---
 target/riscv/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 6fe176e483..5dc51f7912 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -872,7 +872,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
                         "Vector extension ELEN must be power of 2");
                 return;
             }
-            if (cpu->cfg.elen > 64 || cpu->cfg.vlen < 8) {
+            if (cpu->cfg.elen > 64 || cpu->cfg.elen < 8) {
                 error_setg(errp,
                         "Vector extension implementation only supports ELEN "
                         "in the range [8, 64]");
-- 
2.34.5


             reply	other threads:[~2022-12-28 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  8:27 ~elta [this message]
2022-12-29 22:32 ` [PATCH qemu] target/riscv/cpu.c: Fix elen check Alistair Francis
  -- strict thread matches above, loose matches on Subject: below --
2022-12-15  8:27 ~elta
2023-01-09 23:04 ` Alistair Francis
2022-12-15  8:27 ~elta
2022-12-15  8:27 ~elta

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=167221089290.19963.15278757025657303819-0@git.sr.ht \
    --to=elta@git.sr.ht \
    --cc=503386372@qq.com \
    --cc=alistair.francis@wdc.com \
    --cc=bin.meng@windriver.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.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.