From patchwork Tue Nov 6 22:53:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Orr X-Patchwork-Id: 10671593 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 E261F14BD for ; Tue, 6 Nov 2018 22:54:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4ABA2A6B9 for ; Tue, 6 Nov 2018 22:54:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C90CA2AA6E; Tue, 6 Nov 2018 22:54:02 +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 6A1712A6B9 for ; Tue, 6 Nov 2018 22:54:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48BB96B04A1; Tue, 6 Nov 2018 17:54:01 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 43A796B04A3; Tue, 6 Nov 2018 17:54:01 -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 34F7D6B04A4; Tue, 6 Nov 2018 17:54:01 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by kanga.kvack.org (Postfix) with ESMTP id 0AE4D6B04A1 for ; Tue, 6 Nov 2018 17:54:01 -0500 (EST) Received: by mail-qk1-f199.google.com with SMTP id a199so19898760qkb.23 for ; Tue, 06 Nov 2018 14:54:01 -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=xs1Tf0iLW4KkdUUUR7n2VdkF9QC1Nb9T1E+TxuugeqM=; b=BN/OZ6/ibVQ+aFLgd4TVs2W0eYC3WmvV1VMq+uI8TUJAx045weEpomf4nVDYZraknz 7g7y6BNi3OA7oNepmqjCAkz91bFX4c4uoWvXAafX8koAx5CMBnMB1ciKAvzlIBvg19OS Mj2Qq0uqNK41/W4IXcF4uXFH+MqKFMOkS4tH7Rdo/hnX5IsjEjZkM3AdJmaEHdzy8F0U 1LaWVfcNmURFj4iz8AHpevEZHUq7ybc1L3zQjRJfmOREptVCjUxbRjUZAfxoFKMe5uwe RVUqq3HJbdQycRf274gowl1L6pitPp5TakZ9PrmmqP4vs8q87G/VvfvIl6NzF27acUZM Ovcw== X-Gm-Message-State: AGRZ1gIlXEUcGp+4pzSKYvMe1ikPluq+6CZlh5AR8KgjFg+Ss7QBizTP D1n/FeON+gdUZxHoJSHmL97NXRvKKX7KuTnkGj/jWHn6Jss+4MghltP4pM02n7ravrIbFELjGWS 6XHm17KG1xx0aNoc65fqDYoE7xtlfd7+8vFSYnTrX/rR4pUGHlUAONtAY945cj6UOQBSPYn/6y8 prDxsLmLaLJAAViOEoR9yVTI4B3xV/iJ9xDQPzpCUADPYmsGqByw3FOPHbFIZx13ujZ//yHfFfT 8x9urR+UpOeQNJYZLG0QcVzNlL6EfZwcjl7+WNEUt8nZ3e7l60E1xZgl1LKnUa6g0sWeVhNNBWI +qNNBc7QHoPsc0/PDL4AHpVggw7Q8rXjxfn5or45qGKsVPvvC3llelVxjHlxz9RzqmBbMB/3NpA 8 X-Received: by 2002:a37:a689:: with SMTP id p131mr26602097qke.308.1541544840746; Tue, 06 Nov 2018 14:54:00 -0800 (PST) X-Received: by 2002:a37:a689:: with SMTP id p131mr26602077qke.308.1541544840251; Tue, 06 Nov 2018 14:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541544840; cv=none; d=google.com; s=arc-20160816; b=eS57fCsqOY1p3rVZX63Kzyi1rIcu5YnvAuPxCHT6gVGimTQWGH2KFFviy1b/QRKo3O Cx9x9ivgWjgqRGO+7Nj16QeyXQxiU1FrlvoXHq1AOWF6aQelAXbwcA+VV16aP4NgqpI2 bk85pIRS8vDL6TVI94bQ2Kr1o1yCvvPdwupHEO3j7AUqdUmGKoZSkbaizDf+rJEE/QJ+ kZKvd2dYCH/Lf/akXxq9FOHAvRxZx+6K5ZG4TAGt+WaYHDLsgRwHcdIhDFxYamQOIkt4 lQHq21e/DiTJS3Qh95nteoZvKt98tyBQiyigMHA1QrFSEn/s4eCbV5RNIAPopTHYW6Rz 52XQ== 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=xs1Tf0iLW4KkdUUUR7n2VdkF9QC1Nb9T1E+TxuugeqM=; b=PkEOPdcAjAbZWTDvBfmEzK617cVj1p5brihcv5nnxf9hxsW8GWTkCpArTEEEc0Wc8m Q+cc4rai1qW585KSbKWlC1Xp+lb60e2FsPiL3jvu57ttisF8+7LBdXAYr8SImPykAg3t 2CIcFyjFyt1sEAys0z9uRoxgWjq4ng0jdpIAEMV5Ja6geNGYGWUGgrsHF+/m/jnKSHZt ceA/kphw8bdcPy7dsga5DiDNGLZ20TudUNDDrmT2C7sD8D0cCWgbqkqS0iPpiPIGW/8i XjedIsOMdzOixmeuGFZ2FULyb1IaiZmsFXTAnI8BI6yVtxZio5TzhXAQZn08izbwqUB9 6rWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=RBYLH4Rb; spf=pass (google.com: domain of 3hxviwwckccwuizkwzzowwotm.kwutqvcf-uusdiks.wzo@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3hxviWwcKCCwUIZKWZZOWWOTM.KWUTQVcf-UUSdIKS.WZO@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 i64-v6sor15143031qkd.101.2018.11.06.14.54.00 for (Google Transport Security); Tue, 06 Nov 2018 14:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of 3hxviwwckccwuizkwzzowwotm.kwutqvcf-uusdiks.wzo@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=RBYLH4Rb; spf=pass (google.com: domain of 3hxviwwckccwuizkwzzowwotm.kwutqvcf-uusdiks.wzo@flex--marcorr.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3hxviWwcKCCwUIZKWZZOWWOTM.KWUTQVcf-UUSdIKS.WZO@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=xs1Tf0iLW4KkdUUUR7n2VdkF9QC1Nb9T1E+TxuugeqM=; b=RBYLH4RbZpd++xYQqD+jxu4rZsWtBKYADRl2rt88LYVwtRqiM2owM63MeJrRE7aF3W 3IfrM7+zKmOwsOtBCzPN/ixFldlhHU6cJNvOFIsI7UxOMbbWSKQmBVu4XpialKNenJR8 AmS5VIOwe93b03aOBUy2mHzibRtm1H5IFzMcdzoyGLSOOivG/hDGs52C2+2/J/IKu/LK SdO/JWRfy55i7HTtt5hcrAVcrRObFh4Hb4v7xmgBe4doyAzaNgl7EpERviGcEnK97Wiu C/s4a30G3gLDZ9JZ7vB3hBcbaBX+Ze4qFsshhf0MZ02zOdyaJ52Kz+tCBYqe7wWVjK6a Nt3g== X-Google-Smtp-Source: AJdET5d/ic2vzptptWiKyZYZq3JTDh00Iuhx7bTLTT9abKpVTQOrLU9GnvpJwXSGEtDbQwlddfxQk0Yw9C11 X-Received: by 2002:a37:2b8e:: with SMTP id r14mr21411291qkr.22.1541544839936; Tue, 06 Nov 2018 14:53:59 -0800 (PST) Date: Tue, 6 Nov 2018 14:53:54 -0800 Message-Id: <20181106225356.119901-1-marcorr@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [kvm PATCH v8 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: (0) Actually update the patches, as explained below. (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(-)