From patchwork Tue Nov 6 22:20:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Orr X-Patchwork-Id: 10671555 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 A51A814E2 for ; Tue, 6 Nov 2018 22:20:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993702B335 for ; Tue, 6 Nov 2018 22:20:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9713D2B2DF; Tue, 6 Nov 2018 22:20:20 +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 1B1382B340 for ; Tue, 6 Nov 2018 22:20:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1956A6B0497; Tue, 6 Nov 2018 17:20:19 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 144E36B0499; Tue, 6 Nov 2018 17:20:19 -0500 (EST) 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 05E406B049A; Tue, 6 Nov 2018 17:20:19 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-yw1-f71.google.com (mail-yw1-f71.google.com [209.85.161.71]) by kanga.kvack.org (Postfix) with ESMTP id CA57E6B0497 for ; Tue, 6 Nov 2018 17:20:18 -0500 (EST) Received: by mail-yw1-f71.google.com with SMTP id i138-v6so11301525ywg.3 for ; Tue, 06 Nov 2018 14:20:18 -0800 (PST) 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=5h2BoXSQyMfBIHAQhVxblvT8Jki7y6GJuMaZUq37b5k=; b=Z7WIXKUJplbt2WNVIwSplN2kwKv5ghwPnrli5FiBa8NRbeFLg/uVtifnm1V5E8D3SK IAQ4zBrphLlz00ykzdDi6yFITSAfCJAwZezcPgHazn3wgf4hYstwgdHhL8sVCZwUPVX/ Uf+46au/ZD0HSlQrbvQYU0j/BRO5JnGcohqRdChlo3PJmnKn4gmFXYMx49wJeGXVWEMA 4ZWq3tvsck2YqP2v5xjuRiSpxBFbpjkzpxEN+FBuOklceXDOjp/nOpBBUPGhToxDClVd xFw8V74Sr0zYdRma9GssOlou5EK1zhBY9VxqJ6rioNyQETE1cZdcCKKlomsRXWE33niD nndQ== X-Gm-Message-State: AGRZ1gKbRNlfaNUzegJcBBRA3sME1C4kdG3EhrMr5Oj3KOwLOrjrV2rC r/clOcPrJnO6rPVmDc9IwSacc678aNK+dAb4Pptth+24bUPknoHD91Shk14oLqEVoMrsxD+6W3G 7bZW5nfKdsTBdum8A9D5sb9FgzdtZXMFKb3GQuFc2cVCvuDsb1wJJzk6M0fCK5JglChrADj5Llp lcozbOnwU1KhKxzoTX6vmMb0XkHKRhIMQwB5IDFIBR+A4Knv5pxrEyGAgMG7YvPba72nD+L+QKI gzaS7vv2guKHUsIRJG+VucyQ9XkQpBUA3azgCH8FjgDLhroVyKWmA83wEE5JotqADcvDdQL+MAH /KEfOGHxgpG73SkUXpsAjbcApm5bYA23KBLoFMDaBk98KWqBl3sRAUcDjEFCYCBW+GZVr3iTCDy + X-Received: by 2002:a81:a60d:: with SMTP id d13-v6mr27115346ywh.373.1541542818499; Tue, 06 Nov 2018 14:20:18 -0800 (PST) X-Received: by 2002:a81:a60d:: with SMTP id d13-v6mr27115315ywh.373.1541542817725; Tue, 06 Nov 2018 14:20:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541542817; cv=none; d=google.com; s=arc-20160816; b=VjbP74WiqIyH7mRx7c/W4+eTc5oKp9AR4/eHcegyJ2pLAMJJeOZAvptmov891bR0BZ Pg2ghcKvRtwwo/x9DRHhpAp6lwPEXPbgNFfxcRnaXfgaNrNr2bEBDbRT1yzl4T6MUsab sVgFISm8QXcpZ3jY7aP5lDsz0oBdVMnDQ/ro9QgSKrfz5h3VFmYCr5yAz4BNmOH4sEnb rH8JtwPfcZElhiAvd2DpAKzB577Qip/h9g/XdlIA65lPuhFfoHeuLK0iKNTIiy/bCjTz 3bkz7F+x/IqXFDU755w8mTq4/2h17MKJW7fVJI1Lai6bP0sgEMB8xmlXh6OuuQXHBo33 Luyg== 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=5h2BoXSQyMfBIHAQhVxblvT8Jki7y6GJuMaZUq37b5k=; b=Alx/C4x4KadeHHK+UcGiXzs16oUyIpmS4hd/eGVgmNg7uPqE3V3MCI3dt+B0bf+89l xqWaLFXhs0S8ln8ceXtlfPaDQAR3J0FM92ZqgH+CDqkvoFMPq9RZ2CFr2e4ehUe3Sjy6 z2xkrYwEDsHBpJNqQHJbM2ibj/Wmp21jbp/WrlOPUqmXHQ/+iL1Cm0DBKs2tbXp3SOxy qLyZKKOxcmv5NON1uOPsyvb8squtljlj+9lw2BA7aV0BUvFziXoHjU4zmVdYTx7+7bje wS2T5Y/5kGiYfepjcFm/UDXfO9p5vNZdeSiCDlrXGsxljzC0DTwx2OHM3i08yBubb5c4 GTMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hcQIy+eT; spf=pass (google.com: domain of 3orpiwwckcdyesjugjjyggydw.ugedafmp-eecnsuc.gjy@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3oRPiWwcKCDYeSjUgjjYggYdW.Ugedafmp-eecnSUc.gjY@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 y191-v6sor1242519ybe.145.2018.11.06.14.20.17 for (Google Transport Security); Tue, 06 Nov 2018 14:20:17 -0800 (PST) Received-SPF: pass (google.com: domain of 3orpiwwckcdyesjugjjyggydw.ugedafmp-eecnsuc.gjy@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=hcQIy+eT; spf=pass (google.com: domain of 3orpiwwckcdyesjugjjyggydw.ugedafmp-eecnsuc.gjy@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3oRPiWwcKCDYeSjUgjjYggYdW.Ugedafmp-eecnSUc.gjY@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=5h2BoXSQyMfBIHAQhVxblvT8Jki7y6GJuMaZUq37b5k=; b=hcQIy+eTMZDM/PTYQZKGO0O/oCS0//ihvbX20UCxamfbsj8tv2rthgEBhU9UVaHG9v eRCg/JIRCeplEso6LlKfFTLY/6sd+/Brr5eJqkHQNsNAUU7KoFX1HvSpsZiYUeNiVBQ6 uNM5bme5yl6lFfY7SfOLgeNhzDD+yxK3dfnyswyNWuOBapK2VKCX2k9yeoLqiQN6m42s 0y6u1kb1eGdCndy+Syz3mJ18TggArzuToTzARoQ+V2evDuQjyB23S7AEdbdX4OwXhv0F GqoPihFC+a/BRubcV8ijuCm46aVRy6ALczLP1HA/T1U4vPvrT8ouY573r50iynFtfnDc JhAg== X-Google-Smtp-Source: AJdET5drxgBNN3c54i8/qQaDtW46fWo2vQg68URVdXFurUom7WGfZooQ/CmaSJG/4LFjsZdtZV0c1GgWCV5C X-Received: by 2002:a25:80ce:: with SMTP id c14-v6mr8399477ybm.53.1541542817469; Tue, 06 Nov 2018 14:20:17 -0800 (PST) Date: Tue, 6 Nov 2018 14:20:07 -0800 Message-Id: <20181106222009.90833-1-marcorr@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [kvm PATCH v7 0/2] 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, I've: (1) Added a comment to explain the FPU checks in kvm_arch_init() (2) Changed the kmem_cache_create_usercopy() to kmem_cache_create() Marc Orr (2): kvm: x86: Use task structs fpu field for user kvm: x86: Dynamically allocate guest_fpu arch/x86/include/asm/kvm_host.h | 10 +++--- arch/x86/kvm/svm.c | 10 ++++++ arch/x86/kvm/vmx.c | 10 ++++++ arch/x86/kvm/x86.c | 55 ++++++++++++++++++++++++--------- 4 files changed, 65 insertions(+), 20 deletions(-)