Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4574884imm; Mon, 15 Oct 2018 18:03:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV61lImRls1S0F8oRx7WZZu5G+N+ssCY+gkcUBTzGMfxQTm/ssFAStO1XeXdX0e46gA4VjHN2 X-Received: by 2002:a62:3185:: with SMTP id x127-v6mr20491423pfx.88.1539651801185; Mon, 15 Oct 2018 18:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539651801; cv=none; d=google.com; s=arc-20160816; b=plhGam3l7ARTCHSOTgsrydReS09HRERI5+EJm8SGMfKf8gi73Q5I91D56jKvD9PsFO vXgoc7fomk8vmaaFIebZ/siqvWpvtpkv7max1l+HXN4ZfFtHXFiKaOV+zeviQSrrynvQ 8L3FakUuazcrG5VF+vGxnxQW4Nbt6nTHwuWzPff1oJQ+qk4qESPmJoG5Iy7Cyb3LIXYn 7V4DfSxqqTpBE58/r3a5IOo+Y2OQojOxfqzUu4aq4xG3zpw4wzfAuBaC4PZohOpvL+/t ZIIuo0ZCwD4cyeOuE/p9VKpeeWRP9SrVKCm5xTncNsRjUtHYs5vfNg5R19Atoq22i0+H Pgcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=3QzfR/cssQLWqVK0mDnvrMnWkDuzTDN6Wz5lZtqpdGw=; b=CMkG5jwK/k1bA3diA4STZqI5sjKhZGwcaF2pAB1/C9d/rReLKqgIPJ75P8WpJANoHq P0A0FpQatWvmOAT3Bmg6ev4SVNg0ddMg6QaVRkqJUAYTUcqOwIQ5Ru31yHKk66RH7uwi sdb3sA9XgvKkZN16pNPcJnxVBAMi/lt4DU18q0FpW8PCpWhC+Yxw2knomoFbFpDH3f4x BBeh3IT03jDv872Ehr5wCwmHlSQzbbsMu3J60Ywh3SL80Www81dfJea5dSQnJwE4Cv7X dR17/bItPdKPGBZ6kYRcS1DvROSzdg2bvtw+OZ6IdFLxYOEbB8kuhE9VQ43Nl3FuJhA5 7Jmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e92-v6si6202666pld.45.2018.10.15.18.03.05; Mon, 15 Oct 2018 18:03:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbeJPIs7 (ORCPT + 99 others); Tue, 16 Oct 2018 04:48:59 -0400 Received: from out1.zte.com.cn ([202.103.147.172]:57788 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbeJPIs7 (ORCPT ); Tue, 16 Oct 2018 04:48:59 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 0680BFAA7DCECC8A02C0; Tue, 16 Oct 2018 09:01:10 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w9G10vg6028307; Tue, 16 Oct 2018 09:00:57 +0800 (GMT-8) (envelope-from peng.hao2@zte.com.cn) Received: from localhost.localdomain.localdomain ([10.74.120.59]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018101609010813-4702131 ; Tue, 16 Oct 2018 09:01:08 +0800 From: Peng Hao To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, x86@kernel.org, hpa@zytor.com, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Peng Hao Subject: [PATCH v2] kvm:x86 :remove unnecessary recalculate_apic_map Date: Tue, 16 Oct 2018 17:12:30 +0800 Message-Id: <1539681150-9374-1-git-send-email-peng.hao2@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-10-16 09:01:08, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-10-16 09:00:53, Serialize complete at 2018-10-16 09:00:53 X-MAIL: mse01.zte.com.cn w9G10vg6028307 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the previous code, the variable sw_apic_disabled influences recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map" (commit:3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a), the access to sw_apic_disabled in recalculate_apic_map has been deleted. Signed-off-by: Peng Hao --- arch/x86/kvm/lapic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 70dcb55..0380e37 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -246,10 +246,9 @@ static inline void apic_set_spiv(struct kvm_lapic *apic, u32 val) if (enabled != apic->sw_enabled) { apic->sw_enabled = enabled; - if (enabled) { + if (enabled) static_key_slow_dec_deferred(&apic_sw_disabled); - recalculate_apic_map(apic->vcpu->kvm); - } else + else static_key_slow_inc(&apic_sw_disabled.key); } } -- 1.8.3.1