All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Pathak <rpathak@ventanamicro.com>
To: "open list:RISC-V" <qemu-riscv@nongnu.org>,
	 "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Cc: Alistair Francis <alistair.francis@wdc.com>,
	Bin Meng <bmeng.cn@gmail.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Anup Patel <apatel@ventanamicro.com>,
	 Rahul Pathak <rpathakmailbox@gmail.com>,
	victor.colombo@eldorado.org.br
Subject: Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid
Date: Mon, 27 Jun 2022 22:31:41 +0530	[thread overview]
Message-ID: <CA+Oz1=ZmTp__w8tJ-CZLw3NX-+dfDU5BYDu6OR2kfbjpaRjwkQ@mail.gmail.com> (raw)
In-Reply-To: <20220627164956.1516487-1-rpathak@ventanamicro.com>

Sorry for spamming but my send-email script misbehaved
and sent the v2 patch two times. Please ignore one of
the v2 patch

On Mon, Jun 27, 2022 at 10:20 PM Rahul Pathak <rpathak@ventanamicro.com> wrote:
>
> mhartid csr is not available in user-mode code path and
> user-mode build fails because of its reference in
> riscv_cpu_realize function
>
> Commit causing the issue is currently in Alistair's
> riscv-to-apply.next branch and need to be squashed there.
>
> Fixes: 7ecee770d40 ("target/riscv: Force disable extensions if priv spec version does not match")
>
> Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
> ---
>
> Changes in V2:
> - remove the stray format specifier
> - add the Fixes tag and reference to external tree
> ---
>  target/riscv/cpu.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index e4ec05abf4..509923f15e 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -636,9 +636,15 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
>          if (isa_ext_is_enabled(cpu, &isa_edata_arr[i]) &&
>              (env->priv_ver < isa_edata_arr[i].min_version)) {
>              isa_ext_update_enabled(cpu, &isa_edata_arr[i], false);
> +#ifndef CONFIG_USER_ONLY
>              warn_report("disabling %s extension for hart 0x%lx because "
>                          "privilege spec version does not match",
>                          isa_edata_arr[i].name, (unsigned long)env->mhartid);
> +#else
> +            warn_report("disabling %s extension for hart because "
> +                        "privilege spec version does not match",
> +                        isa_edata_arr[i].name);
> +#endif
>          }
>      }
>
> --
> 2.34.1
>


-- 

Thanks
Rahul Pathak


  reply	other threads:[~2022-06-27 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 16:49 [PATCH v2] target/riscv: fix user-mode build issue because mhartid Rahul Pathak
2022-06-27 17:01 ` Rahul Pathak [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-27 16:40 Rahul Pathak
2022-06-29  2:01 ` Alistair Francis
2022-06-29  2:07   ` Rahul Pathak
2022-06-29  3:52     ` Bin Meng
2022-06-29  4:30       ` Anup Patel

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='CA+Oz1=ZmTp__w8tJ-CZLw3NX-+dfDU5BYDu6OR2kfbjpaRjwkQ@mail.gmail.com' \
    --to=rpathak@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=apatel@ventanamicro.com \
    --cc=bmeng.cn@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=rpathakmailbox@gmail.com \
    --cc=victor.colombo@eldorado.org.br \
    /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.