From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BBCEC433F5 for ; Wed, 17 Nov 2021 18:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74D6F61BC1 for ; Wed, 17 Nov 2021 18:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239882AbhKQSOj (ORCPT ); Wed, 17 Nov 2021 13:14:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:53002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238747AbhKQSOg (ORCPT ); Wed, 17 Nov 2021 13:14:36 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D333B61AFF; Wed, 17 Nov 2021 18:11:37 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mnPPD-0069Au-Oo; Wed, 17 Nov 2021 18:11:35 +0000 Date: Wed, 17 Nov 2021 18:11:35 +0000 Message-ID: <87r1be7iug.wl-maz@kernel.org> From: Marc Zyngier To: David Woodhouse Cc: Paolo Bonzini , kvm , Boris Ostrovsky , Joao Martins , "jmattson @ google . com" , "wanpengli @ tencent . com" , "seanjc @ google . com" , "vkuznets @ redhat . com" , "mtosatti @ redhat . com" , "joro @ 8bytes . org" , karahmed@amazon.com, James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Huacai Chen , Aleksandar Markovic , Michael Ellerman , Benjamin Herrenschmidt , Anup Patel , Christian Borntraeger , kvmarm@lists.cs.columbia.edu, linux-arm-kernel , linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v3 02/12] KVM: Add Makefile.kvm for common files, use it for x86 In-Reply-To: <20211117174003.297096-3-dwmw2@infradead.org> References: <20211117174003.297096-1-dwmw2@infradead.org> <20211117174003.297096-3-dwmw2@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: dwmw2@infradead.org, pbonzini@redhat.com, kvm@vger.kernel.org, boris.ostrovsky@oracle.com, joao.m.martins@oracle.com, jmattson@google.com, wanpengli@tencent.com, seanjc@google.com, vkuznets@redhat.com, mtosatti@redhat.com, joro@8bytes.org, karahmed@amazon.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, chenhuacai@kernel.org, aleksandar.qemu.devel@gmail.com, mpe@ellerman.id.au, benh@kernel.crashing.org, anup.patel@wdc.com, borntraeger@de.ibm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-s390@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, 17 Nov 2021 17:39:53 +0000, David Woodhouse wrote: > > From: David Woodhouse > > Splitting kvm_main.c out into smaller and better-organized files is > slightly non-trivial when it involves editing a bunch of per-arch > KVM makefiles. Provide virt/kvm/Makefile.kvm for them to include. > > Signed-off-by: David Woodhouse > --- > arch/x86/kvm/Makefile | 7 +------ > virt/kvm/Makefile.kvm | 13 +++++++++++++ > 2 files changed, 14 insertions(+), 6 deletions(-) > create mode 100644 virt/kvm/Makefile.kvm > > diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile > index 75dfd27b6e8a..30f244b64523 100644 > --- a/arch/x86/kvm/Makefile > +++ b/arch/x86/kvm/Makefile > @@ -7,12 +7,7 @@ ifeq ($(CONFIG_FRAME_POINTER),y) > OBJECT_FILES_NON_STANDARD_vmenter.o := y > endif > > -KVM := ../../../virt/kvm > - > -kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \ > - $(KVM)/eventfd.o $(KVM)/irqchip.o $(KVM)/vfio.o \ > - $(KVM)/dirty_ring.o $(KVM)/binary_stats.o > -kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o > +include $(srctree)/virt/kvm/Makefile.kvm > > kvm-y += x86.o emulate.o i8259.o irq.o lapic.o \ > i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \ > diff --git a/virt/kvm/Makefile.kvm b/virt/kvm/Makefile.kvm > new file mode 100644 > index 000000000000..ffdcad3cc97a > --- /dev/null > +++ b/virt/kvm/Makefile.kvm > @@ -0,0 +1,13 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Makefile for Kernel-based Virtual Machine module > +# > + > +KVM ?= ../../../virt/kvm > + > +kvm-y := $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/binary_stats.o > +kvm-$(CONFIG_KVM_VFIO) += $(KVM)/vfio.o > +kvm-$(CONFIG_KVM_MMIO) += $(KVM)/coalesced_mmio.o > +kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o > +kvm-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o > +kvm-$(CONFIG_HAVE_KVM_DIRTY_RING) += $(KVM)/dirty_ring.o Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.