5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-05 09:17:55 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
Thomas Lamprecht
35c93dde5b query-machine-capabilities: factor out preparing output directory
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-17 19:12:39 +01:00
Thomas Lamprecht
390e77d438 query-machine-capabilities: use macro for output paths and error helpers
This moves all error output to stderr while at it and fixes some bad
references to wrong paths in some error messages.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-17 19:12:04 +01:00
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