aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/i8259.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-06-09 08:56:26 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:51 -0400
commitc5af89b68abb26eea5e745f33228f4d672f115e5 (patch)
treeaad12571ebedea7b869adbeec27e614c498715f4 /arch/x86/kvm/i8259.c
parentd555c333aa544b222fe077adcd5dfea024b2c913 (diff)
KVM: Introduce kvm_vcpu_is_bsp() function.
Use it instead of open code "vcpu_id zero is BSP" assumption. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8259.c')
-rw-r--r--arch/x86/kvm/i8259.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index bf94a45f4f86..148c52a608d6 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -57,7 +57,7 @@ static void pic_unlock(struct kvm_pic *s)
57 } 57 }
58 58
59 if (wakeup) { 59 if (wakeup) {
60 vcpu = s->kvm->vcpus[0]; 60 vcpu = s->kvm->bsp_vcpu;
61 if (vcpu) 61 if (vcpu)
62 kvm_vcpu_kick(vcpu); 62 kvm_vcpu_kick(vcpu);
63 } 63 }
@@ -254,7 +254,7 @@ void kvm_pic_reset(struct kvm_kpic_state *s)
254{ 254{
255 int irq, irqbase, n; 255 int irq, irqbase, n;
256 struct kvm *kvm = s->pics_state->irq_request_opaque; 256 struct kvm *kvm = s->pics_state->irq_request_opaque;
257 struct kvm_vcpu *vcpu0 = kvm->vcpus[0]; 257 struct kvm_vcpu *vcpu0 = kvm->bsp_vcpu;
258 258
259 if (s == &s->pics_state->pics[0]) 259 if (s == &s->pics_state->pics[0])
260 irqbase = 0; 260 irqbase = 0;
@@ -512,7 +512,7 @@ static void picdev_read(struct kvm_io_device *this,
512static void pic_irq_request(void *opaque, int level) 512static void pic_irq_request(void *opaque, int level)
513{ 513{
514 struct kvm *kvm = opaque; 514 struct kvm *kvm = opaque;
515 struct kvm_vcpu *vcpu = kvm->vcpus[0]; 515 struct kvm_vcpu *vcpu = kvm->bsp_vcpu;
516 struct kvm_pic *s = pic_irqchip(kvm); 516 struct kvm_pic *s = pic_irqchip(kvm);
517 int irq = pic_get_irq(&s->pics[0]); 517 int irq = pic_get_irq(&s->pics[0]);
518 518