All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] target/arm: replace cp_regs hashtable lookup with direct array index
Date: Wed, 03 Jun 2026 16:35:55 +0100	[thread overview]
Message-ID: <87h5njtz50.fsf@draig.linaro.org> (raw)
In-Reply-To: <17132c4d-c523-4459-b1aa-236c9046e2b6@linaro.org> (Richard Henderson's message of "Wed, 3 Jun 2026 07:22:58 -0700")

Richard Henderson <richard.henderson@linaro.org> writes:

> On 6/3/26 01:00, Alex Bennée wrote:
>>> This will not work, because each ARMCPU has separate cpreg info
>>> structures, and these structures only have the lifetime of the ARMCPU
>>> struct.  We create and destroy these at runtime, so at some point you
>>> may end up with pointers to freed memory.
>> Shouldn't it be the same set for each CPU though?
>
> I have thought for some time that the cpregs should be stored on the
> class, not the instance, so that these structures are shared, but it's
> non-trivial.

IIRC there are also some places where the list isn't complete until
realize time (I think for things like the GIC system registers).

>
> r~

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-06-03 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  9:58 [PATCH] target/arm: replace cp_regs hashtable lookup with direct array index Abdelrahman Elbehery
2026-06-02 15:19 ` abdelrahman elbehery
2026-06-02 22:18   ` Richard Henderson
2026-06-03  8:00     ` Alex Bennée
2026-06-03 14:22       ` Richard Henderson
2026-06-03 15:35         ` Alex Bennée [this message]
2026-06-02 16:28 ` Alex Bennée
2026-06-03  9:55   ` abdelrahman elbehery

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=87h5njtz50.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.