All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH RFC 3/3] Break dependency between vcpu index in vcpus array and vcpu's apic id.
Date: Thu, 28 May 2009 00:47:32 -0300	[thread overview]
Message-ID: <20090528034732.GB6090@amt.cnet> (raw)
In-Reply-To: <20090522114120.GD6052@redhat.com>

On Fri, May 22, 2009 at 02:41:20PM +0300, Gleb Natapov wrote:
> On Thu, May 21, 2009 at 05:29:57PM -0300, Marcelo Tosatti wrote:
> > On Thu, May 21, 2009 at 11:06:42PM +0300, Gleb Natapov wrote:
> > > > Why don't make a convention that vcpu_id 0 is the BSP, by default,
> > > > instead of the first vcpu created? This way if userspace creates vcpu 3
> > > > first, there are no problems.
> > > > 
> > > Because userspace no longer control vcpu_id allocation. I also want to
> > > get rid of "first vcpu is bsp" restriction, but this fill require new
> > > ioctl I guess.
> > 
> > Or hardcode "apic_id == 0 is BSP" for now, and later add an ioctl to set
> > the BSP?
> > 
> We should not assume anything about apic_ids. For instance if the number
> of ioapics+cpu cores are greater than 15 it is recommended to assign ids
> 0-(N-1) to ioapic (N is the number of ioapics). This is because ioapic
> id is only 4 bits long, but it occupies the same id space as apic ids.

If keep the behaviour like in the last patch submitted, and introduce a
new ioctl to set the BSP, you get backward compatibility for free.


  reply	other threads:[~2009-05-28  4:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 12:56 [PATCH RFC 0/3] decouple vcpu index from apic id Gleb Natapov
2009-05-21 12:56 ` [PATCH RFC 1/3] Introduce kvm_vcpu_is_bsp() function Gleb Natapov
2009-05-21 12:56 ` [PATCH RFC 2/3] Use pointer to vcpu instead of vcpu_id in timer code Gleb Natapov
2009-05-21 12:56 ` [PATCH RFC 3/3] Break dependency between vcpu index in vcpus array and vcpu's apic id Gleb Natapov
2009-05-21 18:21   ` Marcelo Tosatti
2009-05-21 20:06     ` Gleb Natapov
2009-05-21 20:29       ` Marcelo Tosatti
2009-05-22 11:41         ` Gleb Natapov
2009-05-28  3:47           ` Marcelo Tosatti [this message]
2009-05-28  5:11             ` Gleb Natapov

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=20090528034732.GB6090@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.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 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.