From patchwork Wed Oct 31 13:26:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Orr X-Patchwork-Id: 10662671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 769C413BF for ; Wed, 31 Oct 2018 13:26:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68066284BD for ; Wed, 31 Oct 2018 13:26:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C21928AE7; Wed, 31 Oct 2018 13:26:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03F0728935 for ; Wed, 31 Oct 2018 13:26:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0883A6B0006; Wed, 31 Oct 2018 09:26:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 06AB16B000D; Wed, 31 Oct 2018 09:26:42 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8FF46B0010; Wed, 31 Oct 2018 09:26:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by kanga.kvack.org (Postfix) with ESMTP id B7F5F6B0006 for ; Wed, 31 Oct 2018 09:26:41 -0400 (EDT) Received: by mail-vs1-f70.google.com with SMTP id n87so2694979vsi.13 for ; Wed, 31 Oct 2018 06:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:message-id:mime-version :subject:from:to:cc; bh=NOC6Fg+ZgD+kPau5Sv4cDlwINByIqGeelUpqzXaRFvo=; b=t3mHp+11HixnBQJjxfwbqEwgM8xDIKjHwxVtfig4DxfVFx5A4q7FswAfkUgNTp++iv HxO+iOwbrT1QSlRlB1nYaBX5J1a8MBEXJy7dY9BkGWhQwz3HjiTFUFNFxkd3jhivTh+c 4IzV35RaA45JFLNqIsPWS5/z9eoMWDrkLwn2rVN1/7D7Mevu2rDBId7Bn4LjHsocP3g6 ZsW169E8c62HdbFPV5Xr/J7C5WzK5NAIFVvK2Uw3xZrWnjXv/p2BtcQoBDb5vit5Cn81 YSBNVFIZK0T90Hjob8vMTbLAdhbujv/A2MntbS5JnMaMWik6kp99XnAq7HCm0MeEDeb/ JS1g== X-Gm-Message-State: AGRZ1gK5vhAVQh9PNagnV5Bmfe6oZz3N/Bx8lSwjzcYYyEDdK9ZTQOx/ pC+fDfR8iw9DxhGz4Ty+rG4iEl1QTieuF78S422RtUkGs69rJ4Oy8pgQIxmFXkmsi4GEl8P5gl+ f3mU6AmLgn0Hj51VA65RYlq6Y0Rv9M0bpVB/nqMtWQFgfJkGWPFOUZMps7uZBbVmA3is97f5koZ qls4jiQVWf5EmAKMVGBV4P9ArNWRKtV6C7mqTFjsUmtCJYDpIg/1IAjxItAINQKnPSFMLkMpaW5 fvFUOo1edTAdstibX/1gOX0oz0xKef16fYK+iQKASACt9YFcCgQqhIEvd5r89yI/Om0lrLW++oo 1nmWQn4CKLKEp3BbMxnPrKI2CFDIpbO9PATlkfCc1cU26vD8sbd0y7SRyShV8XkWhrIlWUYwqlA K X-Received: by 2002:ab0:4812:: with SMTP id b18mr1395812uad.30.1540992401323; Wed, 31 Oct 2018 06:26:41 -0700 (PDT) X-Received: by 2002:ab0:4812:: with SMTP id b18mr1395797uad.30.1540992400546; Wed, 31 Oct 2018 06:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540992400; cv=none; d=google.com; s=arc-20160816; b=zHFTQ//6N4Exo81jy3J6Utu4mtyt41L3PNx3f/085KgT3qqzLd5nQtEI6iOfDK/9s+ Y67a67IAuOuGOI3Z7wUb4EPeAvJ6BF+6oXcLE2xaXBXpGr5Fkn4O6lE/JeP3XWT2KCSP PTSH2wuKBZeioTzQAi1a4s4UoY/BW7hqMj3S7OAVPV3q3i6GXRmikwYBYlz2fDlm9coG wIJGZ1/G2WJJr9uA785kkzsx442Rx2cOnAJDcxpLqiq0bnianiKzXkLrTagSp4p0Q6hL AFsKg5uBidM8G7yw69mzddra7jCZGiC0ZUXuLCcZU98V3waYDGLhHYOIOVYKgsvhb7hM LAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:mime-version:message-id:date:dkim-signature; bh=NOC6Fg+ZgD+kPau5Sv4cDlwINByIqGeelUpqzXaRFvo=; b=R5J+4Z50yRt6/TExp2kGmX1E3aZi3muuzoMrq+DPXyAAYYYF8WbPJ1LR76T/taLqSx lwXgix1u8OT1h46J6/g9t3Akgaf5+JLdvaNKm6Vgb2t+39NGlq3U4EYDLe5vBYdleEjP aeEU8vGdEnfzYkmPrknNGy63CnVQCNLw1USJzNm6yQCdS6NR2+Hiwe6jr5+Ar2Iz2LX/ hHA8eSMV2HSbtYM2OqhKUukZAckhyB26sfPxxUCHE35aN59gFM6FVBP4gmZcF6B2FeFf u1OBV0yJrFHZDQPtLb98Z91Ul0ZMQT7HpQzpaxe88D0QYVUxrUmRcyEgAtpQ5B6oSxdU hflA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oMD+1XVA; spf=pass (google.com: domain of 3kk3zwwckcdcftkvhkkzhhzex.vhfebgnq-ffdotvd.hkz@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3kK3ZWwcKCDcfTkVhkkZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--marcorr.bounces.google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73]) by mx.google.com with SMTPS id o123sor3772119vso.14.2018.10.31.06.26.40 for (Google Transport Security); Wed, 31 Oct 2018 06:26:40 -0700 (PDT) Received-SPF: pass (google.com: domain of 3kk3zwwckcdcftkvhkkzhhzex.vhfebgnq-ffdotvd.hkz@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oMD+1XVA; spf=pass (google.com: domain of 3kk3zwwckcdcftkvhkkzhhzex.vhfebgnq-ffdotvd.hkz@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3kK3ZWwcKCDcfTkVhkkZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--marcorr.bounces.google.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=NOC6Fg+ZgD+kPau5Sv4cDlwINByIqGeelUpqzXaRFvo=; b=oMD+1XVAAB5q1dJ4D2Mk1h3+khDL0pFAVbUiftsP2dSCug2ylGz/tRDzRUPhXnLjiV dc9OPD8d/WtfYA57k7ia2oKR2j8oKaXpTUiDJjEmJ8PLv7n3//IRA5P7j5DXYcAFdMn7 YUi3YhzN/vKaTn3gmmEz7ITyvuFJ23Zi40Qt7veyo1e3pGZ7fn3+DZujGGuSFDf8gkDY TvLwEaVVge+ib//fWOAIQkYZc20fC7yL0fyJU9JKB13iaxXePy7yQGOkpCrrfd+tBnxY Il4eZJASjYPFmCyupt2QLw5dpllVKDQGHrXsY+LaDTkk1zIPaTKPunuai0r7C2g4Ww13 GCxQ== X-Google-Smtp-Source: AJdET5eQhxbhFuFX5cG7SmIYxLyUKAnj/fqZOWT5rNOhGf/bwwagPmkKuzJW8My+DLK/eP64RRRW4WbtDgae X-Received: by 2002:a67:4a0c:: with SMTP id x12mr2401511vsa.11.1540992400240; Wed, 31 Oct 2018 06:26:40 -0700 (PDT) Date: Wed, 31 Oct 2018 06:26:30 -0700 Message-Id: <20181031132634.50440-1-marcorr@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog Subject: [kvm PATCH v5 0/4] shrink vcpu_vmx down to order 2 From: Marc Orr To: kvm@vger.kernel.org, jmattson@google.com, rientjes@google.com, konrad.wilk@oracle.com, linux-mm@kvack.org, akpm@linux-foundation.org, pbonzini@redhat.com, rkrcmar@redhat.com, willy@infradead.org, sean.j.christopherson@intel.com, dave.hansen@linux.intel.com, kernellwp@gmail.com Cc: Marc Orr X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Compared to the last version of these patches, I've acted on Dave Hansen's suggestions to get rid of redundant fpu storage and move it out of the kvm_vcpu_arch struct. For now, I've left the vmalloc patches in the series, but we might end up dropping them. Thus, I've have not responded to Sean Christopherson's review on those patches yet. Marc Orr (4): kvm: x86: Use task structs fpu field for user kvm: x86: Dynamically allocate guest_fpu kvm: vmx: refactor vmx_msrs struct for vmalloc kvm: vmx: use vmalloc() to allocate vcpus arch/x86/include/asm/kvm_host.h | 10 ++-- arch/x86/kvm/svm.c | 10 ++++ arch/x86/kvm/vmx.c | 102 +++++++++++++++++++++++++++++--- arch/x86/kvm/x86.c | 49 ++++++++++----- virt/kvm/kvm_main.c | 28 +++++---- 5 files changed, 159 insertions(+), 40 deletions(-)