From: "Jan Beulich" Subject: Re: [PATCH v2 1/3] x86: also allow REP STOS emulation acceleration Date: Fri, 09 Jan 2015 11:10:37 +0000 Message-ID: <54AFC53D0200007800053176@mail.emea.novell.com> 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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9XSg-0002mg-TC for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 11:10:39 +0000 In-Reply-To: <54AFB3FA.1050000@citrix.com> Content-Disposition: inline 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 , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 09.01.15 at 11:56, 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. Perhaps the textual description was a little ambiguous, but the code is not: It's not the variable "buf" that gets written, but buf[] in its entirety. Jan