kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] decouple vcpu index from apic id
@ 2009-05-21 12:56 Gleb Natapov
  2009-05-21 12:56 ` [PATCH RFC 1/3] Introduce kvm_vcpu_is_bsp() function Gleb Natapov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Gleb Natapov @ 2009-05-21 12:56 UTC (permalink / raw)
  To: avi; +Cc: kvm

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 decouples vcpu_id and
apic_id. apic_id is arbitrary 32bit value that is passed to vcpu_create
ioctls. vcpu_id is kvm internal thing (that may be totally removed from
x86 code).

The code adds one assumption though: boot cpu is created first.

Gleb Natapov (3):
  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's apic
    id.

 arch/ia64/kvm/kvm-ia64.c        |   27 +++++++++++++++++----
 arch/ia64/kvm/vcpu.c            |    2 +-
 arch/powerpc/kvm/booke.c        |   20 +++++++++++++++-
 arch/powerpc/kvm/powerpc.c      |    7 ++++-
 arch/s390/kvm/kvm-s390.c        |   24 ++++++++++++++++--
 arch/x86/include/asm/kvm_host.h |    1 +
 arch/x86/kvm/i8254.c            |    6 ++--
 arch/x86/kvm/kvm_timer.h        |    2 +-
 arch/x86/kvm/lapic.c            |   13 +++++----
 arch/x86/kvm/svm.c              |    4 +-
 arch/x86/kvm/timer.c            |    2 +-
 arch/x86/kvm/vmx.c              |    6 ++--
 arch/x86/kvm/x86.c              |   49 ++++++++++++++++++++++++++++++++++++--
 include/linux/kvm_host.h        |   12 ++++++++-
 virt/kvm/kvm_main.c             |   25 +------------------
 15 files changed, 146 insertions(+), 54 deletions(-)


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

end of thread, other threads:[~2009-05-28  5:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-05-28  5:11             ` Gleb Natapov

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