summary refs log tree commit diff
path: root/x86_64/host_cpuid.c
Commit message (Collapse)AuthorAge
* x86_64: fill cache info in cpuid, stop spoofing CPU vendor idSlava Malyugin2018-07-09
The fix passes through cache-related CPU entries 2, 4, 0x80000005 and 0x80000006 similar to how QEMU does it. Note passing this cpuid info itself is not sufficient unless CPU vendor is something Linux kernel recognizes. Therefore, I am removing cute spoofing of the vendor id, allowing host value to pass through. I believe it is generally a bad idea to spoof vendor id as lots of kernel and user space code gets confused and may take unoptimized paths. The corollary is that removing the spoofing may have unintended consequences correctness- and performance-wise. I would appreciate recommendation on additional testing. BUG=chromium:859678 TEST=lscpu in Guest, 'cargo test' Change-Id: I6963b00d9eecf49fb4578bcc75ad744c3099f045 Reviewed-on: https://chromium-review.googlesource.com/1125529 Commit-Ready: Slava Malyugin <slavamn@chromium.org> Tested-by: Slava Malyugin <slavamn@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>