From patchwork Wed Oct 31 23:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Orr X-Patchwork-Id: 10663353 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 148A217DF for ; Wed, 31 Oct 2018 23:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F18602B943 for ; Wed, 31 Oct 2018 23:49:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E583A2B9C2; Wed, 31 Oct 2018 23:49:37 +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=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A04CA2B943 for ; Wed, 31 Oct 2018 23:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728481AbeKAIt7 (ORCPT ); Thu, 1 Nov 2018 04:49:59 -0400 Received: from mail-vk1-f201.google.com ([209.85.221.201]:47655 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725755AbeKAIt6 (ORCPT ); Thu, 1 Nov 2018 04:49:58 -0400 Received: by mail-vk1-f201.google.com with SMTP id m185so7668755vkf.14 for ; Wed, 31 Oct 2018 16:49:34 -0700 (PDT) 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=XnfpiSjCoslNzkt1ldoNWZRtbtSQKFCPHpDUd4JPQeI=; b=AlWBQiaJxFguhnPbbMhQTcDIFXYR29tzgDuyMzREa0+m+S3LsubkBa8dE1r2I+lEbf NqdKmAgg6W8KzranZ2K7zog2c9r0f2po4jAlYyZWPuebYAhd7wsfb5ge7EUDjlUBO0B/ 7vXK1t/ADf/DSm/3oGqF9mDSsToLqcjFplQXzNH+yaVESiBpS/TxNrPdbRpfPd15/BS8 H6Vq99tUmK8xHL+oMJ8PbHOmnm4cPTUMJFuUNa52DpyDs6XsJ7aTha5EoGLYHBOA0dcg WRdK95HhpRM+xt0AK/i1DNTuscpU36NAt3NtB0QTot2pTNi+P7b0QlDiYQr/hB8YcRKw jCYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=XnfpiSjCoslNzkt1ldoNWZRtbtSQKFCPHpDUd4JPQeI=; b=UtizhBF3v4E2kOoxO4jztULhylkCc9P6aYuymMK6Aav4zKhpaO9nT5COY/1AXmE3Wp x0kU5wKsO6USMe/CaaF9SwHYbTDjgt2fLY38IjeRMzIz4vvH5ts0crKgwRI+y/aky1L+ ads3DaOVsJ0vLgRMd58huykQ8kg/P4yhSwggYnlCpqe7Oxg84dfHgkM3boJ7FJ/6vXRW IdCIQHzfTkcCA7TnDpEFa2Wr9Zk5O30s6AdTzrgIZ4mEiikUel/2K4/bGzU0wJeGp57v VnPQGpOgfya/6SouXfvRgsTzi+lg3XE4ArzKGh/tWvevTCzYmpFMVshGb08zj8dROz/X 73jQ== X-Gm-Message-State: AGRZ1gLnhq/G2G+cGbUocGmKtC6T1wqNNF4gpKMsg+JNJsLj7OTNxSZg 2OtMK73weztJf7P/jWWMS5T/L6kKN4oUf5hTe2nv7SKB1QUHsXYu3E0MPLUUeWfa1rTG16im5b0 xi9lPFcjkaihWCys8UJ3gjyaGwVZZ1difPTiRLkAFvgg3at9EsSIzoWnciqek X-Google-Smtp-Source: AJdET5fQ6HQd1XsMVAIJ5Bubq7tH5zWQDD5dEGAi/77Dto/FkzqWBKbvyKE2r1lJ1gtyE+DZ8Hj+hCN1TmB2 X-Received: by 2002:a67:ea05:: with SMTP id g5mr4611597vso.29.1541029773824; Wed, 31 Oct 2018 16:49:33 -0700 (PDT) Date: Wed, 31 Oct 2018 16:49:26 -0700 Message-Id: <20181031234928.144206-1-marcorr@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog Subject: [kvm PATCH v6 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 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Compared to the last version, I've: (1) dropped the vmalloc patches (2) updated the kmem cache for the guest_fpu field in the kvm_vcpu_arch struct to be sized according to fpu_kernel_xstate_size (3) Added minimum FPU checks in KVM's x86 init logic to avoid memory corruption issues. 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(-)