All of lore.kernel.org
 help / color / mirror / Atom feed
* [qemu-devel]
@ 2022-11-14 22:58 Pawel Polawski
  2022-11-15  7:44 ` [qemu-devel] Thomas Huth
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel Polawski @ 2022-11-14 22:58 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

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?

Best regards,
Pawel

-- 

Paweł Poławski

Red Hat <https://www.redhat.com/> Virtualization

ppolawsk@redhat.com
@RedHat <https://twitter.com/redhat>   Red Hat
<https://www.linkedin.com/company/red-hat>  Red Hat
<https://www.facebook.com/RedHatInc>
<https://red.ht/sig>

[-- Attachment #2: Type: text/html, Size: 3810 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [qemu-devel]
  2022-11-14 22:58 [qemu-devel] Pawel Polawski
@ 2022-11-15  7:44 ` Thomas Huth
  2022-11-15  9:01   ` [qemu-devel] Pawel Polawski
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2022-11-15  7:44 UTC (permalink / raw)
  To: Pawel Polawski, qemu-devel; +Cc: KVM

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [qemu-devel]
  2022-11-15  7:44 ` [qemu-devel] Thomas Huth
@ 2022-11-15  9:01   ` Pawel Polawski
  0 siblings, 0 replies; 4+ messages in thread
From: Pawel Polawski @ 2022-11-15  9:01 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, KVM

[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]

Hi Thomas,

Thank you for the suggestion about the next step.
Do you know if there is an option to change this parameter in the runtime?
While looking for answer I found this presentation from 2008 which makes me
think that this may not
be the only limit:
https://www.linux-kvm.org/images/b/be/KvmForum2008%24kdf2008_6.pdf
I will try to change this value in the kernel code, rebuild it and see if
it works.

PS: Just realized that my original message has split for some reason and
there are two copies on the mailing list,
each with different subjects.

Best,
Pawel

On Tue, Nov 15, 2022 at 8:44 AM Thomas Huth <thuth@redhat.com> wrote:

> 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
>
>

-- 

Paweł Poławski

Red Hat <https://www.redhat.com/> Virtualization

ppolawsk@redhat.com
@RedHat <https://twitter.com/redhat>   Red Hat
<https://www.linkedin.com/company/red-hat>  Red Hat
<https://www.facebook.com/RedHatInc>
<https://red.ht/sig>

[-- Attachment #2: Type: text/html, Size: 5288 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] ..
@ 2011-12-24 20:44 Hugo Vanwoerkom
  0 siblings, 0 replies; 4+ messages in thread
From: Hugo Vanwoerkom @ 2011-12-24 20:44 UTC (permalink / raw)
  To: jigdo-user, lm-sensors, miriamvanwoerkom, qemu-devel,
	rociobarroso, suspend2-devel


My dear Sir:
http://rimsoffuture.com/55folderwww/yttq1ytq1.php?ityCID=76


            Sat, 24 Dec 2011 21:44:05
_____________________
"Hooper and the daughter, and retreated with the boys as hurriedly as Bill could manage his handy crutch." (c) Jody-Anne vэjimeиnэm

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-15  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 22:58 [qemu-devel] Pawel Polawski
2022-11-15  7:44 ` [qemu-devel] Thomas Huth
2022-11-15  9:01   ` [qemu-devel] Pawel Polawski
  -- strict thread matches above, loose matches on Subject: below --
2011-12-24 20:44 [Qemu-devel] Hugo Vanwoerkom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.