Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4135491rwe; Tue, 30 Aug 2022 05:21:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4xNgvrDYSYjHjO69LtmsTDNK6mLVoVJ8mmU/q3lXP2RRcHdkK7+EHCX6xuAUQCSqDyDTD9 X-Received: by 2002:a17:90b:3d8b:b0:1fb:6f72:3f8f with SMTP id pq11-20020a17090b3d8b00b001fb6f723f8fmr23638057pjb.125.1661862111552; Tue, 30 Aug 2022 05:21:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661862111; cv=none; d=google.com; s=arc-20160816; b=BkDIZ/D3EkpPW7INCEQrily0n628VN8oQq9gm/nDBIuSImzF3uX3hvzPRpjzvdirdE uMAlHmpOwFGn/h5xNwA1iRbjiB8AAPNBM2vknbBRmoaZVOlkf9CfKiUHTlaqUFWLI1p9 nAnCSpoWZI+gMKUCNViHgHY0H2aMQMQIBntPfoX5Vm1ee+J6sZYMpPzB3mures2mJ5IJ A70v40gHUEvGF4qP8+vN1LWqZmd4/yVyVDh3BdDLvRb8CcMS5zw+klSWqGxr1xskx3hk +8PyGVOHbFbN2C24/sicpRc6T2w1GajtPNa1b1imiNhkTokanjpWnsT4TbRT9YAmNBSq /xFg== 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=2IelCuzF9PvgEieE8YUF0E60rJ6oMoLO+OsQuDe389M=; b=vL3LVNZ2rqUJyN2xIiG/UAVYCeRtXbCn3Z4ik9B62b6ibVkq5jx/D2BrcwB9+U0Kwh AKNtKYPJOal5AV/kzPABDon4ZgNpl2JGOYVUaa0QigbFW/ldeZe8XRfxxQP2t6D4c2nE zi8LrqDpeLiaiGeeltVGEsCGUZNLfJ1Z5epb0h3+d0jFWxepSRg/CfVYW04qFnTWZEJg GQ/rz5AxPIH2FntiLCSBcB0yKMT5IreUnRMhn9s2kuaeFHp+XthVIEns9cil7ymrIEed ny1iY/UHqvny47YSNX9H+GtzYPIkTNIZOQalRbQOvtNIkdQo06RkeCEDtvN6Hz+t3BPN q7zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=V6VroCoJ; 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 c16-20020a63da10000000b0042b39f27595si2028750pgh.325.2022.08.30.05.21.39; Tue, 30 Aug 2022 05:21:51 -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=V6VroCoJ; 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 S229558AbiH3MDV (ORCPT + 99 others); Tue, 30 Aug 2022 08:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230438AbiH3MCQ (ORCPT ); Tue, 30 Aug 2022 08:02:16 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B672AEEC73; Tue, 30 Aug 2022 05:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661860926; x=1693396926; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kP8Ku5Lv8rqfw0Nma82+ZaeLrsDvE/lPJOPwAOWO6Gg=; b=V6VroCoJ2xHmV7u8ZVWMZVnx1fu9SvSLRyl3dYPdAlHo72FbO/hevdqG CeGrtJZLIOQytEKZKrlbYRt8WbhTZBccHubrmAKNnRt8ylWx+d1ozLioZ vIQxY/jR5XeIYnRRKBZY5IrX9e8mqfnPKlRMcS+FCjXJCjOYj9xRAEjBa PvJzNOgJFLbo3Ml8Q6/Q1SIWOlmLaWLr3oCw+f0lHMqw+DSP8EewhDj5J /jKfdeZhnaZOSQDT8NHjP2iz9ZAEfmWNpvmbg9GIui+dwWsLaQ0vnnx/u 8VbOkse7G09jft4n5i4DwMUXixfrgeFV6KM4BCRMKavxv7vR0QDAd1aa6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="356871002" X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="356871002" 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:02:00 -0700 X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="787469668" 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:02:00 -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 17/19] KVM: Add config to not compile kvm_arch.c Date: Tue, 30 Aug 2022 05:01:32 -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 So that kvm_arch_hardware_enable/disable() aren't defined. Once the conversion of all KVM archs is done, this config and kvm_arch.c should be removed. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata --- arch/x86/kvm/Kconfig | 1 + include/linux/kvm_host.h | 2 ++ virt/kvm/Kconfig | 3 +++ virt/kvm/Makefile.kvm | 5 ++++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index e3cbd7706136..e2e16205425d 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -25,6 +25,7 @@ config KVM depends on X86_LOCAL_APIC select PREEMPT_NOTIFIERS select MMU_NOTIFIER + select HAVE_KVM_OVERRIDE_HARDWARE_ENABLE select HAVE_KVM_IRQCHIP select HAVE_KVM_PFNCACHE select HAVE_KVM_IRQFD diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 8abbf7a1773b..74111118db42 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1434,8 +1434,10 @@ void kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu, struct dentry *debugfs_ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {} #endif +#ifndef CONFIG_HAVE_KVM_OVERRIDE_HARDWARE_ENABLE int kvm_arch_hardware_enable(void); void kvm_arch_hardware_disable(void); +#endif int kvm_arch_hardware_setup(void *opaque); void kvm_arch_pre_hardware_unsetup(void); void kvm_arch_hardware_unsetup(void); diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index a8c5c9f06b3c..917314a87696 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig @@ -72,3 +72,6 @@ config KVM_XFER_TO_GUEST_WORK config HAVE_KVM_PM_NOTIFIER bool + +config HAVE_KVM_OVERRIDE_HARDWARE_ENABLE + def_bool n diff --git a/virt/kvm/Makefile.kvm b/virt/kvm/Makefile.kvm index c4210acabd35..c0187ec4f83c 100644 --- a/virt/kvm/Makefile.kvm +++ b/virt/kvm/Makefile.kvm @@ -5,7 +5,10 @@ KVM ?= ../../../virt/kvm -kvm-y := $(KVM)/kvm_main.o $(KVM)/kvm_arch.o $(KVM)/eventfd.o $(KVM)/binary_stats.o +kvm-y := $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/binary_stats.o +ifneq ($(CONFIG_HAVE_KVM_OVERRIDE_HARDWARE_ENABLE), y) +kvm-y += $(KVM)/kvm_arch.o +endif kvm-$(CONFIG_KVM_VFIO) += $(KVM)/vfio.o kvm-$(CONFIG_KVM_MMIO) += $(KVM)/coalesced_mmio.o kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o -- 2.25.1