All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: Brian Cain <brian.cain@oss.qualcomm.com>, qemu-devel@nongnu.org
Cc: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	Laurent Vivier <laurent@vivier.eu>, Helge Deller <deller@gmx.de>
Subject: Re: [PATCH v2 06/11] target/hexagon: gate GPCYCLE guest register reads on SSR:CE
Date: Wed, 2 Sep 2026 23:16:21 +0200	[thread overview]
Message-ID: <f7f34a43-c1cc-4dd8-a859-9ab72e1b015f@oss.qualcomm.com> (raw)
In-Reply-To: <20260901173353.200474-7-brian.cain@oss.qualcomm.com>

Hi Brian,

On 1/9/26 19:33, Brian Cain wrote:
> GPCYCLELO/GPCYCLEHI read as zero unless the cycle counter is enabled
> (SSR:CE), matching the hardware.
> 
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>   target/hexagon/cpu.c       | 7 +++++--
>   target/hexagon/op_helper.c | 9 ++-------
>   2 files changed, 7 insertions(+), 9 deletions(-)


> diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c
> index 23894ff3d28..2cea1927263 100644
> --- a/target/hexagon/op_helper.c
> +++ b/target/hexagon/op_helper.c
> @@ -1912,13 +1912,8 @@ uint64_t HELPER(greg_read_pair)(CPUHexagonState *env, uint32_t reg)
>           return (uint64_t)(env->greg[reg]) |
>                  (((uint64_t)(env->greg[reg + 1])) << 32);
>       }
> -    switch (reg) {
> -    case HEX_GREG_GPCYCLELO:
> -        return hexagon_get_sys_pcycle_count(env);
> -    default:
> -        return (uint64_t)hexagon_greg_read(env, reg) |
> -               ((uint64_t)(hexagon_greg_read(env, reg + 1)) << 32);
> -    }
> +    return (uint64_t)hexagon_greg_read(env, reg) |
> +           ((uint64_t)(hexagon_greg_read(env, reg + 1)) << 32);
>   }

Just curious, does greg_read_pair() work with impair %reg?


  reply	other threads:[~2026-09-02 21:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:33 [PATCH v2 00/11] Hexagon: exception, interrupt, system reg fixes Brian Cain
2026-09-01 17:33 ` [PATCH v2 01/11] target/hexagon: align exceptions for user/sysemu Brian Cain
2026-09-01 17:33 ` [PATCH v2 02/11] tests/tcg/hexagon: check priv instructions raise SIGILL Brian Cain
2026-09-01 17:33 ` [PATCH v2 03/11] hw/intc: clear pending bit on l2vic de-assertion Brian Cain
2026-09-02 21:30   ` Philippe Mathieu-Daudé
2026-09-03 19:33     ` Brian Cain
2026-09-01 17:33 ` [PATCH v2 04/11] target/hexagon: guard writes to unimplemented guest registers Brian Cain
2026-09-01 18:25   ` Pierrick Bouvier
2026-09-01 17:33 ` [PATCH v2 05/11] target/hexagon: take BQL when reading the system pcycle count Brian Cain
2026-09-01 17:33 ` [PATCH v2 06/11] target/hexagon: gate GPCYCLE guest register reads on SSR:CE Brian Cain
2026-09-02 21:16   ` Philippe Mathieu-Daudé [this message]
2026-09-03 19:36     ` Brian Cain
2026-09-04 13:19       ` Philippe Mathieu-Daudé
2026-09-01 17:33 ` [PATCH v2 07/11] target/hexagon: read UTIMERLO/UTIMERHI from the global timer Brian Cain
2026-09-02 21:21   ` Philippe Mathieu-Daudé
2026-09-01 17:33 ` [PATCH v2 08/11] target/hexagon: raise imprecise exception on multi-TLB match Brian Cain
2026-09-01 17:33 ` [PATCH v2 09/11] target/hexagon: implement direct-to-guest interrupt delivery Brian Cain
2026-09-01 18:26   ` Pierrick Bouvier
2026-09-01 17:33 ` [PATCH v2 10/11] target/hexagon: fix iassign{r, w} to cover all threads Brian Cain via qemu development
2026-09-01 17:33 ` [PATCH v2 11/11] tests/functional/hexagon: update to v0.2.12, +test_{interrupts, sys_regs} Brian Cain via qemu development

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=f7f34a43-c1cc-4dd8-a859-9ab72e1b015f@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=deller@gmx.de \
    --cc=laurent@vivier.eu \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --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 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.