kernel: use the maximum number of CPUs supported by KVM

Since we don't know how many CPUs can have the host, we should
use the maximum number of CPUs supported by KVM (240).

255 is the maximum number of CPUs supported in the kernel, but the
maximmum number of CPUs recommended by KVM is 240, if more than 240
CPUs are used, next error will be returned by QEMU

```
Number of hotpluggable cpus requested (255) exceeds the
recommended cpus supported by KVM (240)
```

fixes #922
fixes kata-containers/runtime#2413

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2020-01-27 20:27:48 +00:00
parent 03573d4528
commit ba68012480
2 changed files with 4 additions and 1 deletions

View File

@ -3,3 +3,6 @@ CONFIG_X86_CPUID=y
CONFIG_X86_MSR=y
CONFIG_X86_X2APIC=y
CONFIG_X86_VERBOSE_BOOTUP=y
# Use the maximum number of CPUs supported by KVM (240)
CONFIG_NR_CPUS=240

View File

@ -1 +1 @@
63
64