From: Marc Orr <marcorr@google.com>
To: dave.hansen@intel.com
Cc: willy@infradead.org, kvm@vger.kernel.org,
Jim Mattson <jmattson@google.com>,
David Rientjes <rientjes@google.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
linux-mm@kvack.org, akpm@linux-foundation.org,
pbonzini@redhat.com, rkrcmar@redhat.com,
sean.j.christopherson@intel.com, dave.hansen@linux.intel.com
Subject: Re: [kvm PATCH v4 0/2] use vmalloc to allocate vmx vcpus
Date: Wed, 31 Oct 2018 13:06:27 +0000 [thread overview]
Message-ID: <CAA03e5H+2Se7RDC3rdfnOgTkZdP9+R0DdR_=tmyp1MhtvKetQA@mail.gmail.com> (raw)
In-Reply-To: <cd9934d3-2699-d705-9e66-88485fc74ead@intel.com>
On Fri, Oct 26, 2018 at 7:49 AM Dave Hansen <dave.hansen@intel.com> wrote:
>
> On 10/26/18 7:45 AM, Matthew Wilcox wrote:
> > struct fpu user_fpu; /* 2176 4160 */
> > struct fpu guest_fpu; /* 6336 4160 */
>
> Those are *not* supposed to be embedded in any other structures. My bad
> for not documenting this better.
>
> It also seems really goofy that we need an xsave buffer in the
> task_struct for user fpu state, then another in the vcpu. Isn't one for
> user state enough?
>
> In any case, I'd suggest getting rid of 'user_fpu', then either moving
> 'guest_fpu' to the bottom of the structure, or just make it a 'struct
> fpu *' and dynamically allocating it separately.
I've written a patch to get rid of user_fpu, as suggested here and
will be sending that out shortly.
>
> To do this, I'd take fpu__init_task_struct_size(), and break it apart a
> bit to tell you the size of the 'struct fpu' separately from the size of
> the 'task struct'.
I've written a 2nd patch to make guest_cpu a 'struct fpu *' and
dynamically allocate it separately. The reason I went with this
suggestion, rather than moving 'struct fpu' to the bottom of
kvm_vcpu_arch is because I believe that solution would still expand
the kvm_vcpu_arch by the size of the fpu, according to which
fpregs_state was in use.
next prev parent reply other threads:[~2018-10-31 13:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-26 7:58 Marc Orr
2018-10-26 7:58 ` [kvm PATCH v4 1/2] kvm: vmx: refactor vmx_msrs struct for vmalloc Marc Orr
2018-10-26 11:02 ` Sean Christopherson
2018-10-26 7:59 ` [kvm PATCH v4 2/2] kvm: vmx: use vmalloc() to allocate vcpus Marc Orr
2018-10-26 12:29 ` [kvm PATCH v4 0/2] use vmalloc to allocate vmx vcpus Matthew Wilcox
2018-10-26 14:45 ` Matthew Wilcox
2018-10-26 14:49 ` Dave Hansen
2018-10-31 13:06 ` Marc Orr [this message]
2018-10-29 1:58 ` Wanpeng Li
2018-10-29 16:25 ` Jim Mattson
2018-10-29 16:48 ` Matthew Wilcox
2018-10-29 18:12 ` Jim Mattson
2018-10-29 19:16 ` Marc Orr
2018-10-29 19:22 ` Marc Orr
2018-10-31 13:17 ` Marc Orr
2018-10-31 13:27 ` Matthew Wilcox
2018-10-31 13:48 ` Marc Orr
2018-10-31 14:21 ` Matthew Wilcox
2018-10-31 21:19 ` Marc Orr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA03e5H+2Se7RDC3rdfnOgTkZdP9+R0DdR_=tmyp1MhtvKetQA@mail.gmail.com' \
--to=marcorr@google.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jmattson@google.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pbonzini@redhat.com \
--cc=rientjes@google.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox