Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2150012rwb; Thu, 27 Jul 2023 02:57:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+oAbaiZVYVdnsXkqMexZSfwGcHiCU/SNindQS5I971bJK+c5Uu2ssuEbicTa8owAxls3h X-Received: by 2002:a17:90a:9c02:b0:268:1745:b61 with SMTP id h2-20020a17090a9c0200b0026817450b61mr3563389pjp.34.1690451830492; Thu, 27 Jul 2023 02:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690451830; cv=none; d=google.com; s=arc-20160816; b=quQ2V60cPPRne/is/+7+UCcoMbzldRVFXS7/PAEU8tvBZHqK3ZiTOO0jKYoZ++nTcL A0t4dNZBX/PHLj65+nS5xPRF2e5NI/nhSo5tzI23WbJoNDFv1ALuQXCciZdQpx5j54lG KVZjZ0pww0TQLogsc9wd2TFu77fZaSgt97rePdT8ZV4fhuSl16TvIw42R0Td8tUSyD3v d8eKVLmst23jkGZRLy5jIgPA9QcsJMn13oALxWW3tuaeKSDlmC00xnn/fsPs5iAEqQFr VHlbGO6YcMy8Y0hIkLo7hq69p8oR/yWdQLV+EDJqh6F15jpKhQXGMQIRyGo7vF9Mz/yS G7ig== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HerRwxLkSMzYwKdGiBkPfrNJD4PElAmEIiMvsjTuYlk=; fh=U9Fw/v6QGrn/21ZkKCa3euKRdtq+FaoLQeWwuPR7PGs=; b=AbGNHyYn2XK4aQmNP925qrqhg0KwirKTcqJ6teGpoYC4jwDz8ckASeiN6zodiVS+Yj UodsHnba+YXS4t39+xeKaYitmejQ1A9mYL97qtz5iD+JFam3D55SdEXZRf8O/fK9y5oh QPH9flaVMXxaKR30PgZj9brx8k8p/VjaDW7q8VtfASjoyFso1zXi9V8/wyg69aKQfCCZ c30/8VhZRx5vvswJuwOq2420b5qYFIp1tECwx5HRl40Mko3O+8FhuFaHo1Ai3eLgbioZ 6ihHlmFxsZhLet0Lio8Pv8lryxV+3NxcYo0W/96YZ19GPLsNlR/F+eIjz5RioS62Ucp+ gSpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cf4CYIkL; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a17090a304100b0026811da0fc7si2599836pjl.128.2023.07.27.02.56.58; Thu, 27 Jul 2023 02:57:10 -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=@redhat.com header.s=mimecast20190719 header.b=Cf4CYIkL; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234788AbjG0JTH (ORCPT + 99 others); Thu, 27 Jul 2023 05:19:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232876AbjG0JRj (ORCPT ); Thu, 27 Jul 2023 05:17:39 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 446EF86AD for ; Thu, 27 Jul 2023 02:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690448883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HerRwxLkSMzYwKdGiBkPfrNJD4PElAmEIiMvsjTuYlk=; b=Cf4CYIkLsn/O3PHVh/iBjLBTiGJ0f8tU9DRNJLnEWFLJLYEtKpqUwABgPYeGpcB1SUgYw2 xQk9kXAW49/Tq+I1lzzXqTRBCel9PTTgyHDUWt3sowTHEzArs39yRPs2ZI93Qo6wwZjgH1 6olqYzpimx9I/3Gy9XyVPJUwLULKHXc= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652--b9woubmPsS2O4joqyqgAQ-1; Thu, 27 Jul 2023 05:07:59 -0400 X-MC-Unique: -b9woubmPsS2O4joqyqgAQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6BDBF3C11CC9; Thu, 27 Jul 2023 09:07:58 +0000 (UTC) Received: from virt-mtcollins-01.lab.eng.rdu2.redhat.com (virt-mtcollins-01.lab.eng.rdu2.redhat.com [10.8.1.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00FDC2166B25; Thu, 27 Jul 2023 09:07:57 +0000 (UTC) From: Shaoqin Huang To: kvmarm@lists.linux.dev Cc: Shaoqin Huang , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] KVM: arm64: Use the known cpu id instead of smp_processor_id() Date: Thu, 27 Jul 2023 05:07:54 -0400 Message-Id: <20230727090754.1900310-1-shahuang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 In kvm_arch_vcpu_load(), it has the parameter cpu which is the value of smp_processor_id(), so no need to get it again. Simply replace it. Signed-off-by: Shaoqin Huang --- arch/arm64/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index c2c14059f6a8..2e5d8f4b902b 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -457,7 +457,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) vcpu_ptrauth_disable(vcpu); kvm_arch_vcpu_load_debug_state_flags(vcpu); - if (!cpumask_test_cpu(smp_processor_id(), vcpu->kvm->arch.supported_cpus)) + if (!cpumask_test_cpu(cpu, vcpu->kvm->arch.supported_cpus)) vcpu_set_on_unsupported_cpu(vcpu); } -- 2.39.1