From: Tim Deegan Subject: Re: [PATCH v2 1/3] x86: also allow REP STOS emulation acceleration Date: Fri, 9 Jan 2015 12:18:31 +0100 Message-ID: <20150109111831.GA99970@deinos.phlegethon.org> References: <54AEB49C0200007800052BDE@mail.emea.novell.com> <54AEB5690200007800052BF1@mail.emea.novell.com> <54AEDA80.4080405@citrix.com> <54AFBB3C02000078000530D4@mail.emea.novell.com> <54AFB3FA.1050000@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9XaN-0003H2-U2 for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 11:18:36 +0000 Content-Disposition: inline In-Reply-To: <54AFB3FA.1050000@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org At 10:56 +0000 on 09 Jan (1420797418), Andrew Cooper wrote: > On 09/01/15 10:27, Jan Beulich wrote: > > While the REP MOVS acceleration appears to have helped qemu-traditional > > based guests, qemu-upstream (or really the respective video BIOSes) > > doesn't appear to benefit from that. Instead the acceleration added > > here provides a visible performance improvement during very early HVM > > guest boot. > > > > Signed-off-by: Jan Beulich > > --- > > v2: fix asm() constraints in hvmemul_rep_stos(), as pointed out by > > Andrew. Add output operand telling the compiler that "buf" is being > > written. > > Is writing buf wise? it looks like you will xfree() a wild pointer, and > appears to interfere the "buf != p_data" logic. I think the constraints are correct, though the 'memory' clobber makes the rest of it moot. But this: > > + default: > > + xfree(buf); > > + ASSERT(!buf); looks dodgy... Tim.