qemu-ppc
[Top][All Lists]
Advanced

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

Re: x86_64 emulation on ppc64le POWER9 hardware - no multi threading


From: Jan Walzer
Subject: Re: x86_64 emulation on ppc64le POWER9 hardware - no multi threading
Date: Thu, 20 Aug 2020 17:50:45 +0000

Just to give some Feedback on this, because I got involved in Kim’s project:

We got qemu working with -accel tcg,thread=multi and confirmed the 
multithreading in the host.
But: Only when calling qemu directly. Because the “thread=multi” doesn’t seem 
to kick in automatically we need to supply that as an option

Involving a recent libvirt makes matters difficult.
We are using: 
# apt-cache policy libvirt-daemon
libvirt-daemon:
 Installed: 6.5.0-1
 Candidate: 6.5.0-1
 Version table:
*** 6.5.0-1 500
       500 http://deb.debian.org/debian testing/main ppc64el Packages 

The thing is: I even managed to supply the arguments to qemu via:
 <qemu:commandline>
   <qemu:arg value='-accel'/>
   <qemu:arg value='tcg,thread=multi'/>
 </qemu:commandline>

BUT: this conflicts with the parameter “-machine accel=tcg” that’s called 
independently. 

This is at the moment, of course, a problem of libvirtd and not qemu - 
nevertheless, I wonder why there is this mismatch in options or rather, why is 
this a conflicting option?

It seems the call, that libvirt tries to issue is along the lines: “ … -machine 
q35,accel=tcg -accel tcg,thread=multi …” which, in my opinion, should not 
conflict and is perfectly valid.

Is someone able to explain the reasoning to me, maybe I didn’t grasp the qemu 
cli-option syntax completely yet.

Greetings, Jan


> Am 06.08.20, 08:15 schrieb "Kim-Norman Sahm" <kim-norman.sahm@cloudical.io>:
> 
>   Hi Cedric,
> 
>   could you send me your complete xml file?
>   I get the error: process exited while connecting to monitor: 
> 2020-08-03T17:43:50.146851Z qemu-system-x86_64: The -accel and "-machine 
> accel=" options are incompatible.
> 
>   Best regards
>   KIm
> 
>   Am 03.08.20, 19:37 schrieb "Cédric Le Goater" <clg@kaod.org>:
> 
>       Again, with a correct answer,
> 
>       On 8/3/20 3:47 PM, Kim-Norman Sahm wrote:
>> hi,
>> 
>> 
>> 
>> i’m running Debian 10 on POWER9 and would like to spawn x86_64 emulated VMs.
>> 
>> The virtual machine is configured to run with 8 vpus but it’s very slow.
>> 
>> On the host you can see that the qemu-system-x86_64 process is using just 
>> one core!
>> 
>> 
>> 
>> Ppc64le guests are using multi cores, so its looks like an config problem or 
>> software bug with the x86 emulator.
> 
>       On a Power9 host (20.04), I did the following changes to an x86 domain :
> 
>         <domain type='qemu' 
> xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> 
>       and at the end of the domain file  :
>         <qemu:commandline>
>           <qemu:arg value='-accel'/>
>           <qemu:arg value='tcg,thread=multi'/>
>         </qemu:commandline>
> 
>       The topology is defined as : 
> 
>         <cpu mode='custom' match='exact' check='none'>
>           <model fallback='forbid'>qemu64</model>
>           <topology sockets='1' cores='12' threads='2'/>
>         </cpu>
> 
>       The VM is using MTTCG, as reported by top on the host :
> 
>           PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
> COMMAND
>       5761 libvirt+  20   0   23.5g   1.8g  21888 R  2167   1.4   6:10.82 
> qemu-system-x86
> 
>       In the guest :
> 
>       $ lscpu 
>       Architecture:                    x86_64
>       CPU op-mode(s):                  32-bit, 64-bit
>       Byte Order:                      Little Endian
>       Address sizes:                   40 bits physical, 48 bits virtual
>       CPU(s):                          24
>       On-line CPU(s) list:             0-23
>       Thread(s) per core:              1
>       Core(s) per socket:              24
>       Socket(s):                       1
>       NUMA node(s):                    1
>       Vendor ID:                       AuthenticAMD
>       CPU family:                      6
>       Model:                           6
>       Model name:                      QEMU Virtual CPU version 2.1.0
>       Stepping:                        3
>       CPU MHz:                         511.035
>       BogoMIPS:                        1022.07
>       Virtualization:                  AMD-V
>       L1d cache:                       1.5 MiB
>       L1i cache:                       1.5 MiB
>       L2 cache:                        12 MiB
>       NUMA node0 CPU(s):               0-23
>       Vulnerability L1tf:              Not affected
>       Vulnerability Mds:               Not affected
>       Vulnerability Meltdown:          Not affected
>       Vulnerability Spec store bypass: Vulnerable
>       Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers 
> and __user
>                                         pointer sanitization
>       Vulnerability Spectre v2:        Mitigation; Full generic retpoline, 
> STIBP disab
>                                        led, RSB filling
>       Flags:                           fpu de pse tsc msr pae mce cx8 apic 
> sep mtrr pg
>                                        e mca cmov pat pse36 clflush mmx fxsr 
> sse sse2 
>                                        ht syscall nx lm nopl cpuid pni cx16 
> popcnt hyp
>                                        ervisor lahf_lm cmp_legacy svm abm 
> sse4a 3dnowp
>                                        refetch vmmcall
> 
> 
>       Cheers,
> 
>       C. 
> 
> 


reply via email to

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