[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170602021014.4sdvqe6mgqa4cq46@lostoracle.net>
Date: Thu, 1 Jun 2017 19:10:14 -0700
From: Nick Desaulniers <nick.desaulniers@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Radim Krčmář <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] KVM: x86: avoid large stack allocations in em_fxrstor
On Thu, Jun 01, 2017 at 09:36:18AM +0200, Paolo Bonzini wrote:
> 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. :)
I meant the use of an expression full of literals rather than either a
single literal or an expression formed from well named variables seemed
kind of like a code smell, but w/e. Patch inbound.
Powered by blists - more mailing lists