All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Xiaojuan Yang <yangxiaojuan@loongson.cn>, qemu-devel@nongnu.org
Cc: gaosong@loongson.cn, maobibo@loongson.cn,
	mark.cave-ayland@ilande.co.uk, mst@redhat.com,
	imammedo@redhat.com, ani@anisinha.ca, f4bug@amsat.org,
	peter.maydell@linaro.org
Subject: Re: [PATCH 08/11] target/loongarch: Fix the meaning of ECFG reg's VS field
Date: Mon, 4 Jul 2022 10:48:50 +0530	[thread overview]
Message-ID: <87c56b26-62cb-a047-2da8-9af047640542@linaro.org> (raw)
In-Reply-To: <20220701093407.2150607-9-yangxiaojuan@loongson.cn>

On 7/1/22 15:04, Xiaojuan Yang wrote:
> By the manual of LoongArch CSR, the VS field(18:16 bits) of
> ECFG reg means that the number of instructions between each
> exception entry is 2^VS.

Is it a typo in the manual that says "2VS", i.e. multiplication?

If so,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
> ---
>   target/loongarch/cpu.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
> index 4c8f96bc3a..04e5e47da4 100644
> --- a/target/loongarch/cpu.c
> +++ b/target/loongarch/cpu.c
> @@ -219,6 +219,10 @@ static void loongarch_cpu_do_interrupt(CPUState *cs)
>       env->CSR_CRMD = FIELD_DP64(env->CSR_CRMD, CSR_CRMD, PLV, 0);
>       env->CSR_CRMD = FIELD_DP64(env->CSR_CRMD, CSR_CRMD, IE, 0);
>   
> +    if (vec_size) {
> +        vec_size = (1 << vec_size) * 4;
> +    }
> +
>       if  (cs->exception_index == EXCCODE_INT) {
>           /* Interrupt */
>           uint32_t vector = 0;



  reply	other threads:[~2022-07-04  5:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  9:33 [PATCH v2 00/11] Fix bugs for LoongArch virt machine Xiaojuan Yang
2022-07-01  9:33 ` [PATCH 01/11] hw/rtc/ls7a_rtc: Fix uninitialied bugs and toymatch writing function Xiaojuan Yang
2022-07-04  5:13   ` Richard Henderson
2022-07-01  9:33 ` [PATCH 02/11] hw/rtc/ls7a_rtc: Fix timer call back function Xiaojuan Yang
2022-07-04  5:13   ` Richard Henderson
2022-07-01  9:33 ` [PATCH 03/11] hw/rtc/ls7a_rtc: Remove unimplemented device in realized function Xiaojuan Yang
2022-07-04  5:13   ` Richard Henderson
2022-07-01  9:34 ` [PATCH 04/11] hw/rtc/ls7a_rtc: Add reset function Xiaojuan Yang
2022-07-01  9:34 ` [PATCH 05/11] hw/rtc/ls7a_rtc: Fix rtc enable and disable function Xiaojuan Yang
2022-07-04  5:14   ` Richard Henderson
2022-07-01  9:34 ` [PATCH 06/11] hw/rtc/ls7a_rtc: Use tm struct pointer as arguments in toy_time_to_val() Xiaojuan Yang
2022-07-04  5:15   ` Richard Henderson
2022-07-01  9:34 ` [PATCH 07/11] hw/rtc/ls7a_rtc: Fix 'calculate' spelling errors Xiaojuan Yang
2022-07-04  5:15   ` Richard Henderson
2022-07-01  9:34 ` [PATCH 08/11] target/loongarch: Fix the meaning of ECFG reg's VS field Xiaojuan Yang
2022-07-04  5:18   ` Richard Henderson [this message]
2022-07-04  6:04     ` gaosong
2022-07-01  9:34 ` [PATCH 09/11] target/loongarch: Add lock when writing timer clear reg Xiaojuan Yang
2022-07-04  5:19   ` Richard Henderson
2022-07-01  9:34 ` [PATCH 10/11] hw/intc/loongarch_ipi: Fix ipi device access of 64bits Xiaojuan Yang
2022-07-04  5:28   ` Richard Henderson
2022-07-04  9:09     ` gaosong
2022-07-01  9:34 ` [PATCH 11/11] hw/intc/loongarch_ipi: Fix mail send and any send function Xiaojuan Yang
2022-07-04  5:37   ` Richard Henderson
2022-07-04  9:10     ` gaosong
2022-07-04  9:26       ` Richard Henderson
2022-07-04  5:41 ` [PATCH v2 00/11] Fix bugs for LoongArch virt machine Richard Henderson

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=87c56b26-62cb-a047-2da8-9af047640542@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=ani@anisinha.ca \
    --cc=f4bug@amsat.org \
    --cc=gaosong@loongson.cn \
    --cc=imammedo@redhat.com \
    --cc=maobibo@loongson.cn \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yangxiaojuan@loongson.cn \
    /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.