[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 1/1] QEMU plugin interface extension
From: |
Florian Hauschild |
Subject: |
Re: [RFC PATCH 1/1] QEMU plugin interface extension |
Date: |
Tue, 24 Aug 2021 16:34:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Am 21.08.21 um 15:18 schrieb Peter Maydell:
> On Sat, 21 Aug 2021 at 10:48, Florian Hauschild
> <florian.hauschild@fs.ei.tum.de> wrote:
>>
>> This extension covers functions:
>> * to read and write guest memory
>> * to read and write guest registers
>> * to flush tb cache
>> * to control single stepping of qemu from plugin
>>
>> These changes allow the user to
>> * collect more information about the behaviour of the system
>> * change the guest state with a plugin during execution
>> * control cache of tcg
>> * allow for precise instrumentation in execution flow
>
>> +
>> +static int plugin_read_register(CPUState *cpu, GByteArray *buf, int reg)
>> +{
>> + CPUClass *cc = CPU_GET_CLASS(cpu);
>> + if (reg < cc->gdb_num_core_regs) {
>> + return cc->gdb_read_register(cpu, buf, reg);
>> + }
>> + return 0;
>> +}
>
> At the point where these functions execute is the emulation
> definitely stopped (ie no register values currently held
> live in TCG locals) ?
>
> -- PMM
>
I am not sure, if it is definitely stopped.
I call them during tb_exec_cb and insn_exec_cb.
I have used the extension on ARM and RISC-V single cpu guests and the
data collected is the one i would expect during normal execution on real
hardware. How this would behave on a multi cpu/core system i have not
tested yet.
Currently i am looking into this and as soon as i have found an answer i
will write back again.
Regards
Florian
Re: [RFC PATCH 0/1] QEMU TCG plugin interface extensions, Alexandre IOOSS, 2021/08/21