From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Bharata B Rao" <bharata@linux.vnet.ibm.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH RFC 0/4] target-i386: PC socket/core/thread modeling, part 1
Date: Mon, 23 Mar 2015 18:31:59 +0100 [thread overview]
Message-ID: <1427131923-4670-1-git-send-email-afaerber@suse.de> (raw)
Hello,
This long-postponed series proposes a hierarchical QOM model of socket
and core objects for the x86 PC machines.
Background is that due to qdev limitations we had to introduce an ICC bus
to be able to hot-add CPUs and their APICs. By now this limitation could be
resolved via a QOM hotplug handler interface.
However, the QOM hotplug model is associated with having link<> properties.
Given that physically we cannot hot-add hyperthreads but full CPU sockets,
this series prepares the underbelly for having those link properties be of
the new type X86CPUSocket rather than X86CPU.
As final step in this series, the X86CPU allocation model is changed to be
init'ed in-place, as part of an "atomic" socket object. A follow-up will be
to attempt the same in-place allocation model for the APIC; one difficulty
there is that several places do a NULL check for the APIC pointer as quick
way of telling whether an APIC is present or not.
NOT IN THIS SERIES is converting cpu-add to the same socket/core/thread model
and initializing them in-place. The current PoC implementation assumes that
CPUs get added sequentially and that the preceding CPU can be used to obtain
the core via unclean QOM parent accesses.
IIUC that must be changed so that an arbitrary thread added via cpu-add
creates the full socket and core(s). That would work best if indexed link<>
properties could be used. That's an undecided design question of whether
we want to have /machine/cpu-socket[n] or whether it makes sense to integrate
NUMA modeling while at it and rather have /machine/node[n]/socket[m].
Note that this socket modeling is not only PC-specific in the softmmu sense
but also in that not every X86CPU must be on a socket (e.g., Quark X1000).
Therefore it was a concious decision to not label some things target-i386
and to place code in pc.c rather than cpu.c.
Further note that it is ignored here that -smp enforces that AMD CPUs don't
have hyperthreads, i.e. AMD X86CPUs will have only one thread[n] child<>.
Context:
qemu.git master
"pc: Ensure non-zero CPU ref count after attaching to ICC bus"
-> this series adding socket/core objects
cpu-add conversion
APIC cleanups
Available for testing here:
git://github.com/afaerber/qemu-cpu.git qom-cpu-x86-sockets-1.v1
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86-sockets-1.v1
Regards,
Andreas
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Andreas Färber (4):
cpu: Prepare Socket container type
target-i386: Prepare CPU socket/core abstraction
pc: Create sockets and cores for CPUs
pc: Create initial CPUs in-place
hw/cpu/Makefile.objs | 2 +-
hw/cpu/socket.c | 21 ++++++++++
hw/i386/Makefile.objs | 1 +
hw/i386/cpu-core.c | 45 +++++++++++++++++++++
hw/i386/cpu-socket.c | 45 +++++++++++++++++++++
hw/i386/pc.c | 95 ++++++++++++++++++++++++++++++++++++++++----
include/hw/cpu/socket.h | 14 +++++++
include/hw/i386/cpu-core.h | 29 ++++++++++++++
include/hw/i386/cpu-socket.h | 29 ++++++++++++++
9 files changed, 272 insertions(+), 9 deletions(-)
create mode 100644 hw/cpu/socket.c
create mode 100644 hw/i386/cpu-core.c
create mode 100644 hw/i386/cpu-socket.c
create mode 100644 include/hw/cpu/socket.h
create mode 100644 include/hw/i386/cpu-core.h
create mode 100644 include/hw/i386/cpu-socket.h
--
2.1.4
next reply other threads:[~2015-03-23 17:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 17:31 Andreas Färber [this message]
2015-03-23 17:32 ` [Qemu-devel] [PATCH RFC 1/4] cpu: Prepare Socket container type Andreas Färber
2015-03-23 17:32 ` [Qemu-devel] [PATCH RFC 2/4] target-i386: Prepare CPU socket/core abstraction Andreas Färber
2015-03-23 17:32 ` [Qemu-devel] [PATCH RFC 3/4] pc: Create sockets and cores for CPUs Andreas Färber
2015-03-25 16:55 ` Bharata B Rao
2015-03-25 17:13 ` Andreas Färber
2015-03-26 2:24 ` Bharata B Rao
2015-03-23 17:32 ` [Qemu-devel] [PATCH RFC 4/4] pc: Create initial CPUs in-place Andreas Färber
2015-03-24 14:33 ` [Qemu-devel] [PATCH RFC 0/4] target-i386: PC socket/core/thread modeling, part 1 Christian Borntraeger
2015-03-26 17:39 ` Igor Mammedov
2015-04-07 12:43 ` [Qemu-devel] cpu modelling and hotplug (was: [PATCH RFC 0/4] target-i386: PC socket/core/thread modeling, part 1) Christian Borntraeger
2015-04-07 15:07 ` Igor Mammedov
2015-04-08 7:07 ` [Qemu-devel] cpu modelling and hotplug Christian Borntraeger
2015-04-23 7:32 ` [Qemu-devel] cpu modelling and hotplug (was: [PATCH RFC 0/4] target-i386: PC socket/core/thread modeling, part 1) David Gibson
2015-04-23 7:37 ` David Gibson
2015-04-23 13:17 ` Eduardo Habkost
2015-04-27 10:46 ` David Gibson
2015-10-22 1:27 ` [Qemu-devel] cpu modelling and hotplug Zhu Guihua
2015-10-22 16:52 ` Andreas Färber
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=1427131923-4670-1-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=bharata@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).