aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorEddie Dong <eddie.dong@intel.com>2007-09-12 03:58:04 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:25 -0400
commit97222cc8316328965851ed28d23f6b64b4c912d2 (patch)
tree469b2f72e74046a7aec5061df194c3f68812a224 /drivers/kvm/kvm.h
parent7017fc3d1a12e30ea7df4992152978a188433457 (diff)
KVM: Emulate local APIC in kernel
Because lightweight exits (exits which don't involve userspace) are many times faster than heavyweight exits, it makes sense to emulate high usage devices in the kernel. The local APIC is one such device, especially for Windows and for SMP, so we add an APIC model to kvm. It also allows in-kernel host-side drivers to inject interrupts without going through userspace. [compile fix on i386 from Jindrich Makovicka] Signed-off-by: Yaozu (Eddie) Dong <Eddie.Dong@intel.com> Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index e0a2f13faf8b..a5790cb21ffc 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -324,6 +324,7 @@ struct kvm_vcpu {
324 u64 pdptrs[4]; /* pae */ 324 u64 pdptrs[4]; /* pae */
325 u64 shadow_efer; 325 u64 shadow_efer;
326 u64 apic_base; 326 u64 apic_base;
327 struct kvm_lapic *apic; /* kernel irqchip context */
327 u64 ia32_misc_enable_msr; 328 u64 ia32_misc_enable_msr;
328 329
329 struct kvm_mmu mmu; 330 struct kvm_mmu mmu;
@@ -569,8 +570,6 @@ void set_cr3(struct kvm_vcpu *vcpu, unsigned long cr0);
569void set_cr4(struct kvm_vcpu *vcpu, unsigned long cr0); 570void set_cr4(struct kvm_vcpu *vcpu, unsigned long cr0);
570void set_cr8(struct kvm_vcpu *vcpu, unsigned long cr0); 571void set_cr8(struct kvm_vcpu *vcpu, unsigned long cr0);
571unsigned long get_cr8(struct kvm_vcpu *vcpu); 572unsigned long get_cr8(struct kvm_vcpu *vcpu);
572u64 kvm_get_apic_base(struct kvm_vcpu *vcpu);
573void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data);
574void lmsw(struct kvm_vcpu *vcpu, unsigned long msw); 573void lmsw(struct kvm_vcpu *vcpu, unsigned long msw);
575 574
576int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata); 575int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);