From: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
To: qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [PATCH 0/1] Check SMT based on KVM_CAP_PPC_SMT_POSSIBLE
Date: Fri, 5 Jan 2018 22:47:21 -0200 [thread overview]
Message-ID: <20180106004722.1152-1-joserz@linux.vnet.ibm.com> (raw)
If one defines a P9 guest like -smp sockets=1,cores=1,threads=8 QEMU will silently changes threads to 4:
(guest) # lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 4
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
...
(qemu) info cpus
* CPU #0: nip=0xc0000000000db9cc thread_id=9440
CPU #1: nip=0xc0000000000db9cc thread_id=9441
CPU #2: nip=0xc0000000000db9cc thread_id=9442
CPU #3: nip=0xc0000000000db9cc thread_id=9443
CPU #4: nip=0x0000000000000100 (halted) thread_id=9444
CPU #5: nip=0x0000000000000100 (halted) thread_id=9445
CPU #6: nip=0x0000000000000100 (halted) thread_id=9446
CPU #7: nip=0x0000000000000100 (halted) thread_id=9447
This behavior is causing confusion and QEMU will crash if one tries to hotplug a CPU. QEMU already has a number of SMT sane checking and this patch adds another one: it verifies if KVM supports (KVM_CAP_PPC_SMT_POSSIBLE) the required number of threads instead of impose a value defined in the compat table.
Result:
(guest) # lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 8
Core(s) per socket: 1
Socket(s): 1
...
(qemu) info cpus
* CPU #0: nip=0xc0000000000d30ac thread_id=80197
CPU #1: nip=0xc0000000000d30ac thread_id=80198
CPU #2: nip=0xc0000000000d30ac thread_id=80199
CPU #3: nip=0xc0000000000d30ac thread_id=80200
CPU #4: nip=0xc0000000000d30ac thread_id=80201
CPU #5: nip=0xc0000000000d30ac thread_id=80202
CPU #6: nip=0xc0000000000d30ac thread_id=80203
CPU #7: nip=0xc0000000000d30ac thread_id=80204
This patch is based on ppc-for-2.12
Jose Ricardo Ziviani (1):
spapr: Check SMT based on KVM_CAP_PPC_SMT_POSSIBLE
hw/ppc/spapr.c | 14 +++++++++++++-
hw/ppc/trace-events | 1 +
target/ppc/kvm.c | 5 +++++
target/ppc/kvm_ppc.h | 6 ++++++
4 files changed, 25 insertions(+), 1 deletion(-)
--
2.14.1
next reply other threads:[~2018-01-06 0:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 0:47 Jose Ricardo Ziviani [this message]
2018-01-06 0:47 ` [Qemu-devel] [PATCH 1/1] spapr: Check SMT based on KVM_CAP_PPC_SMT_POSSIBLE Jose Ricardo Ziviani
2018-01-09 12:48 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2018-01-11 0:14 ` joserz
2018-01-11 15:00 ` Greg Kurz
2018-01-11 11:29 ` Laurent Vivier
2018-01-11 13:10 ` Laurent Vivier
2018-01-11 14:16 ` [Qemu-devel] " David Gibson
2018-01-12 3:46 ` David Gibson
2018-01-12 9:24 ` [Qemu-devel] [Qemu-ppc] " joserz
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=20180106004722.1152-1-joserz@linux.vnet.ibm.com \
--to=joserz@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).