qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Avi Kivity <avi@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp
Date: Sun, 07 Mar 2010 14:44:50 +0100	[thread overview]
Message-ID: <4B93ADD2.1000405@web.de> (raw)
In-Reply-To: <4B938481.70307@web.de>

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

Jan Kiszka wrote:
> Gleb Natapov wrote:
>> On Thu, Mar 04, 2010 at 02:03:54PM +0200, Gleb Natapov wrote:
>>>> BTW, do real systems allow to hot plug BSP as well? Or how is the case
>>>> handled when you unplug the BSP and then reboot the box?
>>>>
>>> Did you mean hot unplug BSP? OS determines what CPU is BSP by checking
>>> BSP bit in APIC base register. My guess is that there is some pin on CPU
>>> which value is mirrored as BSP bit in APIC base register. Board may have
>>> some logic to check what sockets are populated and chose one of them as
>>> BSP by pulling its pin up. But this is only guess.
>>>
>> Actually this is much more simple:
>> SDM 8.4.1:
>>  The MP initialization protocol defines two classes of processors: the
>>  bootstrap processor (BSP) and the application processors (APs). Following
>>  a power-up or RESET of an MP system, system hardware dynamically selects
>>  one of the processors on the system bus as the BSP. The remaining
>>  processors are designated as APs.
>> And by "hardware" they mean CPUs themselves over apic BUS.
> 
> That should be straightforward, will have a look. I just want to ensure
> that cpu_is_bsp delivers a valid result all the time. Otherwise we will
> run into ordering issues again once some new user of this services shows up.
> 

...but you have to explain to me how CPU hotplugging in current qemu-kvm
is supposed to work. 'cpu_set n offline' does not have any visible
effect: Linux still allows to bring such a CPU online again, and it is
also brought up again after reset.

Besides this, I would probably need some other OS to test offlining the
BSP - Linux does not appear to support it.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2010-03-07 13:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 17:17 [Qemu-devel] [PATCH v4 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 01/10] qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 02/10] qemu-kvm: Rework VCPU state writeback API Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp Jan Kiszka
2010-03-03 16:00   ` [Qemu-devel] " Gleb Natapov
2010-03-03 23:34     ` Jan Kiszka
2010-03-04  6:47       ` Gleb Natapov
2010-03-04  8:23         ` Jan Kiszka
2010-03-04  8:35           ` Gleb Natapov
2010-03-04 11:35             ` Jan Kiszka
2010-03-04 12:03               ` Gleb Natapov
2010-03-07  6:36                 ` Gleb Natapov
2010-03-07 10:48                   ` Jan Kiszka
2010-03-07 13:44                     ` Jan Kiszka [this message]
2010-03-07 13:50                       ` Gleb Natapov
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 04/10] qemu-kvm: Clean up mpstate synchronization Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 05/10] KVM: x86: Restrict writeback of VCPU state Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 06/10] qemu-kvm: Use VCPU event state for reset and vmsave/load Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 08/10] qemu-kvm: Clean up KVM's APIC hooks Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 09/10] qemu-kvm: Move kvm_set_boot_cpu_id Jan Kiszka
2010-03-01 17:17 ` [Qemu-devel] [PATCH v4 10/10] qemu-kvm: Bring qemu_init_vcpu back home Jan Kiszka
2010-03-01 17:21 ` [Qemu-devel] Re: [PATCH v4 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code Jan Kiszka
2010-03-01 20:01 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B93ADD2.1000405@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).