From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v5] KVM: x86: avoid large stack allocations in em_fxrstor Date: Thu, 1 Jun 2017 09:36:18 +0200 Message-ID: <92c4ae48-2356-8ed1-64bd-2adbdb34cdfa@redhat.com> References: <20170529224858.9942-1-nick.desaulniers@gmail.com> <20170531030838.23182-1-nick.desaulniers@gmail.com> <1815926933.3699401.1496228489339.JavaMail.zimbra@redhat.com> <20170601010505.jl7dlat3zaaw6osf@lostoracle.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Nick Desaulniers Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:36090 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbdFAHgW (ORCPT ); Thu, 1 Jun 2017 03:36:22 -0400 In-Reply-To: <20170601010505.jl7dlat3zaaw6osf@lostoracle.net> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 01/06/2017 03:05, Nick Desaulniers wrote: > On Wed, May 31, 2017 at 07:01:29AM -0400, Paolo Bonzini wrote: >>> + size = offsetof(struct fxregs_state, xmm_space[16]); >> This still has the same issue (it should be multiplied by 4). > > I'm still misunderstanding the math here. > > Why multiplied by four, in this case? 8 * 16 / 4 is used in other cases. *16/4 is the same as *4. :) Paolo