[regression][powerpc] some vcpus are found offline inside guest with different vsmt setting from qemu-cmdline and breaks subsequent vcpu hotplug operation (xive)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Gustavo Romero |
Bug Description
Env:
Host: Power9 HW ppc64le
# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 24-31,40-159
Thread(s) per core: 4
Core(s) per socket: 16
Socket(s): 2
NUMA node(s): 2
Model: 2.3 (pvr 004e 1203)
Model name: POWER9, altivec supported
Frequency boost: enabled
CPU max MHz: 3800.0000
CPU min MHz: 2300.0000
L1d cache: 1 MiB
L1i cache: 1 MiB
L2 cache: 8 MiB
L3 cache: 160 MiB
NUMA node0 CPU(s): 24-31,40-79
NUMA node8 CPU(s): 80-159
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Mitigation; RFI Flush, L1D private per thread
Vulnerability Mds: Not affected
Vulnerability Meltdown: Mitigation; RFI Flush, L1D private per thread
Vulnerability Spec store bypass: Mitigation; Kernel entry/exit barrier (eieio)
Vulnerability Spectre v1: Mitigation; __user pointer sanitization, ori31 speculation barrier enabled
Vulnerability Spectre v2: Mitigation; Software count cache flush (hardware accelerated), Software link stack flush
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Host Kernel: 5.9.0-0.
Guest Kernel: Fedora33(
Qemu: e12ce85b2c79d83
Steps to reproduce:
Boot below kvm guest: (-M pseries,vsmt=2 -smp 8,cores=
/home/
lscpu inside guest:
Actual:
[root@atest-guest ~]# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0,2,4,6
Off-line CPU(s) list: 1,3,5,7 -------
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Model: 2.3 (pvr 004e 1203)
Model name: POWER9 (architected), altivec supported
Hypervisor vendor: KVM
Virtualization type: para
L1d cache: 128 KiB
L1i cache: 128 KiB
NUMA node0 CPU(s): 0,2,4,6
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Mitigation; RFI Flush, L1D private per thread
Vulnerability Mds: Not affected
Vulnerability Meltdown: Mitigation; RFI Flush, L1D private per thread
Vulnerability Spec store bypass: Mitigation; Kernel entry/exit barrier (eieio)
Vulnerability Spectre v1: Mitigation; __user pointer sanitization, ori31
Vulnerability Spectre v2: Mitigation; Software count cache flush (hardwar
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Expected:
[root@atest-guest ~]# lscpu
Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 8
Socket(s): 1
NUMA node(s): 1
Model: 2.3 (pvr 004e 1203)
Model name: POWER9 (architected), altivec supported
Hypervisor vendor: KVM
Virtualization type: para
L1d cache: 256 KiB
L1i cache: 256 KiB
NUMA node0 CPU(s): 0-7
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Mitigation; RFI Flush, L1D private per thread
Vulnerability Mds: Not affected
Vulnerability Meltdown: Mitigation; RFI Flush, L1D private per thread
Vulnerability Spec store bypass: Mitigation; Kernel entry/exit barrier (eieio)
Vulnerability Spectre v1: Mitigation; __user pointer sanitization, ori31
Vulnerability Spectre v2: Mitigation; Software count cache flush (hardwar
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
There by further vcpuhotplug operation fails...
Changed in qemu: | |
assignee: | nobody → Gustavo Romero (gromero) |
Did a git bisect and the bad commit is
acbdb9956fe93f4 669141f103cb543 d3025775db is the first bad commit 669141f103cb543 d3025775db
commit acbdb9956fe93f4
Author: Cédric Le Goater <email address hidden>
Date: Thu Aug 20 15:45:46 2020 +0200
spapr/xive: Allocate IPIs independently from the other sources
The vCPU IPIs are now allocated in kvmppc_ xive_cpu_ connect( ) when the xive_source_ reset()
vCPU connects to the KVM device and not when all the sources are reset
in kvmppc_
This requires extra care for hotplug vCPUs and VM restore.
Signed-off-by: Cédric Le Goater <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: David Gibson <email address hidden>
hw/intc/ spapr_xive_ kvm.c | 47 +++++++ +++++++ +++++++ +++++++ +++++++ +++++++ -----
1 file changed, 42 insertions(+), 5 deletions(-)
# git bisect log 193959225cdeaa9 382746c91cc] Update version for v5.1.0 release 93959225cdeaa93 82746c91cc 5d3e86930ed2bde 969425c790c] Merge remote-tracking branch 'remotes/ kevin/tags/ for-upstream' into staging d3e86930ed2bde9 69425c790c 49c36650a8c217a 1ef9bd6e62a] hw/riscv: Sort the Kconfig options in alphabetical order 9c36650a8c217a1 ef9bd6e62a c2ad35e3b42401a 26b48a87f26] target/hppa: Fix boot with old Linux installation CDs 2ad35e3b42401a2 6b48a87f26 ee829b9775879d4 ff9f77c2442] Merge remote-tracking branch 'remotes/ ehabkost/ tags/machine- next-pull- request' into staging e829b9775879d4f f9f77c2442 72fc5dd262df9d3 ac8680d767b] hw/usb: Add U2F device check to passthru mode 2fc5dd262df9d3a c8680d767b 8ad1cad0689a86c ca9f307e353] tcg: Implement 256-bit dup for tcg_gen_ gvec_dup_ mem ad1cad0689a86cc a9f307e353 8d02669d97ebdc3 47d650f274d] target/microblaze: Cache mem_index in DisasContext d02669d97ebdc34 7d650f274d 8e90eb756a80d67 e6435246cae] block/nvme: Extract nvme_poll_queue() e90eb756a80d67e 6435246cae 2ef55cca47c7535 d9409bf03c7] target/microblaze: Convert msrclr, msrset to decodetree ef55cca47c7535d 9409bf03c7 275a469394af72c 999d0134bb5] Merge remote-tracking branch 'remotes/ rth/tags/ pull-tcg- 20200903' into staging 75a469394af72c9 99d0134bb5 c4b6869f21db0c7 57c0c191104] Merge remote-tracking branch 'remotes/ dgibson/ tags/ppc- for-5.2- 20200908' into staging 4b6869f21db0c75 7c0c191104 331b335801a06bd bef026f02e1] oss-fuzz: fix rpath 31b335801a06bdb ef026f02e1 b3ebc3bd5942968 59587f8f3c8] Merge remote-tracking branch 'remotes/ rth/tags/ pull-mb- 20200907- 2' into staging
git bisect start
# good: [d0ed6a69d399ae
git bisect good d0ed6a69d399ae1
# bad: [7daf8f8d011cdd
git bisect bad 7daf8f8d011cdd5
# skip: [7595a65818ea9b
git bisect skip 7595a65818ea9b4
# skip: [3b65b742543bc6
git bisect skip 3b65b742543bc6c
# bad: [f4ef8c9cc10b3b
git bisect bad f4ef8c9cc10b3be
# good: [4ee40a6b98c02b
git bisect good 4ee40a6b98c02b7
# skip: [fe4b0b5bfa96c3
git bisect skip fe4b0b5bfa96c38
# skip: [287b1defeb4439
git bisect skip 287b1defeb44398
# skip: [7a1fb2ef40df50
git bisect skip 7a1fb2ef40df508
# good: [536e340f464d7c
git bisect good 536e340f464d7c2
# good: [227de21ed0759e
git bisect good 227de21ed0759e2
# bad: [b95ba83fc56ebf
git bisect bad b95ba83fc56ebfc
# good: [789035f1239054
git bisect good 789035f12390543
# good: [00942071a0eabe
git bisect good 00942071a0eabeb3...