Re: [kvm PATCH v5 2/4] kvm: x86: Dynamically allocate guest_fpu

Marc Orr
2018-10-31T21:24:37Z

> It can get set to sizeof(struct fregs_state) for systems where XSAVE is
> not in use. I was neglecting to mention those when I said the "~500
> byte" number.
>
> My point was that it can vary wildly and that any static allocation
> scheme will waste lots of memory when we have small hardware-supported
> buffers.

Got it. Then I think we need to set the size for the kmem cache to
max(fpu_kernel_xstate_size, sizeof(fxregs_state)), unless I'm missing
something. I'll send out a version of the patch that does this in a
bit. Thanks!