From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbcGAIq2 (ORCPT ); Fri, 1 Jul 2016 04:46:28 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33157 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbcGAIoE (ORCPT ); Fri, 1 Jul 2016 04:44:04 -0400 Subject: Re: [PATCH v1 08/11] KVM: x86: directly call recalculate_apic_map on lapic restore To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20160630205429.16480-1-rkrcmar@redhat.com> <20160630205429.16480-9-rkrcmar@redhat.com> Cc: "Lan, Tianyu" , Igor Mammedov , Jan Kiszka , Peter Xu From: Paolo Bonzini Message-ID: <1d1838cf-b7bb-ab06-4aac-82a80d8f2993@redhat.com> Date: Fri, 1 Jul 2016 10:43:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160630205429.16480-9-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/06/2016 22:54, Radim Krčmář wrote: > The get/set dance was just for that. > > Reviewed-by: Peter Xu > Signed-off-by: Radim Krčmář > --- > 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 d914b5351fdc..143df33f451e 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -2013,8 +2013,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); > > apic_update_ppr(apic); > Reviewed-by: Paolo Bonzini