[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question on s390x topology: KVM only, or also TCG?

From: Thomas Huth
Subject: Re: question on s390x topology: KVM only, or also TCG?
Date: Thu, 14 Mar 2024 16:54:59 +0100
User-agent: Mozilla Thunderbird

On 14/03/2024 16.49, Claudio Fontana wrote:
Hello Pierre, Ilya,

I have a question on the s390x "topology" feature and examples.

Mainly, is this feature supposed to be KVM accelerator-only, or also available 
when using the TCG accelerator?

 Hi Claudio!

Pierre left IBM, please CC: Nina with regards to s390x topology instead.

But with regards to your question, I think I can answer that, too: The topology feature is currently working with KVM only, yes. It hasn't been implemented for TCG yet.

(docs/devel/s390-cpu-topology.rst vs 

I see stsi-topology.c in target/s390x/kvm/ , so that part is clearly 

but in hw/s390x/cpu-topology.c I read:

  * - The first part in this file is taking care of all common functions
  *   used by KVM and TCG to create and modify the topology.
  * - The second part, building the topology information data for the
  *   guest with CPU and KVM specificity will be implemented inside
  *   the target/s390/kvm sub tree.

In the docs/devel/s390-cpu-topology.rst

I see the example command:

  qemu-system-s390x \
     -enable-kvm \
     -cpu z14,ctop=on \
     -smp 1,drawers=3,books=3,sockets=2,cores=2,maxcpus=36 \
     -device z14-s390x-cpu,core-id=19,entitlement=high \
     -device z14-s390x-cpu,core-id=11,entitlement=low \
     -device z14-s390x-cpu,core-id=12,entitlement=high \

which uses KVM only.

In https://www.qemu.org/docs/master/system/s390x/cpu-topology.html

I read:

To use the CPU topology, you need to run with KVM on a s390x host that uses the 
Linux kernel v6.0 or newer (which provide the so-called 
KVM_CAP_S390_CPU_TOPOLOGY capability that allows QEMU to signal the CPU 
topology facility via the so-called STFLE bit 11 to the VM).

So I would assume this is KVM-only, but then in the "Examples" section below I 
see the example:

$ qemu-system-s390x -m 2G \
   -cpu gen16b,ctop=on \
   -smp cpus=5,sockets=8,cores=4,maxcpus=32 \
   -device host-s390x-cpu,core-id=14 \


qemu-system-s390x -m 2G \
   -cpu gen16b,ctop=on \
   -smp cpus=1,sockets=8,cores=4,maxcpus=32 \
   -device gen16b-s390x-cpu,drawer-id=1,book-id=1,socket-id=2,core-id=1 \
   -device gen16b-s390x-cpu,drawer-id=1,book-id=1,socket-id=2,core-id=2 \
   -device gen16b-s390x-cpu,drawer-id=1,book-id=1,socket-id=2,core-id=3 \
   -device gen16b-s390x-cpu,drawer-id=0,book-id=0,socket-id=0,core-id=9 \
   -device gen16b-s390x-cpu,drawer-id=0,book-id=0,socket-id=0,core-id=14 \
   -device gen16b-s390x-cpu,core-id=4,dedicated=on,entitlement=high

We received questions about this, so I hope you can shed some light, maybe it 
would be good to just update the web page to include -accel kvm or -enable-kvm 
everywhere for clarity?

Yes, it would be better to include "-accel kvm" in those examples. Would you like to send a patch?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]