From: "Jan Beulich" Subject: Re: [PATCH 1/3] x86: also allow REP STOS emulation acceleration Date: Thu, 08 Jan 2015 17:05:42 +0000 Message-ID: <54AEC6F60200007800052D83@mail.emea.novell.com> References: <54AEB49C0200007800052BDE@mail.emea.novell.com> <54AEB5690200007800052BF1@mail.emea.novell.com> <20150108161647.GH5043@deinos.phlegethon.org> <54AEBE7E0200007800052CF9@mail.emea.novell.com> <20150108165657.GE4984@deinos.phlegethon.org> 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 1Y9GWo-0004ZT-DN for xen-devel@lists.xenproject.org; Thu, 08 Jan 2015 17:05:46 +0000 In-Reply-To: <20150108165657.GE4984@deinos.phlegethon.org> 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: Tim Deegan Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 08.01.15 at 17:56, wrote: > At 16:29 +0000 on 08 Jan (1420730974), Jan Beulich wrote: >> >>> On 08.01.15 at 17:16, wrote: >> > At 15:50 +0000 on 08 Jan (1420728649), 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 >> > >> > If I read this right, it's allocating and memset()ing a buffer and >> > then copying that buffer to the guest? >> >> In the non-MMIO case yes. >> >> > Would it be better to map the guest frame and write directly? Edge >> > cases where the STOS crosses a frame boundary could happen the old way. >> >> This matches the REP MOVS handling, which also allocates a >> temporary buffer. I.e. if you wanted this for REP STOS, we should >> first make it so for REP MOVS. > > Well, REP MOVS is trickier as it would have to handle page crossings > in both source and destination. But I don't think would could blindly map for all sorts of p2mt we get back - we'd have to special case RAM, and deal with the other cases the current way anyway (even if for nothing else than getting a correct error indicator). Jan