summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-06-24 16:24:54 (GMT)
committerAvi Kivity <avi@redhat.com>2012-06-25 09:40:40 (GMT)
commit5cfb1d5a65dd96d2d3a0751a1e4e81dc84c1f08f (patch)
treeab6a7b70254a1813a64e97eaf58bc91e7a8a0a46 /arch/x86/kvm
parentc1af87dc96cd0f8f17694d0cd9be01b80b2c7a6a (diff)
downloadlinux-fsl-qoriq-5cfb1d5a65dd96d2d3a0751a1e4e81dc84c1f08f.tar.xz
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')
-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 6ed5983..c1f8706 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)
if (unlikely(vcpu->arch.tsc_always_catchup))
kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
- kvm_lapic_sync_from_vapic(vcpu);
+ if (vcpu->arch.apic_attention)
+ kvm_lapic_sync_from_vapic(vcpu);
r = kvm_x86_ops->handle_exit(vcpu);
out: