qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-devel]


From: Thomas Huth
Subject: Re: [qemu-devel]
Date: Tue, 15 Nov 2022 08:44:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 14/11/2022 23.58, Pawel Polawski wrote:
Hi Everyone,

I am trying to check qemu virtual cpu boundaries when running a custom
edk2 based firmware build. For that purpose I want to run qemu with more than 1024 vCPU:
$QEMU
-accel kvm
-m 4G
-M q35,kernel-irqchip=on,smm=on
-smp cpus=1025,maxcpus=1025 -global mch.extended-tseg-mbytes=128
-drive if=pflash,format=raw,file=${CODE},readonly=on
-drive if=pflash,format=raw,file=${VARS}
-chardev stdio,id=fwlog
-device isa-debugcon,iobase=0x402,chardev=fwlog "$@"

The result is as follows:
QEMU emulator version 7.0.50 (v7.0.0-1651-g9cc1bf1ebc-dirty)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
qemu-system-x86_64: -accel kvm: warning: Number of SMP cpus requested (1025) exceeds the recommended cpus supported by KVM (8) Number of SMP cpus requested (1025) exceeds the maximum cpus supported by KVM (1024)

It is not clear to me if I am hitting qemu limitation or KVM limitation here.
I have changed hardcoded 1024 limits in hw/i386/* files but the limitation is still presented.

Can someone advise what I should debug next looking for those vCPU limits?

Well, the error message says it: There is a limitation in KVM, i.e. in the kernel code, too. I think it is KVM_MAX_VCPUS in the file arch/x86/include/asm/kvm_host.h of the Linux kernel sources... so if you're brave, you might want to increase that value there and rebuild your own kernel. Not sure whether that works, though.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]