Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdFAHgY (ORCPT ); Thu, 1 Jun 2017 03:36:24 -0400 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 Subject: Re: [PATCH v5] KVM: x86: avoid large stack allocations in em_fxrstor To: Nick Desaulniers Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org 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> From: Paolo Bonzini Message-ID: <92c4ae48-2356-8ed1-64bd-2adbdb34cdfa@redhat.com> Date: Thu, 1 Jun 2017 09:36:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170601010505.jl7dlat3zaaw6osf@lostoracle.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 398 Lines: 14 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