Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7672736imu; Mon, 3 Dec 2018 17:21:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/URRkZkbMHO4hsBxFS+PE+QNMEgyNJUqxvfI6K31jAKbi2ftlWRvQo+IZQMoowCLioEbZeA X-Received: by 2002:a63:b54f:: with SMTP id u15mr15043454pgo.420.1543886486943; Mon, 03 Dec 2018 17:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543886486; cv=none; d=google.com; s=arc-20160816; b=Wc+sGkXh126AJTsIrHz8ws/nQDxJtyuZQagt5a6wmjI1otRujFkZJ8ggHHwzfXE2aT fJjk/k3XOBE7Yiq98CV80eDXd1JZSNUt1ytqkZPE3wYAS+Z6d4ilj90/ACPimvtPd186 NMgewQCd5HEuBkvW2jCP5HYNjQTBeb/KW7oZZMWMTz0cpqPBgyP02V6yVOLHqRiFDnTz UxnIeEAHXiM01DYbcsRLYRP1tXH48CMVGPR4Wr+2kreDOtR+Ul3kxe4s7ae13jb/Q52w NIgVHR2PHgEe6vU3iN+nar91ovsBrJd4gAzODil9uIIVY4JRXAeHzGDrvJ5mKz7LnzcV pfCg== 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=pFd5W0ZkJaWvG9N9TQBX0zf9+K8V/s32knczVkCAtxM=; b=vmXjQzSXfmkgLHlmXO1qnmfkTa1Zg4C98sC4s754zRf4pYDBeBSk6iWfVLCJWK8/YX GootvuHsbs6141WZetvtPw/2GgnP3It3SBmhcKxYVM84OtiEQZXRQGzx/7XYmtREORQ1 6bMhqwHnHTEO/WVMp/Q7QZeTtsVhTq0cpD9BfeP+uFPEOc+y4w1IVOF4ys4oNNPqPT/z rbfuR1NjHUxyOukMCbbhfonoqSCEY9hvcCP2M1BWV2DluppD3fER4e4pw1D6HN5FFjGx 0lJ0PZPbUznxwQVLOi73Xhe0ymzLggmyjyUMrgYQngKRtV9iykxIHeY06Sit7VjoBb8F 4jgA== 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 m3si14066223pgc.232.2018.12.03.17.21.11; Mon, 03 Dec 2018 17:21:26 -0800 (PST) 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 S1726031AbeLDBUj (ORCPT + 99 others); Mon, 3 Dec 2018 20:20:39 -0500 Received: from out1.zte.com.cn ([202.103.147.172]:59488 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbeLDBUj (ORCPT ); Mon, 3 Dec 2018 20:20:39 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id D28E866BEF7BEAAB5153; Tue, 4 Dec 2018 09:20:35 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wB41K9I2093766; Tue, 4 Dec 2018 09:20:09 +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 2018120409202049-14546822 ; Tue, 4 Dec 2018 09:20:20 +0800 From: Peng Hao To: tglx@linutronix.de, pbonzini@redhat.com, rkrcmar@redhat.com Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Hao Subject: [PATCH V3] kvm:x86 :remove unnecessary recalculate_apic_map Date: Tue, 4 Dec 2018 17:42:50 +0800 Message-Id: <1543916570-55054-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-12-04 09:20:20, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-04 09:20:05, Serialize complete at 2018-12-04 09:20:05 X-MAIL: mse01.zte.com.cn wB41K9I2093766 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 apic_sw_disabled influences recalculate_apic_map. But in "KVM: x86: simplify kvm_apic_map" (commit:3b5a5ffa928a3f875b0d5dd284eeb7c322e1688a), the access to apic_sw_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 fbb0e6d..a11fbf9 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