From 56812c852f96988b584a7e5c2859d8e2bc6db738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sat, 9 Nov 2024 23:19:20 +0100 Subject: [PATCH] Reapply "runtime: confidential: Do not set the max_vcpu to cpu" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f15e16b69229c5aafde14072eb05f971d80a3c2e, as we don't have to do this since we're relying on the `static_sandbox_resource_mgmt` feature, which gives us the correct amount of memory and CPUs to be allocated. Signed-off-by: Fabiano FidĂȘncio --- src/runtime/virtcontainers/hypervisor_config_linux.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/runtime/virtcontainers/hypervisor_config_linux.go b/src/runtime/virtcontainers/hypervisor_config_linux.go index f41cd22bd4..1bcd47218c 100644 --- a/src/runtime/virtcontainers/hypervisor_config_linux.go +++ b/src/runtime/virtcontainers/hypervisor_config_linux.go @@ -58,11 +58,6 @@ func validateHypervisorConfig(conf *HypervisorConfig) error { conf.DefaultMaxVCPUs = defaultMaxVCPUs } - if conf.ConfidentialGuest && conf.NumVCPUs() != conf.DefaultMaxVCPUs { - hvLogger.Warnf("Confidential guests do not support hotplugging of vCPUs. Setting DefaultMaxVCPUs to NumVCPUs (%d)", conf.NumVCPUs()) - conf.DefaultMaxVCPUs = conf.NumVCPUs() - } - if conf.Msize9p == 0 && conf.SharedFS != config.VirtioFS { conf.Msize9p = defaultMsize9p }