Merge pull request #10519 from fidencio/topic/relax-restriction-for-qemu-tdx

Reapply "runtime: confidential: Do not set the max_vcpu to cpu"
This commit is contained in:
Fabiano Fidêncio
2024-11-13 16:09:06 +01:00
committed by GitHub

View File

@@ -58,11 +58,6 @@ func validateHypervisorConfig(conf *HypervisorConfig) error {
conf.DefaultMaxVCPUs = defaultMaxVCPUs 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 { if conf.Msize9p == 0 && conf.SharedFS != config.VirtioFS {
conf.Msize9p = defaultMsize9p conf.Msize9p = defaultMsize9p
} }