Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp619036iog; Fri, 24 Jun 2022 10:19:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1urkk3ZMkmBqgp2TpaXhKyCUphP6XCorhvuxzPNce6GJ7JhdOpURAb7a0rl9NU4NpVJHV6/ X-Received: by 2002:a17:90b:33cc:b0:1ec:b279:69fa with SMTP id lk12-20020a17090b33cc00b001ecb27969famr5357866pjb.70.1656091196435; Fri, 24 Jun 2022 10:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656091196; cv=none; d=google.com; s=arc-20160816; b=kmaFUk7JbS5MePdevZoLmbyQm0EAAP9QmGc6lOx7f1kf1JZBwHLsv4t89LhFfMkB7b MjFI8OaokXV0JTY4jCFLTc3FSZ7Azo2ZIVa0MZaRPmnQbmhG+QPicndKSXgjo0nNtdUX MR6Mz64dauM9u7CosHuSKzjYBgXitvdBr/fgEH5M70kGfTTnCkR8NARAcAOklMLjm13V Z+Z1bA6wJZRo8jfNigXKbcEHZn2CF7QxSZljyenzJv+zqDt/gpbJxRS1TOvjDeGuz29x jJJLnZYRePZTwEDGrpjSPHi52LEIungHw9uQmikrC+2DmuIcYJKW820M8YipKanU9b5E dGZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :reply-to:dkim-signature; bh=v5yna8ItikU2fb5u1sePnTAPT+OQna41hrQ1rG7Dn0Y=; b=qOZvGdagsetjDYrkXEjx52GV3HQ4AA+JytBFR206f0AV8Ko/hkH43VNJzTvgz9b5py uq3+amwI5TzQI5UHyxND4APl/PI5nJ28xKsF+keCxL3Xpgplza1D6Hvj7NzXr+ugk9hA xOxHVrWk0rqmSuKdMPBn0HjY68Mbz8nVhpkJ2dtzuiSvLq2Tc1Mrq7i08eyf1ToK0O29 bDh26Cwjzof9aeVApdg69bUzgFiSvpRZ++2jYeycn1op1nDIvnqRJohRzYJOilRITaf5 FcR3bZpZOCOAEk4mp83kN8P/h78lyKQ5TGyc5ozhZAqXfmjMne3z1BU0oCD6qzJap0dQ haOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KyIuHFn8; 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 u13-20020a17090341cd00b00161478f77e5si4624225ple.157.2022.06.24.10.19.42; Fri, 24 Jun 2022 10:19:56 -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=@google.com header.s=20210112 header.b=KyIuHFn8; 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 S231508AbiFXRSN (ORCPT + 99 others); Fri, 24 Jun 2022 13:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231166AbiFXRSM (ORCPT ); Fri, 24 Jun 2022 13:18:12 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1578B1EACE for ; Fri, 24 Jun 2022 10:18:11 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id l6-20020a170902f68600b0016a36fb2c9aso1578766plg.2 for ; Fri, 24 Jun 2022 10:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:message-id:mime-version:subject:from:to:cc; bh=v5yna8ItikU2fb5u1sePnTAPT+OQna41hrQ1rG7Dn0Y=; b=KyIuHFn8LfqulIFW1TY5xQGMGKE5mrB5KYFzJL5pvXrFz9Z+E8TP798YlQiCx0euRQ hACEWEJ6aNEucjttEX9XhVoJgxjBu2sOAZ6pLxOxcPm2wmyAZSgZiK1BPzML1Um0M+k0 yE3Tl0UTpLUitJyMN8wUwnX93sPI9+HQ3Ao49FkAPuK34WwuRNEqEE1fHuLkb/buqMpa 5bPwAIpA7c/yXX9a7gflIxragXVwgj9D6/tNfTijiNYw1xmnkLwLY4q6a/K2E6yn5heC hRaa4vU+hwzw42TSYRgStAn1/+LuwEpNObCwzt4XMpgU+9X/gGLcIHT7DhbBvD5anPBu i8Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:message-id:mime-version:subject :from:to:cc; bh=v5yna8ItikU2fb5u1sePnTAPT+OQna41hrQ1rG7Dn0Y=; b=MfnVv7FgIt5nit+QpfseiUCclSWYd4fu3fcyNF35NO5gXjILVMclHHyJ4XhUomiuwr E0d2eLho9cDSU51D0OoGUEassq+NojeJXXviD37Jltow3X5+SmEzoref4crZDA9YceLb Dpm7aK0tn1Zs3wHNarElzg1Mc48oILObC4nOskurbyk2tXqsmSnalRm5UkQhJJbgZyup 7RHAA6NBA33H3JGGm9ODDsHroUvfBcbUmyqR3aVXMtega7QzIg84L5x+Y4glKRQSt6Yq XYBsfGZVP56DirrNQ/Y/ykwRstq5hRyC+P/vb6pqsX6/XYpYlD+WD/LpbmHpegT/C5HA 0VDQ== X-Gm-Message-State: AJIora/tmjHIz07i72U40A7UWTME1IwWbf7eVBmI50H8+zOTsZjOjPiU X59goPuGL8Ijq5I4P46raio6lor0j5g= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a00:2450:b0:4f7:bf07:c063 with SMTP id d16-20020a056a00245000b004f7bf07c063mr47194536pfj.51.1656091090609; Fri, 24 Jun 2022 10:18:10 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 24 Jun 2022 17:18:05 +0000 Message-Id: <20220624171808.2845941-1-seanjc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog Subject: [PATCH 0/3] KVM: x86/mmu: Cleanups for eager page splitting From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Matlack Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Eager page splitting cleanups for a few minor things that were noted in code review but didn't make it into the committed code. The last patch in particular is a bit more urgent than I first realized. I had forgotten that pte_list_desc is now 128 bytes, and I also had a brain fart and thought it was just allocating pointers, i.e. 8 bytes. In other words, I was thinking the 513 object buffer was "only" wasting ~8kb per VM, whereas it actually costs ~64kb per VM. Sean Christopherson (3): KVM: x86/mmu: Avoid subtle pointer arithmetic in kvm_mmu_child_role() KVM: x86/mmu: Use "unsigned int", not "u32", for SPTEs' @access info KVM: x86/mmu: Buffer nested MMU split_desc_cache only by default capacity arch/x86/kvm/mmu/mmu.c | 53 ++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 18 deletions(-) base-commit: 4b88b1a518b337de1252b8180519ca4c00015c9e -- 2.37.0.rc0.161.g10f37bed90-goog