From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Rowan Hart <rowanbhart@gmail.com>, qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 3/3] Add inject plugin and x86_64 target for the inject plugin
Date: Mon, 9 Dec 2024 10:38:26 -0800 [thread overview]
Message-ID: <0886af3d-31f0-4bb8-8eb6-2f5f01a16192@linaro.org> (raw)
In-Reply-To: <8e25cab2-6809-4a66-b3f1-f9570f408614@gmail.com>
On 12/6/24 17:02, Rowan Hart wrote:
>>> +++ b/tests/tcg/plugins/inject.c
>>
>> Could we find a better name?
>
> For sure, maybe "hypercalls.c" since that's really what it's mostly about.
>
Sounds good.
>>> @@ -0,0 +1,206 @@
>>> +/*
>>> + * Copyright (C) 2024, Rowan Hart <rowanbhart@gmail.com>
>>> + *
>>> + * License: GNU GPL, version 2 or later.
>>> + * See the COPYING file in the top-level directory.
>>> + */
>>
>> We can add a comment here about what the plugin is doing.
>
> Will do!
>
>> One challenge with picking a random value, is how to ensure this pattern has no other meaning for all architectures? I'm not sure we can find a single pattern of bytes that works for all arch, even though that would be definitely stylish :).
>>
>> In more, it seems that we are reinventing the syscall interface, while we already have it. But as the current instrumentation only works for user-mode, having a specific hypercall interface might be worth it for plugins, so system mode could benefit from it too.
>>
>> The work done here could serve later to define a proper interface.
>
>
> I'll see what I can do about this. SIMICS supports many architectures and has a
> "magic instruction" interface[0] (basically hypercalls) and has these
> instructions defined per-architecture in a way that at minimum there are 12
> values available which work on every architecture the simulator supports. QEMU
> supports more architectures than SIMICS but I think we could start there and
> follow a similar approach.
>
> [0]:
> https://intel.github.io/tsffs/simics/simics-user-guide/breakpoints.html#Magic-Breakpoints
>
Looks like a good model to reuse if we want to implement something similar.
> -Rowan
next prev parent reply other threads:[~2024-12-09 18:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 10:26 [PATCH v2 0/3] Add additional plugin API functions to read and write memory and registers Rowan Hart
2024-12-06 10:26 ` [PATCH v2 1/3] Expose gdb_write_register function to consumers of gdbstub Rowan Hart
2025-01-09 12:03 ` Alex Bennée
2024-12-06 10:26 ` [PATCH v2 2/3] Add plugin API functions for register R/W, hwaddr R/W, vaddr W Rowan Hart
2025-01-09 12:22 ` Alex Bennée
2024-12-06 10:26 ` [PATCH v2 3/3] Add inject plugin and x86_64 target for the inject plugin Rowan Hart
2024-12-06 19:57 ` Pierrick Bouvier
2024-12-07 1:02 ` Rowan Hart
2024-12-09 18:38 ` Pierrick Bouvier [this message]
2024-12-06 19:43 ` [PATCH v2 0/3] Add additional plugin API functions to read and write memory and registers Pierrick Bouvier
2024-12-07 0:57 ` Rowan Hart
2024-12-09 18:45 ` Pierrick Bouvier
2024-12-10 11:38 ` Alex Bennée
2024-12-10 18:40 ` 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=0886af3d-31f0-4bb8-8eb6-2f5f01a16192@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=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rowanbhart@gmail.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).