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: 10662669 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 4720214DE 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 36A25284BD for ; Wed, 31 Oct 2018 13:26:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AECE28AF2; 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=-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 D456D284BD for ; Wed, 31 Oct 2018 13:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728902AbeJaWYm (ORCPT ); Wed, 31 Oct 2018 18:24:42 -0400 Received: from mail-vs1-f74.google.com ([209.85.217.74]:41773 "EHLO mail-vs1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728858AbeJaWYm (ORCPT ); Wed, 31 Oct 2018 18:24:42 -0400 Received: by mail-vs1-f74.google.com with SMTP id 189so4256903vss.8 for ; Wed, 31 Oct 2018 06:26:40 -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=NOC6Fg+ZgD+kPau5Sv4cDlwINByIqGeelUpqzXaRFvo=; b=oMD+1XVAAB5q1dJ4D2Mk1h3+khDL0pFAVbUiftsP2dSCug2ylGz/tRDzRUPhXnLjiV dc9OPD8d/WtfYA57k7ia2oKR2j8oKaXpTUiDJjEmJ8PLv7n3//IRA5P7j5DXYcAFdMn7 YUi3YhzN/vKaTn3gmmEz7ITyvuFJ23Zi40Qt7veyo1e3pGZ7fn3+DZujGGuSFDf8gkDY TvLwEaVVge+ib//fWOAIQkYZc20fC7yL0fyJU9JKB13iaxXePy7yQGOkpCrrfd+tBnxY Il4eZJASjYPFmCyupt2QLw5dpllVKDQGHrXsY+LaDTkk1zIPaTKPunuai0r7C2g4Ww13 GCxQ== 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=NOC6Fg+ZgD+kPau5Sv4cDlwINByIqGeelUpqzXaRFvo=; b=ImBVWxarkEWZfJS2g1bDdjoDfezIP7AXbGb95rcXK21IsRneFtSR528k9D/52U+1jK RqbkoRcxqnkEQVPQ1hjHbNLK/zlko4BZ2vh/Mk0pgBjMeqaRPu1/6mzRZN+Fl51W+Y7S TXfs/fSd/oAOpKFmtszFjLBrv7g96/WyOSXv1ZXY6KrfoBSIlZQNJMlOnKfj/+p/UfsR xMgPy7zVhtKoC5Fd3IuT211pW1VeqtI7442bviGq0pfHouspzPg/AFkTDKE5A4HiULkb sa0EvVpQb5XXmuFvQWZC/cO5QthI13aEwpwFa7OXLreoeyijSOCjWr7Z6YWuKoPfAGOu ECdA== X-Gm-Message-State: AGRZ1gIixDIaj2T6uzAWFdHME89O8OBZmLnpMQyUbbYmL7gglsulSpTQ pjwpfg/8h8VjbT+j89UmDfvL9/7tYQ0vmUnr1ce+WDsdp8vKuLHhn94IiGZKuwLXVYmtoHNt3m8 uq6kFXA0/r12YsJG2NMPE0uEFXvxOjNDbiEs26gvpnBiX7sAZgzUqFFlrRei2 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 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 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(-)