Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp85076rwa; Fri, 19 Aug 2022 23:02:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6IpUDpyEErSavlp+Phvqm9PVkOEUGHK4lcVAV8U3+95Dy3aYfwDs991dN8x4Oc3ack/OXA X-Received: by 2002:a17:902:cf11:b0:172:6437:412e with SMTP id i17-20020a170902cf1100b001726437412emr10460794plg.77.1660975363992; Fri, 19 Aug 2022 23:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660975363; cv=none; d=google.com; s=arc-20160816; b=NybiU75NhSwExBLjTduJWpk2h4a7Mni+UP3AUawGu0/tq6rQ1gCHqWzHC+oMkHKJ/c eM/gxVbSixIf6myBoic9cNZJtSIf7y7ByLxrytpexCicgcLX30zz930dhcr5/4Q2W8dD dsi4f0haZU6YgM+as33IVaBBE+9Gggf/gsPG+Jb/jOmGpn8NnwjEJHsrZvWjbQS8Xrpv O6crGOeETe56QsWl30AlmAEaxO9xoJXNDq1vf21Hf/VPcLCBbJ0ZzrEZ8COniZv1X27y 9bdQH3RweHBtBwAeHPmYLIGSOcPS0DkYDt+iLE8TFYISf+2Lw5v8fhnxxfKAzZmZNsQh X/Mw== 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=w47cd9e45IDYdlMXKpaoTz40QCEuirw3gIgMoks0gWE=; b=nPYtHvY5+hZjma14DZFkDcZNYSmxcn6Qyc+BQ+/TwF9Lv7dO2hV58SAokBU+p4mEL6 s/N4kbcxWC3W2ies3tlQVgQvxJotrV630aS68mD1NSAmIEPdUXsdWqbCn3qnx+tOJsJf sgQ1m9yj27paiT7hhf57dYmMpcl8VrCZnnsE+SYsgERJEkCV3A/yCxvRMjsAGBP//PFF xrmd/Fb3BQISc7pNVs/zyYL2az69umdM2hkXe3WfoWNKGO5rErMauo8kYu7em9R9sOHJ b3QbDvRY9PLD22D7U9JKwICVuvaW3cJT/4JcLfJ6waevRgEjA0eEhXnUEzDJrAae2Ptk Rrdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n0NZrU0P; 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 q12-20020a170902f78c00b00170f6f728d4si5541522pln.543.2022.08.19.23.02.33; Fri, 19 Aug 2022 23:02:43 -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=n0NZrU0P; 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 S245389AbiHTGBT (ORCPT + 99 others); Sat, 20 Aug 2022 02:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244375AbiHTGAw (ORCPT ); Sat, 20 Aug 2022 02:00:52 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A6CA260A; Fri, 19 Aug 2022 23:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660975251; x=1692511251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a+b7bWmrpg+akx27e5IPdnpc7BaBJM21hcXB7NFDQzI=; b=n0NZrU0PR/YN6KO+NrNplcgMqa1r9no09XuGxgFTGBL5wpSUx0iPVzgc f2qtEbW9VqFShHcR0NSV/HB98louruBPPQ4ALEgSQOmfRdhWIWpFnlzZE L6F4tyItpKqoZhzQ+XYq2Zzrw1ZkYyQnl0WA5Ktt1NTh2uXCYums26EqA /XajkWpa4HafmvZ9YPF4ASlRIugtHfjs3MXc3k1IZxTt63crqrW3dgbQM JJOPKpbY3qgmjcDMWvwcWzBsqAp5H6YAlMCmu5c6OVcoT0atQi+c9tJIW TMuh2uZxFG44TrmHWqv7oXXIj4jRNiJJOQ3mUSBqSsHN/W2W4IiteCo5A A==; X-IronPort-AV: E=McAfee;i="6500,9779,10444"; a="379448974" X-IronPort-AV: E=Sophos;i="5.93,250,1654585200"; d="scan'208";a="379448974" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 23:00:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,250,1654585200"; d="scan'208";a="668857535" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 23:00:49 -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: [RFC PATCH 08/18] KVM: kvm_arch.c: Remove _nolock post fix Date: Fri, 19 Aug 2022 23:00:14 -0700 Message-Id: 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 d593610edb0a..8a5d88b02aab 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,39 +89,39 @@ __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; } __weak int kvm_arch_online_cpu(unsigned int cpu, int usage_count) { if (usage_count) - hardware_enable_nolock(NULL); + hardware_enable(NULL); return 0; } __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