aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-12-11 07:36:00 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:22 -0500
commit682c59a3f3f211ed555b17144f2d82eb8286a1db (patch)
tree939bb2644ec6d556d27e82ecfb0cdf8ec9e7378a /drivers/kvm/kvm.h
parent2bacc55c7c3c61e356aef06b9a319b4cee90b519 (diff)
KVM: Portability: Move kvm{pic,ioapic} accesors to x86 specific code
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index ceefb4427dbd..668a8300365d 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -273,21 +273,6 @@ struct kvm {
273 struct kvm_vm_stat stat; 273 struct kvm_vm_stat stat;
274}; 274};
275 275
276static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
277{
278 return kvm->vpic;
279}
280
281static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
282{
283 return kvm->vioapic;
284}
285
286static inline int irqchip_in_kernel(struct kvm *kvm)
287{
288 return pic_irqchip(kvm) != NULL;
289}
290
291/* The guest did something we don't support. */ 276/* The guest did something we don't support. */
292#define pr_unimpl(vcpu, fmt, ...) \ 277#define pr_unimpl(vcpu, fmt, ...) \
293 do { \ 278 do { \
@@ -417,6 +402,9 @@ void kvm_free_physmem(struct kvm *kvm);
417struct kvm *kvm_arch_create_vm(void); 402struct kvm *kvm_arch_create_vm(void);
418void kvm_arch_destroy_vm(struct kvm *kvm); 403void kvm_arch_destroy_vm(struct kvm *kvm);
419 404
405int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
406int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
407
420static inline void kvm_guest_enter(void) 408static inline void kvm_guest_enter(void)
421{ 409{
422 account_system_vtime(current); 410 account_system_vtime(current);