diff options
author | Yang Zhang <yang.z.zhang@Intel.com> | 2013-04-11 07:25:14 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-04-16 15:32:40 -0400 |
commit | cf9e65b773394c5ad8fa7455c43268bc8ec2109f (patch) | |
tree | dea4e116da3ecc13c8b6383ec2145a73480d66f0 /arch/x86/kvm/x86.c | |
parent | 3d81bc7e96d6bca0b8f8b7d1bf6ea72caa3aac57 (diff) |
KVM: Set TMR when programming ioapic entry
We already know the trigger mode of a given interrupt when programming
the ioapice entry. So it's not necessary to set it in each interrupt
delivery.
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 87a05df3eae4..276b4a9a5605 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -5664,14 +5664,17 @@ static void kvm_gen_update_masterclock(struct kvm *kvm) | |||
5664 | static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) | 5664 | static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) |
5665 | { | 5665 | { |
5666 | u64 eoi_exit_bitmap[4]; | 5666 | u64 eoi_exit_bitmap[4]; |
5667 | u32 tmr[8]; | ||
5667 | 5668 | ||
5668 | if (!kvm_apic_hw_enabled(vcpu->arch.apic)) | 5669 | if (!kvm_apic_hw_enabled(vcpu->arch.apic)) |
5669 | return; | 5670 | return; |
5670 | 5671 | ||
5671 | memset(eoi_exit_bitmap, 0, 32); | 5672 | memset(eoi_exit_bitmap, 0, 32); |
5673 | memset(tmr, 0, 32); | ||
5672 | 5674 | ||
5673 | kvm_ioapic_scan_entry(vcpu, eoi_exit_bitmap); | 5675 | kvm_ioapic_scan_entry(vcpu, eoi_exit_bitmap, tmr); |
5674 | kvm_x86_ops->load_eoi_exitmap(vcpu, eoi_exit_bitmap); | 5676 | kvm_x86_ops->load_eoi_exitmap(vcpu, eoi_exit_bitmap); |
5677 | kvm_apic_update_tmr(vcpu, tmr); | ||
5675 | } | 5678 | } |
5676 | 5679 | ||
5677 | static int vcpu_enter_guest(struct kvm_vcpu *vcpu) | 5680 | static int vcpu_enter_guest(struct kvm_vcpu *vcpu) |