Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4117713rwe; Tue, 30 Aug 2022 05:05:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR7RmMy7FAM9wTFutxy9BoFYI+RYSJneViAHMUULUcMSTPBLa+Z1VoS+nw1u/NkGqIkxV8Zs X-Received: by 2002:a17:903:124f:b0:171:4c36:a6ab with SMTP id u15-20020a170903124f00b001714c36a6abmr20650576plh.141.1661861154640; Tue, 30 Aug 2022 05:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661861154; cv=none; d=google.com; s=arc-20160816; b=xUcuAjTLwfqWQGGGkQcKFrQpUljjNccgy39du9senjdHYlu1LmT7DwNBhHnvLG7atT hY8yRy7CnKoT99YGWm9Q7ZwApX4BowZtUxsgFE7e0qB4IbHwQSS9Uq/vNGjDCLs3KdgL 9fnY/0kYCSG7Q/XfudfqYQBzRmkYx4vEXC+iKPsHAr+fxocNeHu/d3pyrBNwVw3EUn+P joQ9ieaH+PorGH6M60QMkG/ZlivhSqp5BlXF1i0VItYcL/Id9kgPqKlcHdCa06d74M9o D6nM0Xb/1zHB+ZnnKcg2EGo98VWtZ3eyfOv/pKc/Thx3GNXqEh4GyNPus25lYt50DkI+ VmPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZxhqlCT7DQEO3Kvsyzk7I3yn8ipIht+Ox9pl8CnV+wQ=; b=lPzC+7Imp84v88VnSLpG/0Mn7QjUrPpt9kx5W+vwgk0TKlmI0Pl8RgPMvKIaM3x7gD zVSWq8p88INQ8C7xfklEvONOG2RatReC2lLjKZYQjYyZInMA0oPj9ZKPOVokraGAzdQq 6bfR6R9oltYvX2+6zZjx5TzQZady+l3+SrnaCyO4IQyoS69ryt4o3oWxgzw4cUmx4j+Q 32GCbpGWnfZD27KftSRN7MptuyiKHYqg4ACSoyCgyo4gCSkaDBTJ0v4sdRZ4aRnqczi0 icEjnVQKsdk7SWXSV9LlkfS9vf5zmFBWTHDleEtCVI5wUybcgLxHYHbPLAH/iSKizJcd gLxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iyrRPUhS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h33-20020a631221000000b00425f2cdd0dcsi1918522pgl.103.2022.08.30.05.05.42; Tue, 30 Aug 2022 05:05:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iyrRPUhS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbiH3MC6 (ORCPT + 99 others); Tue, 30 Aug 2022 08:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbiH3MCD (ORCPT ); Tue, 30 Aug 2022 08:02:03 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C7ADE9270; Tue, 30 Aug 2022 05:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661860921; x=1693396921; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=acOpBp0TwBzAoRqBKx4NbGM0ZNJfNy50Nx4gx4/JIVM=; b=iyrRPUhSW86ZS93avhRpdCAyOVLznH6MMI/VrAIhOwlUcwDNCV2mYPTW 20MtM8hcLxkrYE7040NZ8BsK4UwSovvT2Hq46UQxS2Owh1neK0CavlgsZ wkVAzAf8BZ5evLbTnGtCE3EYKO+1oNnLgapD+oWavojLOVVD/g0XV+IUt GOVwVge8cPjUBVO44htF3r1NS3Nrd7Ctb1NVMj9in8P327rMM3v9mUV6Y pJ+R8MpOAmcdzB/fF1m/OdwiK4HP7koxONgsAnG2gXgx9myJpBe5xJMIs uN5xECCibUkPKfDT2UCIe3EOjuoLFSUOowRKmk1xrDGiD2jQS0KmP/g0z A==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="356870982" X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="356870982" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 05:01:58 -0700 X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="787469644" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 05:01:58 -0700 From: isaku.yamahata@intel.com To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Paolo Bonzini , Sean Christopherson , Kai Huang , Chao Gao , Will Deacon Subject: [PATCH v2 11/19] KVM: kvm_arch.c: Remove _nolock post fix Date: Tue, 30 Aug 2022 05:01:26 -0700 Message-Id: <284273dc6c1310812681c1de901c552788ab2897.1661860550.git.isaku.yamahata@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Isaku Yamahata Now all related callbacks are called under kvm_lock, no point for _nolock post fix. Remove _nolock post fix for short function name. Signed-off-by: Isaku Yamahata --- virt/kvm/kvm_arch.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/virt/kvm/kvm_arch.c b/virt/kvm/kvm_arch.c index 51c6e9f03ed5..491e92ef9e3d 100644 --- a/virt/kvm/kvm_arch.c +++ b/virt/kvm/kvm_arch.c @@ -20,7 +20,7 @@ __weak int kvm_arch_post_init_vm(struct kvm *kvm) return 0; } -static void hardware_enable_nolock(void *junk) +static void hardware_enable(void *junk) { int cpu = raw_smp_processor_id(); int r; @@ -41,7 +41,7 @@ static void hardware_enable_nolock(void *junk) } } -static void hardware_disable_nolock(void *junk) +static void hardware_disable(void *junk) { int cpu = raw_smp_processor_id(); @@ -55,7 +55,7 @@ static void hardware_disable_nolock(void *junk) __weak void kvm_arch_pre_hardware_unsetup(void) { - on_each_cpu(hardware_disable_nolock, NULL, 1); + on_each_cpu(hardware_disable, NULL, 1); } /* @@ -70,7 +70,7 @@ __weak int kvm_arch_add_vm(struct kvm *kvm, int usage_count) return 0; atomic_set(&hardware_enable_failed, 0); - on_each_cpu(hardware_enable_nolock, NULL, 1); + on_each_cpu(hardware_enable, NULL, 1); if (atomic_read(&hardware_enable_failed)) { r = -EBUSY; @@ -80,7 +80,7 @@ __weak int kvm_arch_add_vm(struct kvm *kvm, int usage_count) r = kvm_arch_post_init_vm(kvm); err: if (r) - on_each_cpu(hardware_disable_nolock, NULL, 1); + on_each_cpu(hardware_disable, NULL, 1); return r; } @@ -89,7 +89,7 @@ __weak int kvm_arch_del_vm(int usage_count) if (usage_count) return 0; - on_each_cpu(hardware_disable_nolock, NULL, 1); + on_each_cpu(hardware_disable, NULL, 1); return 0; } @@ -105,7 +105,7 @@ __weak int kvm_arch_online_cpu(unsigned int cpu, int usage_count) if (usage_count) { WARN_ON_ONCE(atomic_read(&hardware_enable_failed)); - hardware_enable_nolock(NULL); + hardware_enable(NULL); if (atomic_read(&hardware_enable_failed)) { atomic_set(&hardware_enable_failed, 0); ret = -EIO; @@ -117,25 +117,25 @@ __weak int kvm_arch_online_cpu(unsigned int cpu, int usage_count) __weak int kvm_arch_offline_cpu(unsigned int cpu, int usage_count) { if (usage_count) - hardware_disable_nolock(NULL); + hardware_disable(NULL); return 0; } __weak int kvm_arch_reboot(int val) { - on_each_cpu(hardware_disable_nolock, NULL, 1); + on_each_cpu(hardware_disable, NULL, 1); return NOTIFY_OK; } __weak int kvm_arch_suspend(int usage_count) { if (usage_count) - hardware_disable_nolock(NULL); + hardware_disable(NULL); return 0; } __weak void kvm_arch_resume(int usage_count) { if (usage_count) - hardware_enable_nolock(NULL); + hardware_enable(NULL); } -- 2.25.1