public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH RFC v3 0/4] decouple vcpu index from apic id
Date: Thu, 28 May 2009 12:54:43 +0300	[thread overview]
Message-ID: <1243504487-25796-1-git-send-email-gleb@redhat.com> (raw)

Currently vcpu_id is used as an index into vcpus array and as apic id
on x86.  This is incorrect since apic ids not have to be continuous
(they can also encode cpu hierarchy information) and may have values
bigger then vcpu array in case of x2apic. This series removes use of
vcpu_id as vcpus array index. Each architecture may use it how it sees
fit. x86 uses it as apic id.

v2:
In this version vcpus[] is managed by generic code.

v3:
New ioctl is added to specify vcpu_id of bsp vcpu. To maintain backwards
compatibility by default vcpu_id == 0 is bsp.

Gleb Natapov (4):
  Introduce kvm_vcpu_is_bsp() function.
  Use pointer to vcpu instead of vcpu_id in timer code.
  Break dependency between vcpu index in vcpus array and vcpu_id.
  Use macro to iterate over vcpus.

 arch/ia64/kvm/kvm-ia64.c   |   35 ++++++++++--------------
 arch/ia64/kvm/vcpu.c       |    2 +-
 arch/powerpc/kvm/powerpc.c |   16 +++++++----
 arch/s390/kvm/kvm-s390.c   |   33 +++++++++++------------
 arch/x86/kvm/i8254.c       |   13 +++-----
 arch/x86/kvm/i8259.c       |    6 ++--
 arch/x86/kvm/kvm_timer.h   |    2 +-
 arch/x86/kvm/lapic.c       |    9 +++---
 arch/x86/kvm/mmu.c         |    6 ++--
 arch/x86/kvm/svm.c         |    4 +-
 arch/x86/kvm/timer.c       |    2 +-
 arch/x86/kvm/vmx.c         |    6 ++--
 arch/x86/kvm/x86.c         |   29 ++++++++++----------
 include/linux/kvm.h        |    2 +
 include/linux/kvm_host.h   |   18 ++++++++++++
 virt/kvm/ioapic.c          |    4 ++-
 virt/kvm/irq_comm.c        |    6 +---
 virt/kvm/kvm_main.c        |   63 +++++++++++++++++++++++--------------------
 18 files changed, 138 insertions(+), 118 deletions(-)


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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28  9:54 Gleb Natapov [this message]
2009-05-28  9:54 ` [PATCH RFC v3 1/4] Introduce kvm_vcpu_is_bsp() function Gleb Natapov
2009-05-28  9:54 ` [PATCH RFC v3 2/4] Use pointer to vcpu instead of vcpu_id in timer code Gleb Natapov
2009-05-28  9:54 ` [PATCH RFC v3 3/4] Break dependency between vcpu index in vcpus array and vcpu_id Gleb Natapov
2009-06-02 12:38   ` Marcelo Tosatti
2009-06-02 13:42     ` Gleb Natapov
2009-05-28  9:54 ` [PATCH RFC v3 4/4] Use macro to iterate over vcpus 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=1243504487-25796-1-git-send-email-gleb@redhat.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox