[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v16 17/18] plugins: Allow to read registers
|
From: |
Alex Bennée |
|
Subject: |
Re: [PATCH v16 17/18] plugins: Allow to read registers |
|
Date: |
Thu, 02 Nov 2023 11:26:35 +0000 |
|
User-agent: |
mu4e 1.11.23; emacs 29.1 |
Akihiko Odaki <akihiko.odaki@daynix.com> writes:
> It is based on GDB protocol to ensure interface stability.
>
> The timing of the vcpu init hook is also changed so that the hook will
> get called after GDB features are initialized.
I guess this was moved into an earlier patch.
> }
> +
> +int qemu_plugin_find_register_file(unsigned int vcpu_index, const char *name)
> +{
> + QEMU_IOTHREAD_LOCK_GUARD();
What is this lock protecting against?
gdb_register_feature doesn't protect cpu->gdb_regs() when registering
features as it is implicitly per-CPU.
If GDB should be locking I would push that down into gdbstub itself (and
not use the global IOTHREAD).
> + return gdb_find_feature(qemu_get_cpu(vcpu_index), name);
> +}
> +
> +int qemu_plugin_find_register(unsigned int vcpu_index, int file,
> + const char *name)
> +{
> + QEMU_IOTHREAD_LOCK_GUARD();
> + return gdb_find_feature_register(qemu_get_cpu(vcpu_index), file, name);
> +}
> +
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
- Re: [PATCH v16 17/18] plugins: Allow to read registers,
Alex Bennée <=