Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache topology under virtual guests #30

Closed
dd86k opened this issue Nov 13, 2021 · 3 comments
Closed

Cache topology under virtual guests #30

dd86k opened this issue Nov 13, 2021 · 3 comments
Assignees
Labels
enhancement library ddcpuid library

Comments

@dd86k
Copy link
Owner

dd86k commented Nov 13, 2021

Cache detected is affected when running under a virtual guest.

Even cpufetch is affected (i7-3770):

L1i Size:   32KB (64KB Total)
L1d Size:   32KB (64KB Total)
L2 Size:    256KB (512KB Total)
L3 Size:    8MB (16MB Total)

0.18.1:

L1-D: 2x   32 KiB
L1-I: 2x   32 KiB
L2-U: 2x  256 KiB
L3-U: 2x    8 MiB

0.19-master:

Cache L1-D:  2x 32KB    (64KB)
Cache L1-I:  2x 32KB    (64KB)
Cache L2-U:  2x 256KB   (512KB)
Cache L3-U:  2x 8MB     (16MB)

Now I haven't really checked if this is due to the Hyper-V paravirtualization in VirtualBox but this seems to be appearing frequently. I will have to do another post with different virtual platforms (e.g., VMware, VirtualBox, KVM, QEMU, etc.) and paravirtualization platforms.

@dd86k
Copy link
Owner Author

dd86k commented Nov 22, 2021

Version: 0.19

Under KVM (OVH): (supposed to have 4 cores)

Name:        GenuineIntel Intel Core Processor (Haswell, no TSX)
Identifier:  Family 0x6 Model 0x3c Stepping 0x1
Cores:       1 cores 1 threads
Max. Memory: 1TB physical 256TB virtual
Techs:       x86-64-v3
SSE:         SSE SSE2 SSE3 SSSE3 SSE4.2
AVX:         AVX AVX2
AMX:         None
Others:      AES-NI BMI1 BMI2
Mitigations: MD_CLEAR
ParaVirt.:   KVM
Cache L1-D:  1x 32KB    (32KB)   SI NWBV
Cache L1-I:  1x 32KB    (32KB)   SI NWBV
Cache L2-U:  1x 4MB     (4MB)    SI NWBV
Cache L3-U:  1x 16MB    (16MB)   SI CI CCI

Table

With relevant data

| Leaf     | Sub-leaf | EAX      | EBX      | ECX      | EDX      |
|----------|----------|----------|----------|----------|----------|
|        4 |        0 |      121 |  1c0003f |       3f |        1 |
|        4 |        1 |      122 |  1c0003f |       3f |        1 |
|        4 |        2 |      143 |  3c0003f |      fff |        1 |
|        4 |        3 |      163 |  3c0003f |     3fff |        6 |
|        4 |        4 |        0 |        0 |        0 |        0 |
|        b |        0 |        0 |        1 |      100 |        2 |
|        b |        1 |        0 |        1 |      201 |        2 |
|        b |        2 |        0 |        0 |        2 |        2 |

@dd86k dd86k self-assigned this Nov 26, 2021
@dd86k
Copy link
Owner Author

dd86k commented Mar 27, 2022

e.g.,

  • adjusting core count and not showing "0 cores, 1 thread".
  • Only Intel calculations have this issue. AMD seems.. fine

@dd86k dd86k added the library ddcpuid library label Jan 10, 2023
@dd86k
Copy link
Owner Author

dd86k commented Jul 24, 2023

Related to #43 and cache topo modified by vmm is probably normal anyway

@dd86k dd86k closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement library ddcpuid library
Projects
None yet
Development

No branches or pull requests

1 participant