From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PATCH 6/9] KVM: x86: directly call recalculate_apic_map on lapic restore Date: Fri, 6 May 2016 22:54:02 +0200 Message-ID: <1462568045-31085-7-git-send-email-rkrcmar@redhat.com> References: <1462568045-31085-1-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paolo Bonzini , "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58282 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758275AbcEFUyi (ORCPT ); Fri, 6 May 2016 16:54:38 -0400 In-Reply-To: <1462568045-31085-1-git-send-email-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: The get/set dance was just for that. Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 --- arch/x86/kvm/lapic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 6ae5e74031d6..615067b41dde 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1933,8 +1933,8 @@ void kvm_apic_post_state_restore(struct kvm_vcpu = *vcpu, /* set SPIV separately to get count of SW disabled APICs right */ apic_set_spiv(apic, *((u32 *)(s->regs + APIC_SPIV))); memcpy(vcpu->arch.apic->regs, s->regs, sizeof *s); - /* call kvm_apic_set_id() to put apic into apic_map */ - kvm_apic_set_id(apic, kvm_apic_id(apic)); + /* put apic into apic_map */ + recalculate_apic_map(vcpu->kvm); kvm_apic_set_version(vcpu); =20 apic_update_ppr(apic); --=20 2.8.2