mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-04 02:29:57 +00:00

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>
19 lines
466 B
Makefile
19 lines
466 B
Makefile
DESTDIR=
|
|
PREFIX=/usr
|
|
BINDIR=${PREFIX}/libexec/qemu-server
|
|
|
|
CC ?= gcc
|
|
CFLAGS += -O2 -fanalyzer -Werror -Wall -Wextra -Wpedantic -Wtype-limits -Wl,-z,relro -std=gnu11
|
|
|
|
query-machine-capabilities: query-machine-capabilities.c
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
|
|
|
.PHONY: install
|
|
install: query-machine-capabilities
|
|
install -d ${DESTDIR}/${BINDIR}
|
|
install -m 0755 query-machine-capabilities ${DESTDIR}${BINDIR}
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f query-machine-capabilities
|