Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cfb1d5a authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Avi Kivity
Browse files

KVM: only sync when attention bits set



Commit eb0dc6d0368072236dcd086d7fdc17fd3c4574d4 introduced apic
attention bitmask but kvm still syncs lapic unconditionally.
As that commit suggested and in anticipation of adding more attention
bits, only sync lapic if(apic_attention).

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent c1af87dc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5388,6 +5388,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
	if (unlikely(vcpu->arch.tsc_always_catchup))
		kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);

	if (vcpu->arch.apic_attention)
		kvm_lapic_sync_from_vapic(vcpu);

	r = kvm_x86_ops->handle_exit(vcpu);