Message ID | 20230217193336.15278-1-minipli@grsecurity.net |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp31861wrn; Fri, 17 Feb 2023 11:36:34 -0800 (PST) X-Google-Smtp-Source: AK7set+TFAIhqkXc/4tCWz3Z6RoAQGdBu2WZUfjd1/ymIEx4mBj0ENaCQghFhk6HzamqkqifQTKW X-Received: by 2002:a17:90b:1d08:b0:234:1cb4:b1f5 with SMTP id on8-20020a17090b1d0800b002341cb4b1f5mr1823871pjb.7.1676662594265; Fri, 17 Feb 2023 11:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676662594; cv=none; d=google.com; s=arc-20160816; b=C4H+VcDVxSXP4A95E5GCjKSNFAqXtutsuhTRhnD52B+lrm2Y8dDGp/zEanBc9aYyZA wOFrQbZSCldBGxM3jyVPFVfuwOszOamh8FzL8fXjrPxLAdgvO+OKzVUXsWf+QQFvDPu8 38j2YNg2L2B0LGXDWbK7RiKHiaZXeWP2gvxidDzQ2b4mtNnTjgvIlmW5kU3j03yojFwm LhfjgON/nZ36JtJn2ZdEpcNGbgVSBEJxWCddEH3teylPupiIJAiF9L392GNthNEQpmyn cKFIStCU4venbk61vqzuOjpN/BQPZ+8qG02xwXkoGw8MQSGfvAqUX8PrxW/eO35UZvDR Rtjw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=36c2t3bxTYAXxN1sWnIe/NpwPxNe7BvAQ4RverxEpho=; b=ireebb3kqMinzo255hEBofjYDA+71p17M6EMSDtA8UzIiprUXcYZVlBNdR4sxyFGwl a1OfAzE8VSxu11fBSICjOcw+t9uPjxEJLFGalNDHF9L7HNz3xjY0nBIqpsYxloqq9RX5 8oJJuGnVgplb0wzNY2gx5zQ5+T2z1rbPVTsvirQ9IhmxO/8if6+99fDeJzgZ6RGP9iLS rRsVWrmzwyQyJOFB67bs/e7Cv/NqOhBWcRoE47rvFpSq2+D70UFwOFTaniBWqeuTA0FD YY1cwCl8kz9+M+V+SnlBT+5qnazlRS7NMz2s3ObgJrRrkhoJjHprkBGJj6zSqPHq08/5 /AjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@grsecurity.net header.s=grsec header.b=BujsuhQl; 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=grsecurity.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a63d806000000b004fb944d4acdsi5596158pgh.367.2023.02.17.11.36.21; Fri, 17 Feb 2023 11:36:34 -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=@grsecurity.net header.s=grsec header.b=BujsuhQl; 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=grsecurity.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjBQTb3 (ORCPT <rfc822;aimixsaka@gmail.com> + 99 others); Fri, 17 Feb 2023 14:31:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbjBQTbY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Feb 2023 14:31:24 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57527604CA for <linux-kernel@vger.kernel.org>; Fri, 17 Feb 2023 11:31:20 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id 4-20020a05600c22c400b003dc4fd6e61dso1697689wmg.5 for <linux-kernel@vger.kernel.org>; Fri, 17 Feb 2023 11:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grsecurity.net; s=grsec; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=36c2t3bxTYAXxN1sWnIe/NpwPxNe7BvAQ4RverxEpho=; b=BujsuhQlQ/vmzD35Tq0BOi+ArpHBIxvhv5hgzCk/NIAlsM1Tb90KM7c67qp/QmSLPJ 0AxwBCHqXUfs3ggEhatYLFrjglhO0sU36azEhu/3OMIijcx3xL574kFCGFLxxU6XpM1I Q/jIxdJOwo0doZfssMOcGp2rb/c0z0xcQmtnp7o1tnNoXqZj6VloYMGP31Q/FuGp4A/l 7ul7X/Ocgot+UDJMM9+vCVfEiLEszCiw9ryRu7qhDNP/mpQYidjdkKHHwfaWDh4obey5 M/rD4+al+n06rkDrOMAJA6EV6c8IQP+WR5Awy3LYyOIaJ8ddlKmWQePE1g+2qzCtOVMb XxBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=36c2t3bxTYAXxN1sWnIe/NpwPxNe7BvAQ4RverxEpho=; b=5RGcsD0UExy9QGJ2B/9jUeW1e1A7TYBkrR2hrdK8ljb1AW/wWLwVo+0AlLwwe1Z/nt Jhpy1VD7bPVaxnVRHJiszBgzzcXD9i3ES52nwNNJQ/o3d0fQfh/XfIuaaV01yG2RSibD cQ29RdB6w0yClnZ/vwwYPgNLgd4wVe0XAEvwT7pn4R7i/69Exyw4nUcusBgSKhSzFYnH O1LvSJ23ptJcknbdiOcwolXsAvifHNpwJfia6jJ0+OpNIyo6TCBWwvlsszcPdqYsCZS6 jK5jpwUIrhzWBiHTFTeH62pZBCxcW0B/MrKr2yhDhGCiJZ4g22gBeYCPQMlSneWsqaR6 vs3Q== X-Gm-Message-State: AO0yUKWwqrFSSESeCZ+Dqda9SWQC3i20jNbCRbNqyG/t4gjVNgyXDGHf UfS4w/xd8nTPa6xlocM7mzaxag== X-Received: by 2002:a05:600c:998:b0:3e2:20c7:6544 with SMTP id w24-20020a05600c099800b003e220c76544mr2530540wmp.19.1676662278862; Fri, 17 Feb 2023 11:31:18 -0800 (PST) Received: from nuc.fritz.box (p200300f6af465a00bfa0a0965e5e0d85.dip0.t-ipconnect.de. [2003:f6:af46:5a00:bfa0:a096:5e5e:d85]) by smtp.gmail.com with ESMTPSA id u9-20020a05600c4d0900b003e1f2e43a1csm5393618wmp.48.2023.02.17.11.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 11:31:18 -0800 (PST) From: Mathias Krause <minipli@grsecurity.net> To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com>, Mathias Krause <minipli@grsecurity.net> Subject: [PATCH v2 0/2] KVM: Minor structure layout changes Date: Fri, 17 Feb 2023 20:33:34 +0100 Message-Id: <20230217193336.15278-1-minipli@grsecurity.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758108156394606619?= X-GMAIL-MSGID: =?utf-8?q?1758108156394606619?= |
Series |
KVM: Minor structure layout changes
|
|
Message
Mathias Krause
Feb. 17, 2023, 7:33 p.m. UTC
v1: https://lore.kernel.org/kvm/20230213163351.30704-1-minipli@grsecurity.net/ This used to be a more exhaustive patch set shrinking kvm_vcpu's size. But we concluded that this would be too fragile to maintain and would require a more radical layout change to group often used members together instead of chopping off individual padding bytes. The remaining two patches are nonetheless useful, as they either make the structure layout a more natural fit (as for kvm_pmu, putting the version atop) or removing pointless padding (kvm_mmu_memory_cache). Please apply! Thanks, Mathias Krause (2): KVM: x86: Shrink struct kvm_pmu KVM: Shrink struct kvm_mmu_memory_cache arch/x86/include/asm/kvm_host.h | 2 +- include/linux/kvm_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Fri, 17 Feb 2023 20:33:34 +0100, Mathias Krause wrote: > v1: https://lore.kernel.org/kvm/20230213163351.30704-1-minipli@grsecurity.net/ > > This used to be a more exhaustive patch set shrinking kvm_vcpu's size. > But we concluded that this would be too fragile to maintain and would > require a more radical layout change to group often used members > together instead of chopping off individual padding bytes. > > [...] Applied patch 1 to kvm-x86 pmu, and patch 2 to generic, thanks! [1/2] KVM: x86: Shrink struct kvm_pmu https://github.com/kvm-x86/linux/commit/12aad9164763 [2/2] KVM: Shrink struct kvm_mmu_memory_cache https://github.com/kvm-x86/linux/commit/f530b531fb9e -- https://github.com/kvm-x86/linux/tree/next https://github.com/kvm-x86/linux/tree/fixes