aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorAndrey Smetanin <asmetanin@virtuozzo.com>2015-11-10 07:36:32 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2015-11-25 11:24:21 -0500
commit6308630bd3dbb6a8a883c4c571ce5e5a759a8a0e (patch)
tree3f4e51bee7ece38a7784090634906639954227d7 /arch/x86/include
parentabdb080f7ac8a85547f5e0246362790043bbd3f2 (diff)
kvm/x86: split ioapic-handled and EOI exit bitmaps
The function to determine if the vector is handled by ioapic used to rely on the fact that only ioapic-handled vectors were set up to cause vmexits when virtual apic was in use. We're going to break this assumption when introducing Hyper-V synthetic interrupts: they may need to cause vmexits too. To achieve that, introduce a new bitmap dedicated specifically for ioapic-handled vectors, and populate EOI exit bitmap from it for now. Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Gleb Natapov <gleb@kernel.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Roman Kagan <rkagan@virtuozzo.com> CC: Denis V. Lunev <den@openvz.org> CC: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 30cfd64295a0..f6d8894f25b4 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -400,7 +400,7 @@ struct kvm_vcpu_arch {
400 u64 efer; 400 u64 efer;
401 u64 apic_base; 401 u64 apic_base;
402 struct kvm_lapic *apic; /* kernel irqchip context */ 402 struct kvm_lapic *apic; /* kernel irqchip context */
403 u64 eoi_exit_bitmap[4]; 403 DECLARE_BITMAP(ioapic_handled_vectors, 256);
404 unsigned long apic_attention; 404 unsigned long apic_attention;
405 int32_t apic_arb_prio; 405 int32_t apic_arb_prio;
406 int mp_state; 406 int mp_state;
@@ -834,7 +834,7 @@ struct kvm_x86_ops {
834 int (*cpu_uses_apicv)(struct kvm_vcpu *vcpu); 834 int (*cpu_uses_apicv)(struct kvm_vcpu *vcpu);
835 void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr); 835 void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr);
836 void (*hwapic_isr_update)(struct kvm *kvm, int isr); 836 void (*hwapic_isr_update)(struct kvm *kvm, int isr);
837 void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu); 837 void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap);
838 void (*set_virtual_x2apic_mode)(struct kvm_vcpu *vcpu, bool set); 838 void (*set_virtual_x2apic_mode)(struct kvm_vcpu *vcpu, bool set);
839 void (*set_apic_access_page_addr)(struct kvm_vcpu *vcpu, hpa_t hpa); 839 void (*set_apic_access_page_addr)(struct kvm_vcpu *vcpu, hpa_t hpa);
840 void (*deliver_posted_interrupt)(struct kvm_vcpu *vcpu, int vector); 840 void (*deliver_posted_interrupt)(struct kvm_vcpu *vcpu, int vector);