Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3726508pxk; Tue, 29 Sep 2020 04:55:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXDtSdE581UkP/KeBu0YXh4Jc57fhDZbWacOyD1ZDbfWbnU+acWN4XOAX44r2Cek0Ulr5k X-Received: by 2002:a17:906:9353:: with SMTP id p19mr3360797ejw.403.1601380529463; Tue, 29 Sep 2020 04:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601380529; cv=none; d=google.com; s=arc-20160816; b=aPMlkrEADQ8NSLuv8qZEekmicCb5od57XzBRIN7QD8F2Nav9uw8PpL7sfgraxu8fka qsZT+cJaOOOvCrVt9OXVQEIAb/lx+HQRG4zefrYYI7Dp9IHo0KrO9j6XYrZDJVcNKTqQ zEn1qy0aR2eVt6e9aRQoyqB57o0fFBIhbdrHNonifhYtypKWU2wJW4wlOgqMC6pPsTJk 462ww+ufMu+BLfBjwcwh1jckiM/f4o7mSuyU3gQ9GMltx4Vh7L8E0LvYL+RxyyIzDz9n dZaVt4leUZbtclSmCACdnXkoH/HCGCI54cTwT0izbEBZREjhAPTyGyrcSxVlaxg8VV8e atvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=TcNmv7XU+QU+ZuyyatMh++nNPE+5yJ2qNVyyN8KYWtM=; b=pukcAxIorlCjyHGZWVn2iCXSxSXM/bOQAwBHXiWlWjFW89HRVmytcr81Mr/RCFXsvJ PQxsSkOOUEyDVuX75oDtwtJ2rL14QJM5HsuE2GZ6OUFsovDJxV2cA9vC+9RzmHAaPCxj tN48bKz+/vZSM3S/YIFE8gf9rLXQVEda1AaJGiTu92d9/DjMX/nfXVV02w85/woaX722 fcT85EjvQoiqeLPAhCO41osF5BQn+e9iTMnaye4kJRFu2KYXiGE1XewYTp9uluVWeXAP YgANcsK2dQAOruwh0BizLSiVyDO8TR7BCc9XwBPwySGiLCCUAwghTMpQsw5ubrklvHlz CsLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nq4si2636188ejb.678.2020.09.29.04.55.06; Tue, 29 Sep 2020 04:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729029AbgI2LwH (ORCPT + 99 others); Tue, 29 Sep 2020 07:52:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14714 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730546AbgI2LwD (ORCPT ); Tue, 29 Sep 2020 07:52:03 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C36F43EC24B5F0C375CC; Tue, 29 Sep 2020 19:51:58 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 29 Sep 2020 19:51:52 +0800 From: Wang ShaoBo CC: , , , , , , , Subject: [PATCH -next] x86/kvm: Fix build with CONFIG_SMP disabled Date: Tue, 29 Sep 2020 19:50:13 +0800 Message-ID: <20200929115013.3913359-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_SMP is disabled, build failed like this: arch/x86/kernel/kvm.c: In function ‘kvm_alloc_cpumask’: arch/x86/kernel/kvm.c:823:35: error: ‘kvm_send_ipi_mask_allbutself’ undeclared (first use in this function); did you mean ‘apic_send_IPI_allbutself’? apic->send_IPI_mask_allbutself = kvm_send_ipi_mask_allbutself; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ apic_send_IPI_allbutself arch/x86/kernel/kvm.c:823:35: note: each undeclared identifier is reported only once for each function it appears in It is because the declaration of kvm_send_ipi_mask_allbutself() is guarded by CONFIG_SMP. kvm_send_ipi_mask_allbutself() do not need do anything at this time. Signed-off-by: Wang ShaoBo --- arch/x86/kernel/kvm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index a44398d2bc44..47d65864e29c 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -611,6 +611,13 @@ static int kvm_cpu_down_prepare(unsigned int cpu) local_irq_enable(); return 0; } + +#else /* !CONFIG_SMP */ + +static void kvm_send_ipi_mask_allbutself(const struct cpumask *mask, int vector) +{ +} + #endif static void kvm_flush_tlb_others(const struct cpumask *cpumask, -- 2.25.1