aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-06-24 12:24:54 -0400
committerAvi Kivity <avi@redhat.com>2012-06-25 05:40:40 -0400
commit5cfb1d5a65dd96d2d3a0751a1e4e81dc84c1f08f (patch)
treeab6a7b70254a1813a64e97eaf58bc91e7a8a0a46 /arch/x86/kvm/x86.c
parentc1af87dc96cd0f8f17694d0cd9be01b80b2c7a6a (diff)
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: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6ed5983f78ff..c1f870690a64 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5388,7 +5388,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
5388 if (unlikely(vcpu->arch.tsc_always_catchup)) 5388 if (unlikely(vcpu->arch.tsc_always_catchup))
5389 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu); 5389 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
5390 5390
5391 kvm_lapic_sync_from_vapic(vcpu); 5391 if (vcpu->arch.apic_attention)
5392 kvm_lapic_sync_from_vapic(vcpu);
5392 5393
5393 r = kvm_x86_ops->handle_exit(vcpu); 5394 r = kvm_x86_ops->handle_exit(vcpu);
5394out: 5395out: