Commit Graph

3 Commits

Author SHA1 Message Date
Thomas Lamprecht
99e54ad6c3 query-machine-capabilities: factor out querying the CPU
to make the code easier to read.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-17 19:12:04 +01:00
Thomas Lamprecht
bd62724fcd query-machine-capabilities: fix indentation
do not propagate that absolute mess of mixing tabs and spaces to new
programs that ain't perl and thus doesn't need to suffer.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-17 19:12:04 +01:00
Markus Frank
c9eee44b47 add C program to get hardware capabilities from CPUID
Implement a C program that extracts AMD SEV hardware information such
as reduced-phys-bios and cbitpos from CPUID, looks if SEV, SEV-ES &
SEV-SNP are enabled, and outputs these details as JSON to
/run/qemu-server/host-hw-capabilities.json

This program can also be used to read and save other hardware
information.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2024-11-17 18:37:03 +01:00