qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Jiajie Chen <c@jia.je>, qemu-devel@nongnu.org
Cc: gaosong@loongson.cn, git@xen0n.name, Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH] linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch
Date: Tue, 3 Oct 2023 13:34:21 -0700	[thread overview]
Message-ID: <97fbe6a6-79fd-d2aa-91ed-a1c0444cb209@linaro.org> (raw)
In-Reply-To: <20231001085315.1692667-1-c@jia.je>

On 10/1/23 01:53, Jiajie Chen wrote:
> Since support for LSX and LASX is landed in QEMU recently, we can update
> HWCAPS accordingly.
> 
> Signed-off-by: Jiajie Chen <c@jia.je>
> ---
>   linux-user/elfload.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index db75cd4b33..f11f25309e 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1237,6 +1237,14 @@ static uint32_t get_elf_hwcap(void)
>           hwcaps |= HWCAP_LOONGARCH_LAM;
>       }
>   
> +    if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LSX)) {
> +        hwcaps |= HWCAP_LOONGARCH_LSX;
> +    }
> +
> +    if (FIELD_EX32(cpu->env.cpucfg[2], CPUCFG2, LASX)) {
> +        hwcaps |= HWCAP_LOONGARCH_LASX;
> +    }
> +
>       return hwcaps;
>   }
>   

Queued to linux-user-next.


r~


      parent reply	other threads:[~2023-10-03 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-01  8:53 [PATCH] linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch Jiajie Chen
2023-10-01 14:09 ` Richard Henderson
2023-10-03 20:34 ` Richard Henderson [this message]

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=97fbe6a6-79fd-d2aa-91ed-a1c0444cb209@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=c@jia.je \
    --cc=gaosong@loongson.cn \
    --cc=git@xen0n.name \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@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 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).