]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: fix handling of CPU family/model/stepping in SEV validation
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 25 Aug 2023 08:32:25 +0000 (09:32 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 29 Aug 2023 10:44:59 +0000 (11:44 +0100)
commit6b95437c175af9056413268502d20485f00c8cbe
tree877917c0d7468464b32f5645ddc9cf2ff42121b5
parentd40c6cad64fda4767ea7b2567d129eeac8557d6f
tools: fix handling of CPU family/model/stepping in SEV validation

The SEV-ES boot measurement includes the initial CPU register state
(VMSA) and one of the fields includes the CPU identification. When
building a VMSA blob we get the CPU family/model/stepping from the
host capabilities, however, the VMSA must reflect the guest CPU not
host CPU. Thus using host capabilities is only when whe the guest
has the 'host-passthrough' CPU mode active. With 'host-model' it is
cannot be assumed host and guest match, because QEMU may not (yet)
have a named CPU model for a given host CPU.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tools/virt-qemu-sev-validate