* [Qemu-devel] About cpu_set, CPU hotplug and related subjects
@ 2010-04-19 19:34 Lucas Meneghel Rodrigues
2010-04-22 1:12 ` [Qemu-devel] " Kevin O'Connor
0 siblings, 1 reply; 7+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-04-19 19:34 UTC (permalink / raw)
To: KVM mailing list; +Cc: qemu mailing list
Hi folks,
I've implemented a functional test for the cpu_set feature some time
ago. I was going through the patch queue and realized the patch needed
some respin, so I did it. I decided to try and see what is the state of
the feature, considering last time I tried it was not working
(segfaulting).
Now, with the latest qemu-kvm things are on a much better shape, cpu_set
is not giving me segfaults, and qemu monitor reports the new cpus added.
10:21:20 INFO | Adding 1 CPUs to guest
10:21:20 DEBUG| Sending monitor command: cpu_set 0 online
10:21:20 DEBUG| Sending monitor command: cpu_set 1 online
10:21:20 DEBUG| Sending monitor command: info cpus
10:21:20 DEBUG| Output of info cpus:
* CPU #0: pc=0xffffffff8102e23d thread_id=11035
CPU #1: pc=0x0000000000000000 thread_id=11065
The address of the CPU #1 seems a little strange. The guest OS is
completely unaware of any changes to the number of CPUs though.
After doing some reading it seems to me that the reason why that is not
happening is because SeaBIOS still doesn't have code to support CPU hot
plugging as BochsBIOS did. I also looked after some documentation about
how that feature is supposed to work, and didn't find it. So, assuming
my understanding about the current status is correct:
1) Is anybody planning on adding the necessary support to SeaBIOS
anytime soon?
2) How the whole functionality is supposed to work? My mental model goes
like this:
* cpu_set [total number of CPUs you want the system to have] online
* Guest should notice new CPUS added to the system and they appear
under /sys/devices/system/cpu/cpu*, initially offlined
* The online status of each CPU is
in /sys/devices/system/cpu/cpu*/online, and onlining it is just a matter
of writing 1 to this file
* It is not possible to downgrade the number of CPUs of the system
during the lifetime of the VM process
Thanks for your attention,
Lucas
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: About cpu_set, CPU hotplug and related subjects
2010-04-19 19:34 [Qemu-devel] About cpu_set, CPU hotplug and related subjects Lucas Meneghel Rodrigues
@ 2010-04-22 1:12 ` Kevin O'Connor
2010-04-28 9:31 ` [Qemu-devel] Re: [SeaBIOS] " Jes Sorensen
0 siblings, 1 reply; 7+ messages in thread
From: Kevin O'Connor @ 2010-04-22 1:12 UTC (permalink / raw)
To: Lucas Meneghel Rodrigues; +Cc: seabios, qemu mailing list, KVM mailing list
On Mon, Apr 19, 2010 at 04:34:54PM -0300, Lucas Meneghel Rodrigues wrote:
> After doing some reading it seems to me that the reason why that is not
> happening is because SeaBIOS still doesn't have code to support CPU hot
> plugging as BochsBIOS did.
As I understand it, the hotplug support was only in the kvm copy of
bochs bios. It also limited the number of cpus one could use (I think
16).
The current smp support in SeaBIOS doesn't limit the number of cpus.
So, there has been reluctance to just port the old kvm bios code
forward.
-Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects
2010-04-22 1:12 ` [Qemu-devel] " Kevin O'Connor
@ 2010-04-28 9:31 ` Jes Sorensen
2010-04-28 10:30 ` Gleb Natapov
0 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2010-04-28 9:31 UTC (permalink / raw)
To: Kevin O'Connor
Cc: Lucas Meneghel Rodrigues, seabios, qemu mailing list,
KVM mailing list
On 04/22/10 03:12, Kevin O'Connor wrote:
> As I understand it, the hotplug support was only in the kvm copy of
> bochs bios. It also limited the number of cpus one could use (I think
> 16).
>
> The current smp support in SeaBIOS doesn't limit the number of cpus.
>
> So, there has been reluctance to just port the old kvm bios code
> forward.
I believe the number was limited to 15, due to limits in a certain
proprietary operating system.
The issue with the AML code in BOCHS vs the code in Seabios is a bit
tricky. The tables in BOCHS are a fair bit more complicated with the
hotplug code and therefore statically generated, whereas Seabios
generates them dynamically at boot time.
Generating the more complex tables dynamically would be preferred, but
it requires like half an AML compiler in Seabios, so it kinda stalled
there....
Cheers,
Jes
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects
2010-04-28 9:31 ` [Qemu-devel] Re: [SeaBIOS] " Jes Sorensen
@ 2010-04-28 10:30 ` Gleb Natapov
2010-04-28 10:41 ` Jes Sorensen
0 siblings, 1 reply; 7+ messages in thread
From: Gleb Natapov @ 2010-04-28 10:30 UTC (permalink / raw)
To: Jes Sorensen
Cc: Lucas Meneghel Rodrigues, Kevin O'Connor, seabios,
qemu mailing list, KVM mailing list
On Wed, Apr 28, 2010 at 11:31:00AM +0200, Jes Sorensen wrote:
> On 04/22/10 03:12, Kevin O'Connor wrote:
> > As I understand it, the hotplug support was only in the kvm copy of
> > bochs bios. It also limited the number of cpus one could use (I think
> > 16).
> >
> > The current smp support in SeaBIOS doesn't limit the number of cpus.
> >
> > So, there has been reluctance to just port the old kvm bios code
> > forward.
>
> I believe the number was limited to 15, due to limits in a certain
> proprietary operating system.
>
> The issue with the AML code in BOCHS vs the code in Seabios is a bit
> tricky. The tables in BOCHS are a fair bit more complicated with the
> hotplug code and therefore statically generated, whereas Seabios
> generates them dynamically at boot time.
>
> Generating the more complex tables dynamically would be preferred, but
> it requires like half an AML compiler in Seabios, so it kinda stalled
> there....
>
We can try to be smart and generate most of the code statically and only
minimum that absolutely required dynamically. Haven't looked at how
simple dynamic part can be made.
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects
2010-04-28 10:30 ` Gleb Natapov
@ 2010-04-28 10:41 ` Jes Sorensen
2010-04-28 10:45 ` Gleb Natapov
0 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2010-04-28 10:41 UTC (permalink / raw)
To: Gleb Natapov
Cc: Lucas Meneghel Rodrigues, Kevin O'Connor, seabios,
qemu mailing list, KVM mailing list
On 04/28/10 12:30, Gleb Natapov wrote:
> On Wed, Apr 28, 2010 at 11:31:00AM +0200, Jes Sorensen wrote:
>> On 04/22/10 03:12, Kevin O'Connor wrote:
>> Generating the more complex tables dynamically would be preferred, but
>> it requires like half an AML compiler in Seabios, so it kinda stalled
>> there....
>>
> We can try to be smart and generate most of the code statically and only
> minimum that absolutely required dynamically. Haven't looked at how
> simple dynamic part can be made.
I looked at it briefly and ran away screaming :) I am sure it can be
done, bit it would require pretty good understanding of the AML encodings.
The CPU declarations are particularly tricky as they get pretty big and
complex and need to live in the DSDT, whereas a lot of other things we
can shift off to separate SSDT tables and only put the minimum that
needs to be generated dynamically in it's own table.
Cheers,
Jes
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects
2010-04-28 10:41 ` Jes Sorensen
@ 2010-04-28 10:45 ` Gleb Natapov
2010-05-11 1:09 ` Carl-Daniel Hailfinger
0 siblings, 1 reply; 7+ messages in thread
From: Gleb Natapov @ 2010-04-28 10:45 UTC (permalink / raw)
To: Jes Sorensen
Cc: Lucas Meneghel Rodrigues, Kevin O'Connor, seabios,
qemu mailing list, KVM mailing list
On Wed, Apr 28, 2010 at 12:41:51PM +0200, Jes Sorensen wrote:
> On 04/28/10 12:30, Gleb Natapov wrote:
> > On Wed, Apr 28, 2010 at 11:31:00AM +0200, Jes Sorensen wrote:
> >> On 04/22/10 03:12, Kevin O'Connor wrote:
> >> Generating the more complex tables dynamically would be preferred, but
> >> it requires like half an AML compiler in Seabios, so it kinda stalled
> >> there....
> >>
> > We can try to be smart and generate most of the code statically and only
> > minimum that absolutely required dynamically. Haven't looked at how
> > simple dynamic part can be made.
>
> I looked at it briefly and ran away screaming :) I am sure it can be
This is normal reaction to ACPI of a healthy human being.
> done, bit it would require pretty good understanding of the AML encodings.
>
> The CPU declarations are particularly tricky as they get pretty big and
> complex and need to live in the DSDT, whereas a lot of other things we
> can shift off to separate SSDT tables and only put the minimum that
> needs to be generated dynamically in it's own table.
>
We can generate complex code statically and call it from dynamically
generated CPU declarations.
--
Gleb.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects
2010-04-28 10:45 ` Gleb Natapov
@ 2010-05-11 1:09 ` Carl-Daniel Hailfinger
0 siblings, 0 replies; 7+ messages in thread
From: Carl-Daniel Hailfinger @ 2010-05-11 1:09 UTC (permalink / raw)
To: Gleb Natapov
Cc: Lucas Meneghel Rodrigues, Jes Sorensen, seabios,
qemu mailing list, KVM mailing list
On 28.04.2010 12:45, Gleb Natapov wrote:
> On Wed, Apr 28, 2010 at 12:41:51PM +0200, Jes Sorensen wrote:
>
>> The CPU declarations are particularly tricky as they get pretty big and
>> complex and need to live in the DSDT, whereas a lot of other things we
>> can shift off to separate SSDT tables and only put the minimum that
>> needs to be generated dynamically in it's own table.
>>
>>
> We can generate complex code statically and call it from dynamically
> generated CPU declarations.
>
There is some ACPI code generator in coreboot. Not sure if it is usable
for those purposes. coreboot uses it to generate AMD CPU frequency tables.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-11 1:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19 19:34 [Qemu-devel] About cpu_set, CPU hotplug and related subjects Lucas Meneghel Rodrigues
2010-04-22 1:12 ` [Qemu-devel] " Kevin O'Connor
2010-04-28 9:31 ` [Qemu-devel] Re: [SeaBIOS] " Jes Sorensen
2010-04-28 10:30 ` Gleb Natapov
2010-04-28 10:41 ` Jes Sorensen
2010-04-28 10:45 ` Gleb Natapov
2010-05-11 1:09 ` Carl-Daniel Hailfinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).