From: Yang Zhang <yang.z.zhang@intel.com>
To: kvm@vger.kernel.org
Cc: gleb@redhat.com, mtosatti@redhat.com, xiantao.zhang@intel.com,
Yang Zhang <yang.z.zhang@Intel.com>
Subject: [PATCH v6 1/6] KVM: Add vcpu info to ioapic_update_eoi()
Date: Fri, 22 Mar 2013 13:24:00 +0800 [thread overview]
Message-ID: <1363929845-29005-2-git-send-email-yang.z.zhang@intel.com> (raw)
In-Reply-To: <1363929845-29005-1-git-send-email-yang.z.zhang@intel.com>
From: Yang Zhang <yang.z.zhang@Intel.com>
Add vcpu info to ioapic_update_eoi, so we can know which vcpu
issued this EOI.
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
---
arch/x86/kvm/lapic.c | 2 +-
virt/kvm/ioapic.c | 12 ++++++------
virt/kvm/ioapic.h | 3 ++-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index a8e9369..d3e322a 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -786,7 +786,7 @@ static void kvm_ioapic_send_eoi(struct kvm_lapic *apic, int vector)
trigger_mode = IOAPIC_LEVEL_TRIG;
else
trigger_mode = IOAPIC_EDGE_TRIG;
- kvm_ioapic_update_eoi(apic->vcpu->kvm, vector, trigger_mode);
+ kvm_ioapic_update_eoi(apic->vcpu, vector, trigger_mode);
}
}
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 5ba005c..9379386 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -267,8 +267,8 @@ void kvm_ioapic_clear_all(struct kvm_ioapic *ioapic, int irq_source_id)
spin_unlock(&ioapic->lock);
}
-static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int vector,
- int trigger_mode)
+static void __kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu,
+ struct kvm_ioapic *ioapic, int vector, int trigger_mode)
{
int i;
@@ -307,12 +307,12 @@ bool kvm_ioapic_handles_vector(struct kvm *kvm, int vector)
return test_bit(vector, ioapic->handled_vectors);
}
-void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode)
+void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, int trigger_mode)
{
- struct kvm_ioapic *ioapic = kvm->arch.vioapic;
+ struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic;
spin_lock(&ioapic->lock);
- __kvm_ioapic_update_eoi(ioapic, vector, trigger_mode);
+ __kvm_ioapic_update_eoi(vcpu, ioapic, vector, trigger_mode);
spin_unlock(&ioapic->lock);
}
@@ -410,7 +410,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
break;
#ifdef CONFIG_IA64
case IOAPIC_REG_EOI:
- __kvm_ioapic_update_eoi(ioapic, data, IOAPIC_LEVEL_TRIG);
+ __kvm_ioapic_update_eoi(NULL, ioapic, data, IOAPIC_LEVEL_TRIG);
break;
#endif
diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h
index 0400a46..2fc61a5 100644
--- a/virt/kvm/ioapic.h
+++ b/virt/kvm/ioapic.h
@@ -70,7 +70,8 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source,
int short_hand, int dest, int dest_mode);
int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2);
-void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode);
+void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector,
+ int trigger_mode);
bool kvm_ioapic_handles_vector(struct kvm *kvm, int vector);
int kvm_ioapic_init(struct kvm *kvm);
void kvm_ioapic_destroy(struct kvm *kvm);
--
1.7.1
next prev parent reply other threads:[~2013-03-22 5:28 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 5:23 [PATCH v6 0/6] Use eoi to track RTC interrupt delivery status Yang Zhang
2013-03-22 5:24 ` Yang Zhang [this message]
2013-03-22 5:24 ` [PATCH v6 2/6] KVM: Introduce struct rtc_status Yang Zhang
2013-03-22 5:24 ` [PATCH v6 3/6] KVM : Return destination vcpu on interrupt injection Yang Zhang
2013-03-22 7:05 ` Gleb Natapov
2013-03-22 7:50 ` Zhang, Yang Z
2013-03-22 7:57 ` Gleb Natapov
2013-03-22 5:24 ` [PATCH v6 4/6] KVM: Add reset/restore rtc_status support Yang Zhang
2013-03-26 14:04 ` Paolo Bonzini
2013-03-29 3:17 ` Zhang, Yang Z
2013-03-26 14:09 ` Paolo Bonzini
2013-03-29 3:19 ` Zhang, Yang Z
2013-03-22 5:24 ` [PATCH v6 5/6] KVM : Force vmexit with virtual interrupt delivery Yang Zhang
2013-03-22 5:24 ` [PATCH v6 6/6] KVM: Use eoi to track RTC interrupt delivery status Yang Zhang
2013-03-22 7:50 ` Gleb Natapov
2013-03-22 8:05 ` Zhang, Yang Z
2013-03-22 8:14 ` Gleb Natapov
2013-03-22 8:25 ` Zhang, Yang Z
2013-03-22 8:30 ` Gleb Natapov
2013-03-22 8:37 ` Zhang, Yang Z
2013-03-22 8:44 ` Gleb Natapov
2013-03-22 8:51 ` Zhang, Yang Z
2013-03-22 8:54 ` Gleb Natapov
2013-03-22 10:50 ` Zhang, Yang Z
2013-03-24 9:20 ` Gleb Natapov
2013-03-26 14:26 ` Paolo Bonzini
2013-03-26 14:14 ` Paolo Bonzini
2013-03-29 3:25 ` Zhang, Yang Z
2013-03-29 8:35 ` Paolo Bonzini
2013-03-29 8:42 ` Zhang, Yang Z
2013-04-02 13:08 ` Gleb Natapov
2013-04-03 0:21 ` Zhang, Yang Z
2013-04-03 4:03 ` 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=1363929845-29005-2-git-send-email-yang.z.zhang@intel.com \
--to=yang.z.zhang@intel.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiantao.zhang@intel.com \
/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