[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 21/30] target/ppc: Introduce PowerPCCPUClass::has_work()
- To: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>, Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>
- From: Richard Henderson <richard.henderson@xxxxxxxxxx>
- Date: Fri, 3 Sep 2021 22:42:02 +0200
- Cc: qemu-devel@xxxxxxxxxx, Bin Meng <bin.meng@xxxxxxxxxxxxx>, Eduardo Habkost <ehabkost@xxxxxxxxxx>, Greg Kurz <groug@xxxxxxxx>, haxm-team@xxxxxxxxx, Kamil Rytarowski <kamil@xxxxxxxxxx>, qemu-ppc@xxxxxxxxxx, Anthony Perard <anthony.perard@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Michael Rolnik <mrolnik@xxxxxxxxx>, qemu-riscv@xxxxxxxxxx, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Chris Wulff <crwulff@xxxxxxxxx>, Laurent Vivier <lvivier@xxxxxxxxxx>, Cameron Esfahani <dirty@xxxxxxxxx>, Sunil Muthuswamy <sunilmut@xxxxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Taylor Simpson <tsimpson@xxxxxxxxxxx>, qemu-s390x@xxxxxxxxxx, Bastian Koppelmann <kbastian@xxxxxxxxxxxxxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Artyom Tarasenko <atar4qemu@xxxxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, Roman Bolshakov <r.bolshakov@xxxxxxxxx>, Laurent Vivier <laurent@xxxxxxxxx>, Cornelia Huck <cohuck@xxxxxxxxxx>, qemu-arm@xxxxxxxxxx, Wenchao Wang <wenchao.wang@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Marek Vasut <marex@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Aleksandar Rikalo <aleksandar.rikalo@xxxxxxxxxx>, Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx>, Colin Xu <colin.xu@xxxxxxxxx>, Claudio Fontana <cfontana@xxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>, Reinoud Zandijk <reinoud@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx
- Delivery-date: Fri, 03 Sep 2021 20:42:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 9/3/21 2:50 AM, David Gibson wrote:
On Thu, Sep 02, 2021 at 06:15:34PM +0200, Philippe Mathieu-Daudé wrote:
Each POWER cpu has its own has_work() implementation. Instead of
overloading CPUClass on each PowerPCCPUClass init, register the
generic ppc_cpu_has_work() handler, and have it call the POWER
specific has_work().
I don't quite see the rationale for introducing a second layer of
indirection here. What's wrong with switching the base has_work for
each cpu variant?
We're moving the hook from CPUState to TCGCPUOps.
Phil was trying to avoid creating N versions of
static const struct TCGCPUOps ppc_tcg_ops = {
...
};
A plausible alternative is to remove the const from this struct and modify it, just as we
do for CPUState, on the assumption that we cannot mix and match ppc cpu types in any one
machine.
r~
|