diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-15 18:15:41 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-15 18:15:41 -0400 |
| commit | 024c7e3756d8a42fc41fe8a9488488b9b09d1dcc (patch) | |
| tree | 05e0ca49e91699708bcf9dfdcab1ece6ba620ee8 | |
| parent | b71dbf1032f546bf3efd60fb5d9d0cefd200a508 (diff) | |
| parent | b0eaf4506f5f95d15d6731d72c0ddf4a2179eefa (diff) | |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fix from Paolo Bonzini:
"One fix for an x86 regression in VM migration, mostly visible with
Windows because it uses RTC periodic interrupts"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
kvm: x86: correctly reset dest_map->vector when restoring LAPIC state
| -rw-r--r-- | arch/x86/kvm/ioapic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c index 5f42d038fcb4..c7220ba94aa7 100644 --- a/arch/x86/kvm/ioapic.c +++ b/arch/x86/kvm/ioapic.c | |||
| @@ -109,6 +109,7 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu) | |||
| 109 | { | 109 | { |
| 110 | bool new_val, old_val; | 110 | bool new_val, old_val; |
| 111 | struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic; | 111 | struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic; |
| 112 | struct dest_map *dest_map = &ioapic->rtc_status.dest_map; | ||
| 112 | union kvm_ioapic_redirect_entry *e; | 113 | union kvm_ioapic_redirect_entry *e; |
| 113 | 114 | ||
| 114 | e = &ioapic->redirtbl[RTC_GSI]; | 115 | e = &ioapic->redirtbl[RTC_GSI]; |
| @@ -117,16 +118,17 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu) | |||
| 117 | return; | 118 | return; |
| 118 | 119 | ||
| 119 | new_val = kvm_apic_pending_eoi(vcpu, e->fields.vector); | 120 | new_val = kvm_apic_pending_eoi(vcpu, e->fields.vector); |
| 120 | old_val = test_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); | 121 | old_val = test_bit(vcpu->vcpu_id, dest_map->map); |
| 121 | 122 | ||
| 122 | if (new_val == old_val) | 123 | if (new_val == old_val) |
| 123 | return; | 124 | return; |
| 124 | 125 | ||
| 125 | if (new_val) { | 126 | if (new_val) { |
| 126 | __set_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); | 127 | __set_bit(vcpu->vcpu_id, dest_map->map); |
| 128 | dest_map->vectors[vcpu->vcpu_id] = e->fields.vector; | ||
| 127 | ioapic->rtc_status.pending_eoi++; | 129 | ioapic->rtc_status.pending_eoi++; |
| 128 | } else { | 130 | } else { |
| 129 | __clear_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); | 131 | __clear_bit(vcpu->vcpu_id, dest_map->map); |
| 130 | ioapic->rtc_status.pending_eoi--; | 132 | ioapic->rtc_status.pending_eoi--; |
| 131 | rtc_status_pending_eoi_check_valid(ioapic); | 133 | rtc_status_pending_eoi_check_valid(ioapic); |
| 132 | } | 134 | } |
