Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5136120imm; Tue, 16 Oct 2018 05:51:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61dmcZ1Ko/cvC+FvQz4/bHpPxgAHcoOfpo0JijRc9V7zTdz0P2ZS5ZDygbtG1x3RwEXVcmw X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr20910954pll.299.1539694288796; Tue, 16 Oct 2018 05:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539694288; cv=none; d=google.com; s=arc-20160816; b=aSb5wcGzcYbS13Z+eA38LdrDwJMQqRrP10b/tiAGCZZ15Wyn9NzoTQZ1rnVsmqxXPj ywqBZkrPofQtOs/Q3F6FWHsYRFJjkAUgZ9o6x3gGpNh7q6Gzm+a7MOyrP/e5Yr1Oyn/y 7aR/8vjgQsxpwVZHudOAEtu+uDQYq5Pga2eB/eMg1qeebKVgv0aUXAefp4gy4vezv0Mw JPMgb94g21laAT7ugGd9eHZ2CzDCf2K9nYfK+uNizdp/d6qwEjes7kntOVz7cCZmMgpO kvrDSCN5/xUCjl93Bo1yhEITTQDVzCwkNAB4JpT7rQIx/2/OXnur82DtJ8cHqCHWxBSl T6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=oU4tykwryFt2NLgxTnkWtuLA8r8oRanCLqtsye+zUDw=; b=YJkPhqmmz2YLKtUbMDQnE+s3dxDOWHvnApfz21GbHWrRvrwUdYpZgbLhbImVSoc2/A NLFZYcni2QEu4jgDqJx+o0/9KiS8Z6GmRBelmYhYn9LY17kAi054pg4jitxL6twKhVeL Qr0gFYC/68WbqheFMKM4J+Ft0b7xY3XNLXjCzBS6nuXMoG2Xtp/WzkGCQIpvMYKSWvtM Uabr/hxKo1III5q8ap/Yqj5EJ2UPs56FCxymrwhgGDfOuHQARUYPYAqInDQmciLny89d 1ebJaIT6JgKzxDX6ZEEx+tzk34bMtHPofOUgi12DeZ3tZTNIha1KP1jnKnnXJWgFeyzj 7fpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=utd1Rlfl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a59-v6si14410578pla.60.2018.10.16.05.51.13; Tue, 16 Oct 2018 05:51:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=utd1Rlfl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727171AbeJPUjn (ORCPT + 99 others); Tue, 16 Oct 2018 16:39:43 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:43905 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbeJPUjm (ORCPT ); Tue, 16 Oct 2018 16:39:42 -0400 Received: by mail-ed1-f68.google.com with SMTP id y20-v6so21174141eds.10; Tue, 16 Oct 2018 05:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oU4tykwryFt2NLgxTnkWtuLA8r8oRanCLqtsye+zUDw=; b=utd1RlflLrXeX3Rh8gjvSCbCKYqxLVLYNHQmrZi44/8/hOaqram92eZjYkxLwppLXu fE2nEbW4+XP1IOAXFc7MwMjngUf1LWplOkCZCM/IZnrOLMgC/fbUxDCAmtcZjM9kGsnQ 5SVLz5iXd4PrazX4QoaeTVZl7nVx1FCxImyD3o2Qi0qlzNIwjvE9Q39jSOWfp0IBG5DN ulnjlevlacIPePcdcSzOkZ00wezBuCnEfNE+XIgnnwcnVNqf/inei7g2NBxcRpXhOKO6 7B1tlFZuxsJfAmwfJYPKknk55NZe+0Xw8OfuzlggXEDojo/1iA8XAMBuGiNlbB/KEvGn VnFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=oU4tykwryFt2NLgxTnkWtuLA8r8oRanCLqtsye+zUDw=; b=JFbavpilj9SPT7HB6K5HBVBgrATvNFVVmjuGk5Y1g2Yb32VHexzC0MvEqpXeLkr/ba CHI93ymWsZlUUAPEb3NMFgQ3XpUVnDauw/CEffBd3/9pqUoDnF3Cz+MY8jsG+iOd5Irz gkrP+yktdgb4gtdmHV5L5vhDtnasp3YXDszX04Dy7o7wkYllYsoR7oGYVsScA/rhluFo +uN/tN7DI30irux0rY2Fng464ZnNaX2Ila81hJLjvleHYZRdIPhMLxbY0ypIBtf4WM6L l7kOG35ruN+u+K8zXZ32pTrD82OHKTUjf1GUBBslw/TqIRuXGs2cbcO5GJrrWRwji7h3 00nA== X-Gm-Message-State: ABuFfojUE1YU3viDb8NneOyeozNJW6r00QMsBOlt5Kwg17h3VJg5FV/I AdMpMazguagG7+L17+L1MUg= X-Received: by 2002:a50:eb97:: with SMTP id y23-v6mr29755184edr.38.1539694161360; Tue, 16 Oct 2018 05:49:21 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id t19-v6sm5675568edd.68.2018.10.16.05.49.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Oct 2018 05:49:20 -0700 (PDT) Date: Tue, 16 Oct 2018 12:49:19 +0000 From: Wei Yang To: Peng Hao Cc: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, x86@kernel.org, hpa@zytor.com, mingo@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v2] kvm:x86 :remove unnecessary recalculate_apic_map Message-ID: <20181016124919.3qgn6a4g7y2srd7k@master> Reply-To: Wei Yang References: <1539681150-9374-1-git-send-email-peng.hao2@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1539681150-9374-1-git-send-email-peng.hao2@zte.com.cn> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 05:12:30PM +0800, Peng Hao wrote: >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. s/sw_apic_disabled/apic_sw_disabled/ ? > >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 -- Wei Yang Help you, Help me