qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	kvm@vger.kernel.org, "Zhao Liu" <zhao1.liu@intel.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH 0/9] accel: Only include qdev-realized vCPUs in global &cpus_queue
Date: Fri, 7 Feb 2025 16:45:40 +0100	[thread overview]
Message-ID: <20250207164540.0f9ac1d7@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20250128142152.9889-1-philmd@linaro.org>

On Tue, 28 Jan 2025 15:21:43 +0100
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:

> Hi,
> 
> The goal of this series is to expose vCPUs in a stable state
> to the accelerators, in particular the QDev 'REALIZED' step.

I'll take some of your patches (with Richard's feedback fixed),
and respin series focusing mostly on realize part.
(and drop wire/unwire parts, reshuffling cpu code instead)

> 
> To do so we split the QTAILQ_INSERT/REMOVE calls from
> cpu_list_add() / cpu_list_remove(), by moving them to the
> DeviceClass::[un]wire() handlers, guaranty to be called just
> before a vCPU is exposed to the guest, as "realized".
> 
> First we have to modify how &first_cpu is used in TCG round
> robin implementation, and ensure we invalidate the TB jmpcache
> with &qemu_cpu_list locked.
> 
> I'm really out of my comfort zone here, so posting as RFC. At
> least all test suite is passing...
> 
> I expect these changes to allow CPUState::cpu_index clarifications
> and simplifications, but this will be addressed (and commented) in
> a separate series.
> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (9):
>   accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn()
>   accel/tcg: Invalidate TB jump cache with global vCPU queue locked
>   cpus: Remove cpu from global queue after UNREALIZE completed
>   hw/qdev: Introduce DeviceClass::[un]wire() handlers
>   cpus: Add DeviceClass::[un]wire() stubs
>   cpus: Call hotplug handlers in DeviceWire()
>   cpus: Only expose REALIZED vCPUs to global &cpus_queue
>   accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*()
>   accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*()
> 
>  include/hw/qdev-core.h       |  7 +++++++
>  accel/kvm/kvm-all.c          |  9 ---------
>  accel/tcg/tb-maint.c         |  2 ++
>  accel/tcg/tcg-accel-ops-rr.c | 15 ++++++++-------
>  cpu-common.c                 |  2 --
>  cpu-target.c                 |  7 ++-----
>  hw/core/cpu-common.c         | 18 +++++++++++++++++-
>  hw/core/qdev.c               | 20 +++++++++++++++++++-
>  8 files changed, 55 insertions(+), 25 deletions(-)
> 



  parent reply	other threads:[~2025-02-07 15:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 14:21 [RFC PATCH 0/9] accel: Only include qdev-realized vCPUs in global &cpus_queue Philippe Mathieu-Daudé
2025-01-28 14:21 ` [RFC PATCH 1/9] accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn() Philippe Mathieu-Daudé
2025-01-28 19:44   ` Richard Henderson
2025-01-28 14:21 ` [RFC PATCH 2/9] accel/tcg: Invalidate TB jump cache with global vCPU queue locked Philippe Mathieu-Daudé
2025-01-28 20:05   ` Richard Henderson
2025-01-28 14:21 ` [RFC PATCH 3/9] cpus: Remove cpu from global queue after UNREALIZE completed Philippe Mathieu-Daudé
2025-01-28 20:08   ` Richard Henderson
2025-01-28 14:21 ` [RFC PATCH 4/9] hw/qdev: Introduce DeviceClass::[un]wire() handlers Philippe Mathieu-Daudé
2025-01-28 20:52   ` Richard Henderson
2025-02-04 13:39     ` Igor Mammedov
2025-01-28 14:21 ` [PATCH 5/9] cpus: Add DeviceClass::[un]wire() stubs Philippe Mathieu-Daudé
2025-01-28 20:53   ` Richard Henderson
2025-01-28 14:21 ` [PATCH 6/9] cpus: Call hotplug handlers in DeviceWire() Philippe Mathieu-Daudé
2025-01-28 20:53   ` Richard Henderson
2025-01-28 14:21 ` [RFC PATCH 7/9] cpus: Only expose REALIZED vCPUs to global &cpus_queue Philippe Mathieu-Daudé
2025-01-28 20:53   ` Richard Henderson
2025-01-28 20:55   ` Richard Henderson
2025-01-28 14:21 ` [PATCH 8/9] accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*() Philippe Mathieu-Daudé
2025-01-28 20:57   ` Richard Henderson
2025-01-28 14:21 ` [PATCH 9/9] accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*() Philippe Mathieu-Daudé
2025-01-28 20:58   ` Richard Henderson
2025-02-07 15:45 ` Igor Mammedov [this message]
2025-02-09 18:02   ` [RFC PATCH 0/9] accel: Only include qdev-realized vCPUs in global &cpus_queue Philippe Mathieu-Daudé

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=20250207164540.0f9ac1d7@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=harshpb@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.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).