Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4955766ybn; Sat, 28 Sep 2019 10:28:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+jyrRlzvWi0AUMxNSNqsvsxNC0cjn+zTZSZlGcdhL9IWMSe89Ddw2SkI7/tD3yQzeT2p/ X-Received: by 2002:aa7:df16:: with SMTP id c22mr11042721edy.22.1569691683830; Sat, 28 Sep 2019 10:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569691683; cv=none; d=google.com; s=arc-20160816; b=RJHdvuNaMeJfPLfyL74ou+/2WBhDj+rNDSIdeNEIehMn9dp615sKWvWVtKChEonrRk JEJjlAmv9pOWMy9xKX45W64yYkyJSr3jElWB5SMiXw9Uhyf9ggrWKVNJYDM6JQZgbwFl S3WCUgihHvgiWsJtl4hzhA7t6XCqWZW4XcpwMIzI7pymC3sAu+OuLlUZhU5H3g67y/ll xfNkVKlRqs6EfQHG+/tTjX4Hs7R+JVX+P1p+KUy+OMtLWApbAHidAJ1vUZZO2zgD/qxz 4kKA2XqqXC0uxtzJTmpXDzxgksdEXxKonub2N9ecqy5hLJrDbecj0n1cPzRwFzGjVE7d rusQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CYpL8NaAK2AEoFFwHE/PAryhAvw7ryiqHvTUPaxF8vY=; b=Je4EecNLySYTcbXMlbsIVsl1wZqaDgKYZCGwj2ZPx9vf2wOGB0x2FTX6D9i0ZrcPYY Esfvw7cl3fKRq3L4BcAJFdpLuftDxVyQvJWTaDqIlYrFM6hOXnksPYXXJ8icxyJW9R6H SMJmIYUYLiQBLZj5S00oM6yGxz7wWUBu65wIJ08qhNl5JLs7E7X0WWmoFOA4bmmOg1RM WQ4aL7dHSLq8oNEcgc57pnORWFWSLIdaLWpSFk19jkT/fGHAMXD9LUcFcXCz8WTlcmmx 5/6mULeBS3pCVhuXcdSO/yBTseQ+81Sg8UbCyxP8hlBiEwt4rCMn7qw2qNQUdZ9p1MmV Qt5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si4548991ejy.154.2019.09.28.10.27.38; Sat, 28 Sep 2019 10:28:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728704AbfI1RXZ (ORCPT + 99 others); Sat, 28 Sep 2019 13:23:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728569AbfI1RXY (ORCPT ); Sat, 28 Sep 2019 13:23:24 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0A8010576C4; Sat, 28 Sep 2019 17:23:24 +0000 (UTC) Received: from mail (ovpn-125-159.rdu2.redhat.com [10.10.125.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6232D60600; Sat, 28 Sep 2019 17:23:24 +0000 (UTC) From: Andrea Arcangeli To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Vitaly Kuznetsov , Sean Christopherson Subject: [PATCH 01/14] KVM: monolithic: x86: remove kvm.ko Date: Sat, 28 Sep 2019 13:23:10 -0400 Message-Id: <20190928172323.14663-2-aarcange@redhat.com> In-Reply-To: <20190928172323.14663-1-aarcange@redhat.com> References: <20190928172323.14663-1-aarcange@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Sat, 28 Sep 2019 17:23:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is the first commit of a patch series that aims to replace the modular kvm.ko kernel module with a monolithic kvm-intel/kvm-amd model. This change has the only possible cons of wasting some disk space in /lib/modules/. The pros are that it saves CPUS and some minor RAM which are more scarse resources than disk space. The pointer to function virtual template model cannot provide any runtime benefit because kvm-intel and kvm-amd can't be loaded at the same time. This removes kvm.ko and it links and duplicates all kvm.ko objects to both kvm-amd and kvm-intel. Signed-off-by: Andrea Arcangeli --- arch/x86/kvm/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile index 31ecf7a76d5a..68b81f381369 100644 --- a/arch/x86/kvm/Makefile +++ b/arch/x86/kvm/Makefile @@ -12,9 +12,8 @@ kvm-y += x86.o mmu.o emulate.o i8259.o irq.o lapic.o \ i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \ hyperv.o page_track.o debugfs.o -kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o vmx/evmcs.o vmx/nested.o -kvm-amd-y += svm.o pmu_amd.o +kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o vmx/evmcs.o vmx/nested.o $(kvm-y) +kvm-amd-y += svm.o pmu_amd.o $(kvm-y) -obj-$(CONFIG_KVM) += kvm.o obj-$(CONFIG_KVM_INTEL) += kvm-intel.o obj-$(CONFIG_KVM_AMD) += kvm-amd.o