From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Emanuele Giuseppe Esposito <eesposit@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eduardo Habkost <eduardo@habkost.net>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Yanan Wang <wangyanan55@huawei.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v3 1/3] accel: introduce accelerator blocker API
Date: Fri, 18 Nov 2022 08:35:14 +0100 [thread overview]
Message-ID: <6febdfbb-1d13-bbfc-1dc5-4f8fa788fc48@linaro.org> (raw)
In-Reply-To: <e8e6fce8-9912-7684-d4c3-c30d731bfcd7@linaro.org>
On 18/11/22 08:32, Philippe Mathieu-Daudé wrote:
> On 11/11/22 16:47, Emanuele Giuseppe Esposito wrote:
>> This API allows the accelerators to prevent vcpus from issuing
>> new ioctls while execting a critical section marked with the
Typo "executing".
>> accel_ioctl_inhibit_begin/end functions.
>>
>> Note that all functions submitting ioctls must mark where the
>> ioctl is being called with accel_{cpu_}ioctl_begin/end().
>>
>> This API requires the caller to always hold the BQL.
>> API documentation is in sysemu/accel-blocker.h
>>
>> Internally, it uses a QemuLockCnt together with a per-CPU QemuLockCnt
>> (to minimize cache line bouncing) to keep avoid that new ioctls
>> run when the critical section starts, and a QemuEvent to wait
>> that all running ioctls finish.
>>
>> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
>> ---
>> accel/accel-blocker.c | 154 +++++++++++++++++++++++++++++++++
>> accel/meson.build | 2 +-
>> hw/core/cpu-common.c | 2 +
>> include/hw/core/cpu.h | 3 +
>> include/sysemu/accel-blocker.h | 56 ++++++++++++
>> 5 files changed, 216 insertions(+), 1 deletion(-)
>> create mode 100644 accel/accel-blocker.c
>> create mode 100644 include/sysemu/accel-blocker.h
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
next prev parent reply other threads:[~2022-11-18 7:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 15:47 [PATCH v3 0/3] KVM: allow listener to stop all vcpus before Emanuele Giuseppe Esposito
2022-11-11 15:47 ` [PATCH v3 1/3] accel: introduce accelerator blocker API Emanuele Giuseppe Esposito
2022-11-18 7:32 ` Philippe Mathieu-Daudé
2022-11-18 7:35 ` Philippe Mathieu-Daudé [this message]
2022-12-02 6:56 ` Robert Hoo
2022-11-11 15:47 ` [PATCH v3 2/3] KVM: keep track of running ioctls Emanuele Giuseppe Esposito
2022-11-17 19:27 ` David Hildenbrand
2022-11-18 9:53 ` Emanuele Giuseppe Esposito
2022-12-02 6:54 ` Robert Hoo
2022-12-02 12:03 ` Emanuele Giuseppe Esposito
2022-12-02 13:32 ` Robert Hoo
2022-12-02 14:32 ` Emanuele Giuseppe Esposito
2022-11-11 15:47 ` [PATCH v3 3/3] kvm: Atomic memslot updates Emanuele Giuseppe Esposito
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=6febdfbb-1d13-bbfc-1dc5-4f8fa788fc48@linaro.org \
--to=philmd@linaro.org \
--cc=eduardo@habkost.net \
--cc=eesposit@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=pbonzini@redhat.com \
--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