From: Avi Kivity <avi@qumranet.com>
To: linux-kernel@vger.kernel.org, kvm-devel@lists.sourceforge.net
Cc: Zhang Xiantao <xiantao.zhang@intel.com>
Subject: [PATCH 03/33] KVM: Portability: Move kvm{pic,ioapic} accesors to x86 specific code
Date: Sun, 6 Jan 2008 16:39:09 +0200 [thread overview]
Message-ID: <1199630379-28638-4-git-send-email-avi@qumranet.com> (raw)
In-Reply-To: <1199630379-28638-1-git-send-email-avi@qumranet.com>
From: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
---
drivers/kvm/irq.h | 18 ++++++++++++++++--
drivers/kvm/kvm.h | 18 +++---------------
drivers/kvm/x86.h | 1 -
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h
index 730a87c..e88d939 100644
--- a/drivers/kvm/irq.h
+++ b/drivers/kvm/irq.h
@@ -26,6 +26,7 @@
#include <linux/hrtimer.h>
#include <asm/kvm.h>
#include "iodev.h"
+#include "x86.h"
struct kvm;
struct kvm_vcpu;
@@ -63,8 +64,6 @@ struct kvm_pic {
struct kvm_pic *kvm_create_pic(struct kvm *kvm);
void kvm_pic_set_irq(void *opaque, int irq, int level);
int kvm_pic_read_irq(struct kvm_pic *s);
-int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
-int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
void kvm_pic_update_irq(struct kvm_pic *s);
#define IOAPIC_NUM_PINS KVM_IOAPIC_NUM_PINS
@@ -147,6 +146,21 @@ do { \
#define ASSERT(x) do { } while (0)
#endif
+static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
+{
+ return kvm->vpic;
+}
+
+static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
+{
+ return kvm->vioapic;
+}
+
+static inline int irqchip_in_kernel(struct kvm *kvm)
+{
+ return pic_irqchip(kvm) != NULL;
+}
+
void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu);
int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu);
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index ceefb44..668a830 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -273,21 +273,6 @@ struct kvm {
struct kvm_vm_stat stat;
};
-static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
-{
- return kvm->vpic;
-}
-
-static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
-{
- return kvm->vioapic;
-}
-
-static inline int irqchip_in_kernel(struct kvm *kvm)
-{
- return pic_irqchip(kvm) != NULL;
-}
-
/* The guest did something we don't support. */
#define pr_unimpl(vcpu, fmt, ...) \
do { \
@@ -417,6 +402,9 @@ void kvm_free_physmem(struct kvm *kvm);
struct kvm *kvm_arch_create_vm(void);
void kvm_arch_destroy_vm(struct kvm *kvm);
+int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
+int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
+
static inline void kvm_guest_enter(void)
{
account_system_vtime(current);
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 78396d6..0fc7020 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -12,7 +12,6 @@
#define KVM_X86_H
#include "kvm.h"
-#include "irq.h"
#include <linux/types.h>
#include <linux/mm.h>
--
1.5.3.7
next prev parent reply other threads:[~2008-01-06 14:40 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 14:39 [PATCH 00/33] KVM patch queue review for 2.6.25 merge window (part V) Avi Kivity
2008-01-06 14:39 ` [PATCH 01/33] KVM: SVM: support writing 0 to K8 performance counter control registers Avi Kivity
2008-01-06 14:39 ` [PATCH 02/33] KVM: MMU: emulated cmpxchg8b should be atomic on i386 Avi Kivity
2008-01-06 18:57 ` [kvm-devel] " Carlo Marcelo Arenas Belon
2008-01-07 9:24 ` Avi Kivity
2008-01-06 14:39 ` Avi Kivity [this message]
2008-01-06 14:39 ` [PATCH 04/33] KVM: Portability: Introduce kvm_vcpu_arch Avi Kivity
2008-01-06 14:39 ` [PATCH 05/33] KVM: Portability: Split mmu-related static inline functions to mmu.h Avi Kivity
2008-01-06 14:39 ` [PATCH 06/33] KVM: Portability: Move kvm_vcpu definition back to kvm.h Avi Kivity
2008-01-06 14:39 ` [PATCH 07/33] KVM: Portability: Expand the KVM_VCPU_COMM in kvm_vcpu structure Avi Kivity
2008-01-06 14:39 ` [PATCH 08/33] KVM: Portability: Move kvm_vcpu_stat to x86.h Avi Kivity
2008-01-06 14:39 ` [PATCH 09/33] KVM: Portability: Move memslot aliases to new struct kvm_arch Avi Kivity
2008-01-06 14:39 ` [PATCH 10/33] KVM: Portability: Move mmu-related fields to kvm_arch Avi Kivity
2008-01-06 14:39 ` [PATCH 11/33] KVM: Portability: move vpic and vioapic " Avi Kivity
2008-01-06 14:39 ` [PATCH 12/33] KVM: Portability: Move round_robin_prev_vcpu and tss_addr " Avi Kivity
2008-01-06 14:39 ` [PATCH 13/33] KVM: Portability: Move kvm_vm_stat to x86.h Avi Kivity
2008-01-06 14:39 ` [PATCH 14/33] KVM: VMX: Add printk_ratelimit in vmx_intr_assist Avi Kivity
2008-01-06 14:39 ` [PATCH 15/33] KVM: Move arch dependent files to new directory arch/x86/kvm/ Avi Kivity
2008-01-06 14:39 ` [PATCH 16/33] KVM: Move drivers/kvm/* to virt/kvm/ Avi Kivity
2008-01-06 14:39 ` [PATCH 17/33] KVM: Move irqchip declarations into new ioapic.h and lapic.h Avi Kivity
2008-01-06 14:39 ` [PATCH 18/33] KVM: Move ioapic code to common directory Avi Kivity
2008-01-06 14:39 ` [PATCH 19/33] KVM: Move kvm_vcpu_kick() to x86.c Avi Kivity
2008-01-06 14:39 ` [PATCH 20/33] KVM: Expose ioapic to ia64 save/restore APIs Avi Kivity
2008-01-06 14:39 ` [PATCH 21/33] KVM: MMU: Coalesce remote tlb flushes Avi Kivity
2008-01-06 14:39 ` [PATCH 22/33] KVM: MMU: Add cache miss statistic Avi Kivity
2008-01-06 14:39 ` [PATCH 23/33] KVM: Print data for unimplemented wrmsr Avi Kivity
2008-01-06 14:39 ` [PATCH 24/33] KVM: local APIC TPR access reporting facility Avi Kivity
2008-01-06 14:39 ` [PATCH 25/33] KVM: Accelerated apic support Avi Kivity
2008-01-06 14:39 ` [PATCH 26/33] KVM: Disable vapic support on Intel machines with FlexPriority Avi Kivity
2008-01-06 14:39 ` [PATCH 27/33] KVM: MMU: Concurrent guest walkers Avi Kivity
2008-01-06 14:39 ` [PATCH 28/33] KVM: Add kvm_read_guest_atomic() Avi Kivity
2008-01-06 14:39 ` [PATCH 29/33] KVM: MMU: Avoid calling gfn_to_page() in mmu_set_spte() Avi Kivity
2008-01-06 14:39 ` [PATCH 30/33] KVM: MMU: Switch to mmu spinlock Avi Kivity
2008-01-06 14:39 ` [PATCH 31/33] KVM: MMU: Move kvm_free_some_pages() into critical section Avi Kivity
2008-01-06 14:39 ` [PATCH 32/33] KVM: MMU: Merge shadow level check in FNAME(fetch) Avi Kivity
2008-01-06 14:39 ` [PATCH 33/33] KVM: x86 emulator: Only allow VMCALL/VMMCALL trapped by #UD Avi Kivity
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=1199630379-28638-4-git-send-email-avi@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®