qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Alexandre Iooss" <erdnaxe@crans.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v5 2/7] plugins: save value during memory accesses
Date: Sat, 6 Jul 2024 12:04:09 -0700	[thread overview]
Message-ID: <99f95fee-5633-4fba-8695-4cb6cee4b477@linaro.org> (raw)
In-Reply-To: <e8613098-74e2-4c14-9f47-24cc7a6b0b62@linaro.org>

On 7/5/24 09:34, Richard Henderson wrote:
> On 7/4/24 17:34, Pierrick Bouvier wrote:
>> +static void
>> +plugin_gen_mem_callbacks_i32(TCGv_i32 val,
>> +                             TCGv_i64 copy_addr, TCGTemp *orig_addr,
>> +                             MemOpIdx oi, enum qemu_plugin_mem_rw rw)
>> +{
>> +#ifdef CONFIG_PLUGIN
>> +    if (tcg_ctx->plugin_insn != NULL) {
>> +        tcg_gen_st_i32(val, tcg_env,
>> +                       offsetof(CPUState, neg.plugin_mem_value_low) -
>> +                       sizeof(CPUState));
>> +        plugin_gen_mem_callbacks(copy_addr, orig_addr, oi, rw);
>> +    }
>> +#endif
>> +}
> 
> You need the big-endian offset for the low half of the uint64_t:
> 
>     HOST_BIG_ENDIAN * 4.
> 

Oh right, thanks. Will fix in v6.

> 
> r~


  reply	other threads:[~2024-07-06 19:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05  0:34 [PATCH v5 0/7] plugins: access values during a memory read/write Pierrick Bouvier
2024-07-05  0:34 ` [PATCH v5 1/7] plugins: fix mem callback array size Pierrick Bouvier
2024-07-05  0:34 ` [PATCH v5 2/7] plugins: save value during memory accesses Pierrick Bouvier
2024-07-05 16:34   ` Richard Henderson
2024-07-06 19:04     ` Pierrick Bouvier [this message]
2024-07-05  0:34 ` [PATCH v5 3/7] plugins: extend API to get latest memory value accessed Pierrick Bouvier
2024-07-05  1:54   ` Xingtao Yao (Fujitsu) via
2024-07-05  0:34 ` [PATCH v5 4/7] tests/tcg: add mechanism to run specific tests with plugins Pierrick Bouvier
2024-07-05  0:34 ` [PATCH v5 5/7] tests/tcg: allow to check output of plugins Pierrick Bouvier
2024-07-05  0:34 ` [PATCH v5 6/7] tests/plugin/mem: add option to print memory accesses Pierrick Bouvier
2024-07-05  1:46   ` Xingtao Yao (Fujitsu) via
2024-07-05  0:34 ` [PATCH v5 7/7] tests/tcg/x86_64: add test for plugin memory access Pierrick Bouvier
2024-07-06 19:13 ` [PATCH v5 0/7] plugins: access values during a memory read/write Pierrick Bouvier

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=99f95fee-5633-4fba-8695-4cb6cee4b477@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    /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).