runtime: Don't error out about SNP cert path on non SNP platforms

This error is specific to SNP platforms, so let's make sure we only
error this out when an SNP platform is used.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio 2024-09-04 11:54:52 +02:00
parent 13517cf9c1
commit b10256a7ca

View File

@ -299,6 +299,16 @@ func (h hypervisor) firmware() (string, error) {
}
func (h hypervisor) snpCertsPath() (string, error) {
// snpCertsPath only matter when using Confidential Guests
if !h.ConfidentialGuest {
return "", nil
}
// snpCertsPath only matter for SNP guests
if !h.SevSnpGuest {
return "", nil
}
p := h.SnpCertsPath
if p == "" {