From 57bc05f7df187ed0f83d6afba2b51f4a3a5cfaa8 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 3 Apr 2025 20:55:12 +0200 Subject: [PATCH] cpu config: sev type: small code style fix Signed-off-by: Thomas Lamprecht --- PVE/QemuServer/CPUConfig.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm index 9ae1996b..193de26e 100644 --- a/PVE/QemuServer/CPUConfig.pm +++ b/PVE/QemuServer/CPUConfig.pm @@ -831,12 +831,15 @@ sub get_hw_capabilities { } return $hw_capabilities; } + sub get_amd_sev_type { my ($conf) = @_; return undef if !$conf->{'amd-sev'}; - return PVE::JSONSchema::parse_property_string($sev_fmt, $conf->{'amd-sev'})->{type}; + my $sev = PVE::JSONSchema::parse_property_string($sev_fmt, $conf->{'amd-sev'}); + + return $sev->{type}; } sub get_amd_sev_object {