Skip to content

Add Hypervisor Vendor #147

Merged
klauspost merged 2 commits intoklauspost:masterfrom
numtide:feat/vm-detection
Aug 5, 2024
Merged

Add Hypervisor Vendor #147
klauspost merged 2 commits intoklauspost:masterfrom
numtide:feat/vm-detection

Conversation

@brianmcgee
Copy link
Copy Markdown
Contributor

Reads the hypervisor vendor as per https://lwn.net/Articles/301888/ and adds it to the CPUInfo struct.

Also fixes the vendor mapping for KVM.

Last few bytes are ascii null characters: "KVMKVMKVM\0\0\0". When parsed by `valAsString` this shows up as just "KVMKVMKVM".

Tested manually in a QEMU VM with KVM using https://github.com/numtide/nixos-facter.
Copy link
Copy Markdown
Owner

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klauspost klauspost merged commit 92d5326 into klauspost:master Aug 5, 2024
@klauspost
Copy link
Copy Markdown
Owner

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants