diff options
Diffstat (limited to 'arch/x86/kvm/lapic.c')
| -rw-r--r-- | arch/x86/kvm/lapic.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 1eb7a4ae0c9..77d8c0f4817 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | * Copyright (C) 2006 Qumranet, Inc. | 5 | * Copyright (C) 2006 Qumranet, Inc. |
| 6 | * Copyright (C) 2007 Novell | 6 | * Copyright (C) 2007 Novell |
| 7 | * Copyright (C) 2007 Intel | 7 | * Copyright (C) 2007 Intel |
| 8 | * Copyright 2009 Red Hat, Inc. and/or its affilates. | ||
| 8 | * | 9 | * |
| 9 | * Authors: | 10 | * Authors: |
| 10 | * Dor Laor <dor.laor@qumranet.com> | 11 | * Dor Laor <dor.laor@qumranet.com> |
| @@ -328,7 +329,7 @@ int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, | |||
| 328 | "dest_mode 0x%x, short_hand 0x%x\n", | 329 | "dest_mode 0x%x, short_hand 0x%x\n", |
| 329 | target, source, dest, dest_mode, short_hand); | 330 | target, source, dest, dest_mode, short_hand); |
| 330 | 331 | ||
| 331 | ASSERT(!target); | 332 | ASSERT(target); |
| 332 | switch (short_hand) { | 333 | switch (short_hand) { |
| 333 | case APIC_DEST_NOSHORT: | 334 | case APIC_DEST_NOSHORT: |
| 334 | if (dest_mode == 0) | 335 | if (dest_mode == 0) |
| @@ -533,7 +534,7 @@ static void __report_tpr_access(struct kvm_lapic *apic, bool write) | |||
| 533 | struct kvm_vcpu *vcpu = apic->vcpu; | 534 | struct kvm_vcpu *vcpu = apic->vcpu; |
| 534 | struct kvm_run *run = vcpu->run; | 535 | struct kvm_run *run = vcpu->run; |
| 535 | 536 | ||
| 536 | set_bit(KVM_REQ_REPORT_TPR_ACCESS, &vcpu->requests); | 537 | kvm_make_request(KVM_REQ_REPORT_TPR_ACCESS, vcpu); |
| 537 | run->tpr_access.rip = kvm_rip_read(vcpu); | 538 | run->tpr_access.rip = kvm_rip_read(vcpu); |
| 538 | run->tpr_access.is_write = write; | 539 | run->tpr_access.is_write = write; |
| 539 | } | 540 | } |
| @@ -1106,13 +1107,11 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu) | |||
| 1106 | u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0); | 1107 | u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0); |
| 1107 | int r = 0; | 1108 | int r = 0; |
| 1108 | 1109 | ||
| 1109 | if (kvm_vcpu_is_bsp(vcpu)) { | 1110 | if (!apic_hw_enabled(vcpu->arch.apic)) |
| 1110 | if (!apic_hw_enabled(vcpu->arch.apic)) | 1111 | r = 1; |
| 1111 | r = 1; | 1112 | if ((lvt0 & APIC_LVT_MASKED) == 0 && |
| 1112 | if ((lvt0 & APIC_LVT_MASKED) == 0 && | 1113 | GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT) |
| 1113 | GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT) | 1114 | r = 1; |
| 1114 | r = 1; | ||
| 1115 | } | ||
| 1116 | return r; | 1115 | return r; |
| 1117 | } | 1116 | } |
| 1118 | 1117 | ||
