-
Bug
-
Resolution: Won't Do
-
Normal
-
None
-
rhel-9.0.0
-
None
-
Moderate
-
rhel-sst-virtualization
-
ssg_virtualization
-
None
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
Unspecified
-
None
Description of problem:
When trying to match my CPU numa topology I noticed I'm not able to properly configure the CPU caches. With the recommended '<cache mode="passthrough"/>' it sets the sizes correctly, but the topology is different (guest reports L2 cache shared between 2 CPUs while host has separate ones) and without the '<cache mode="passthrough"/>' it the topology is correct but the sizes are wrong (bigger than on host).
Version-Release number of selected component (if applicable):
libvirt-8.0.0-8.el9_0.x86_64
qemu-kvm-core-6.2.0-11.el9_0.2.x86_64
- also tested with the latest upstream qemu-kvm and on RHEL8 with the same results
How reproducible:
Always
Steps to Reproduce:
1. Create a guest with a fixed and well defined CPU mapping
2. Compare "lstopo" outputs from host and guest
Actual results (with cache mode=passthrough):
Machine (19GB total)
L3 L#0 (14MB)
Package L#0
NUMANode L#0 (P#0 9721MB)
L2 L#0 (1024KB) + L1d L#0 (32KB) + L1i L#0 (32KB)
Core L#0 + PU L#0 (P#0)
Core L#1 + PU L#1 (P#1)
L2 L#1 (1024KB) + L1d L#1 (32KB) + L1i L#1 (32KB)
Core L#2 + PU L#2 (P#2)
Core L#3 + PU L#3 (P#3)
L2 L#2 (1024KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#4 + PU L#4 (P#4)
Package L#1
NUMANode L#1 (P#1 10070MB)
L2 L#3 (1024KB) + L1d L#3 (32KB) + L1i L#3 (32KB)
Core L#5 + PU L#5 (P#5)
Core L#6 + PU L#6 (P#6)
L2 L#4 (1024KB) + L1d L#4 (32KB) + L1i L#4 (32KB)
Core L#7 + PU L#7 (P#7)
Core L#8 + PU L#8 (P#8)
L2 L#5 (1024KB) + L1d L#5 (32KB) + L1i L#5 (32KB) + Core L#9 + PU L#9 (P#9)
Actual results (without cache mode=passthrough):
Machine (19GB total)
Package L#0
NUMANode L#0 (P#0 9758MB)
L3 L#0 (16MB)
L2 L#0 (4096KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0)
L2 L#1 (4096KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1)
L2 L#2 (4096KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2)
L2 L#3 (4096KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3)
L2 L#4 (4096KB) + L1d L#4 (32KB) + L1i L#4 (32KB) + Core L#4 + PU L#4 (P#4)
Package L#1
NUMANode L#1 (P#1 10034MB)
L3 L#1 (16MB)
L2 L#5 (4096KB) + L1d L#5 (32KB) + L1i L#5 (32KB) + Core L#5 + PU L#5 (P#5)
L2 L#6 (4096KB) + L1d L#6 (32KB) + L1i L#6 (32KB) + Core L#6 + PU L#6 (P#6)
L2 L#7 (4096KB) + L1d L#7 (32KB) + L1i L#7 (32KB) + Core L#7 + PU L#7 (P#7)
L2 L#8 (4096KB) + L1d L#8 (32KB) + L1i L#8 (32KB) + Core L#8 + PU L#8 (P#8)
L2 L#9 (4096KB) + L1d L#9 (32KB) + L1i L#9 (32KB) + Core L#9 + PU L#9 (P#9)
Expected results:
Machine (19GB total)
Package L#0
NUMANode L#0 (P#0 9758MB)
L3 L#0 (14MB)
L2 L#0 (1024KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0)
L2 L#1 (1024KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1)
L2 L#2 (1024KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2)
L2 L#3 (1024KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3)
L2 L#4 (1024KB) + L1d L#4 (32KB) + L1i L#4 (32KB) + Core L#4 + PU L#4 (P#4)
Package L#1
NUMANode L#1 (P#1 10034MB)
L3 L#1 (14MB)
L2 L#5 (1024KB) + L1d L#5 (32KB) + L1i L#5 (32KB) + Core L#5 + PU L#5 (P#5)
L2 L#6 (1024KB) + L1d L#6 (32KB) + L1i L#6 (32KB) + Core L#6 + PU L#6 (P#6)
L2 L#7 (1024KB) + L1d L#7 (32KB) + L1i L#7 (32KB) + Core L#7 + PU L#7 (P#7)
L2 L#8 (1024KB) + L1d L#8 (32KB) + L1i L#8 (32KB) + Core L#8 + PU L#8 (P#8)
L2 L#9 (1024KB) + L1d L#9 (32KB) + L1i L#9 (32KB) + Core L#9 + PU L#9 (P#9)
Additional info:
Host's lstopo is:
Machine (31GB total)
Package L#0
NUMANode L#0 (P#0 15GB)
L3 L#0 (14MB)
L2 L#0 (1024KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0)
L2 L#1 (1024KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#2)
L2 L#2 (1024KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#4)
L2 L#3 (1024KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#6)
L2 L#4 (1024KB) + L1d L#4 (32KB) + L1i L#4 (32KB) + Core L#4 + PU L#4 (P#8)
L2 L#5 (1024KB) + L1d L#5 (32KB) + L1i L#5 (32KB) + Core L#5 + PU L#5 (P#10)
L2 L#6 (1024KB) + L1d L#6 (32KB) + L1i L#6 (32KB) + Core L#6 + PU L#6 (P#12)
L2 L#7 (1024KB) + L1d L#7 (32KB) + L1i L#7 (32KB) + Core L#7 + PU L#7 (P#14)
L2 L#8 (1024KB) + L1d L#8 (32KB) + L1i L#8 (32KB) + Core L#8 + PU L#8 (P#16)
L2 L#9 (1024KB) + L1d L#9 (32KB) + L1i L#9 (32KB) + Core L#9 + PU L#9 (P#18)
...
Package L#1
NUMANode L#1 (P#1 16GB)
L3 L#1 (14MB)
L2 L#10 (1024KB) + L1d L#10 (32KB) + L1i L#10 (32KB) + Core L#10 + PU L#10 (P#1)
L2 L#11 (1024KB) + L1d L#11 (32KB) + L1i L#11 (32KB) + Core L#11 + PU L#11 (P#3)
L2 L#12 (1024KB) + L1d L#12 (32KB) + L1i L#12 (32KB) + Core L#12 + PU L#12 (P#5)
L2 L#13 (1024KB) + L1d L#13 (32KB) + L1i L#13 (32KB) + Core L#13 + PU L#13 (P#7)
L2 L#14 (1024KB) + L1d L#14 (32KB) + L1i L#14 (32KB) + Core L#14 + PU L#14 (P#9)
L2 L#15 (1024KB) + L1d L#15 (32KB) + L1i L#15 (32KB) + Core L#15 + PU L#15 (P#11)
L2 L#16 (1024KB) + L1d L#16 (32KB) + L1i L#16 (32KB) + Core L#16 + PU L#16 (P#13)
L2 L#17 (1024KB) + L1d L#17 (32KB) + L1i L#17 (32KB) + Core L#17 + PU L#17 (P#15)
L2 L#18 (1024KB) + L1d L#18 (32KB) + L1i L#18 (32KB) + Core L#18 + PU L#18 (P#17)
L2 L#19 (1024KB) + L1d L#19 (32KB) + L1i L#19 (32KB) + Core L#19 + PU L#19 (P#19)
- external trackers