One fix for an x86 regression in VM migration, mostly visible with
Windows because it uses RTC periodic interrupts. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJX2xpHAAoJEL/70l94x66D9NsIAIw+9oRA86qjehVnguV3fRKA ITZ4OGFDiXPWuxqDaw8mHHXr0RYx8KcMTzfFNbV+YL5U0cq9xYzdaNhchKPpyF+3 7H5wL8Ku9wkYZ930kdCf5Q+LNCfg8d/wKlibPEbX0MDx4jL99kkcxLzEkmIRqFlq bpXaQe/KR1xCWR6gI/a6aRJWLfGuFMV82YSnk/dCSjwotbAwjJUSt+IPhLwhx28o 7ddcxW3CxQqelJorcu2lvRiGnCvEzDhIdOvHJqibCjo3uzqbcI4PA2gs3rozbs9s VMEzqZpNgK0XsyKyccSw75npViIHYPkjMzxoyHMDhgiP3eIwp/tJquxAfLjK4WE= =h4P4 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
024c7e3756
@ -109,6 +109,7 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)
|
|||||||
{
|
{
|
||||||
bool new_val, old_val;
|
bool new_val, old_val;
|
||||||
struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic;
|
struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic;
|
||||||
|
struct dest_map *dest_map = &ioapic->rtc_status.dest_map;
|
||||||
union kvm_ioapic_redirect_entry *e;
|
union kvm_ioapic_redirect_entry *e;
|
||||||
|
|
||||||
e = &ioapic->redirtbl[RTC_GSI];
|
e = &ioapic->redirtbl[RTC_GSI];
|
||||||
@ -117,16 +118,17 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
new_val = kvm_apic_pending_eoi(vcpu, e->fields.vector);
|
new_val = kvm_apic_pending_eoi(vcpu, e->fields.vector);
|
||||||
old_val = test_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map);
|
old_val = test_bit(vcpu->vcpu_id, dest_map->map);
|
||||||
|
|
||||||
if (new_val == old_val)
|
if (new_val == old_val)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (new_val) {
|
if (new_val) {
|
||||||
__set_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map);
|
__set_bit(vcpu->vcpu_id, dest_map->map);
|
||||||
|
dest_map->vectors[vcpu->vcpu_id] = e->fields.vector;
|
||||||
ioapic->rtc_status.pending_eoi++;
|
ioapic->rtc_status.pending_eoi++;
|
||||||
} else {
|
} else {
|
||||||
__clear_bit(vcpu->vcpu_id, ioapic->rtc_status.dest_map.map);
|
__clear_bit(vcpu->vcpu_id, dest_map->map);
|
||||||
ioapic->rtc_status.pending_eoi--;
|
ioapic->rtc_status.pending_eoi--;
|
||||||
rtc_status_pending_eoi_check_valid(ioapic);
|
rtc_status_pending_eoi_check_valid(ioapic);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user