Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1324027rwb; Fri, 13 Jan 2023 10:38:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXuWUxNLrsp6wpO9VLefmZKb7/ZDPZmZNqqkY5wPrl7lnL0ACq7sU6dGS7wRI+OPaifslCIX X-Received: by 2002:a17:90b:254b:b0:226:e5c3:f6b9 with SMTP id nw11-20020a17090b254b00b00226e5c3f6b9mr26137284pjb.29.1673635138257; Fri, 13 Jan 2023 10:38:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673635138; cv=none; d=google.com; s=arc-20160816; b=wVY/TWWi1gUBcSDwXv2V/x5V20+dAnzZJ3/6xmDZbi6URjPAFUjvBL9BLKM/df+KMK 5PM+tufusyeL95xrSxfrI2ukbcgg8oB2O4lmsnSTFjdbKFbm90chOhU/wIqoWDbxjGBM so2oTzZ/pD5zXIthCqoShZ/7n7au8+OMHpE1LdiWT1IRpIfsWr/Fp45I7MpDxaNeg20T Lzq6PnWitJvlc2v24fpzeCrfihWkKLYLYJST2qEcP6YEtW2zispTAUSEQt6EhOU2LOeq g3k+3AUFYCsFJ/k7ylVmgpPM29CYR3vBQZG9U7HA6Gyv80tc0n8vwghH/G3eWVmc5JiR aJDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qoxr5X5imkz2olyJUzF1rhC2GFm22yRwb2J/WfLDgXQ=; b=OP7snY38t0O7YU2zDnr1ylN9KGZz8poJU7DE2029wWGYey7PDKVG6WjwFr4W2w5cfE gdmYC53s78VV9c7yHROUllFbrxXgPi3xbfwaUCAYJlGKrt4QyeboOTVN9NpikNDyq0mx DCX8WpggIOdcgeKCpw+qvB8/JJu5afjxtSrx1po9TjSXp9zhpjgg3L6jndx9Lwqcmc7w hJRNExuXBq+pP/98qGWEbpPUs88LI/GaYjyulhilYzvJOBXi5kCrupw5xAAC51p1LhND AK4Qg7jieDrrOQUYN56YEq89MxfdmvY79PNxuiI95sH/apot6XLC2PQxnJKWcl/8BFIT d5hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dpxojtaZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl8-20020a17090b384800b00228dcb3072asi10875651pjb.56.2023.01.13.10.38.51; Fri, 13 Jan 2023 10:38:58 -0800 (PST) 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=@google.com header.s=20210112 header.b=dpxojtaZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjAMSRH (ORCPT + 51 others); Fri, 13 Jan 2023 13:17:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231202AbjAMSPz (ORCPT ); Fri, 13 Jan 2023 13:15:55 -0500 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5D3010E7 for ; Fri, 13 Jan 2023 10:07:04 -0800 (PST) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-4b6255ce5baso295248817b3.11 for ; Fri, 13 Jan 2023 10:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qoxr5X5imkz2olyJUzF1rhC2GFm22yRwb2J/WfLDgXQ=; b=dpxojtaZxe37je5lIn27UJw3451J9nTITh/73Iz7YPdEwivuYKLF+mEsM4TPJordCx tOK6i53c6fxIEjCBN4osHXTal+EL8RJ4weGrEjHrGUgzIl6AREQAc6U4iFTNU3+bsei7 6WZcxhcmbCNrg/fGvcMuje4hfNbWEbtY4x1UnpXbSYuZcEZrAbMkS00736iqJbdgXsYc MASpAof7wBsOjMKaeyzUTLKkqGlwKc/IIUfeKXiflNewBpGEHg/HZqhyChic8FNa34l1 wTQY6ezJ2la+PL0kJNHw/+bsAWL84qKZPUoQPZFqxZgk443sxu1O0HeFg8ImFTrlurLM DXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qoxr5X5imkz2olyJUzF1rhC2GFm22yRwb2J/WfLDgXQ=; b=QutWR2Soc4LrgAwe12SSW6AYnxlO/le46T0pqJKgSurNMdxEHbvs41sj4uutRyEoTw GFqaVXTj0tNphkzGUwWTx8pZR4LuIiem61vPyfUjLqdkc2Q+M48IozZ1tOrpqN6Y8Ev9 JHIYwMcK2lDGsOn1jNO1WKPKtlWVxbA9VboH0h7VEn+0glQda5epGvVG7b0pxJLDRFzE 0lqlA4CJlujQXRbx0VAU90J7H1xBGWDpmOIh1zJ3jUwm4PHcIwxBbzVsfn5bsN7069Kf cVHjoNOYXe4EBtg+u4okaDoCObRoHBIRwk116nn386SpADXg+gzRZqu5G6+4ijFPAHNW HFSA== X-Gm-Message-State: AFqh2kr1ruuJZ+ep5B9KnEtxw74AomhG9X1XTkbgnVFjaHpvxU/+Xn9f 8ksQf4g4TJWnhe2fnYQwIXPLzx9ScW2rrIiV9pRnkg== X-Received: by 2002:a0d:d9c5:0:b0:4de:4c70:5504 with SMTP id b188-20020a0dd9c5000000b004de4c705504mr368547ywe.318.1673633223864; Fri, 13 Jan 2023 10:07:03 -0800 (PST) MIME-Version: 1.0 References: <20221221222418.3307832-1-bgardon@google.com> <20221221222418.3307832-4-bgardon@google.com> In-Reply-To: From: Vipin Sharma Date: Fri, 13 Jan 2023 10:06:27 -0800 Message-ID: Subject: Re: [RFC 03/14] KVM: x86/MMU: Move the Shadow MMU implementation to shadow_mmu.c To: Ben Gardon Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Peter Xu , Sean Christopherson , David Matlack , Nagareddy Reddy Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Wed, Dec 21, 2022 at 2:40 PM Ben Gardon wrote: > > On Wed, Dec 21, 2022 at 2:24 PM Ben Gardon wrote: > > > > Cut and paste the implementation of the Shadow MMU to shadow_mmu.(c|h). > > This is a monsterously large commit, moving ~3500 lines. With such a > > large move, there's no way to make it easy. Do the move in one massive > > step to simplify dealing with merge conflicts and to make the git > > history a little easier to dig through. Several cleanup commits follow > > this one rather than preceed it so that their git history will remain > > easy to see. > > > > No functional change intended. > > > > Signed-off-by: Ben Gardon > > Woops, I guess this message bounced because the patch was just too long. > I can try to split it in two if folks would prefer, or just send a > list of the functions / definitions moved. > Interesting, I can see this patch in my email client, lore.kernel.org/lkml but not in patchwork.kernel.org One more way can be to move declarations to shadow_mmu.h first and then in subsequent patch move definitions to shadow_mmu.c. I do agree it won't reduce size much but it will make it easier to see which functions are becoming the part of API. > > --- > > arch/x86/kvm/debugfs.c | 1 + > > arch/x86/kvm/mmu/mmu.c | 4526 ++++--------------------------- > > arch/x86/kvm/mmu/mmu_internal.h | 4 +- > > arch/x86/kvm/mmu/shadow_mmu.c | 3408 +++++++++++++++++++++++ > > arch/x86/kvm/mmu/shadow_mmu.h | 145 + > > 5 files changed, 4086 insertions(+), 3998 deletions(-) > > > > ... > > > -- > > 2.39.0.314.g84b9a713c41-goog > >