From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH (for 4.6)] x86/hvm: Unconditionally buffer writes to VRAM Date: Thu, 16 Jul 2015 11:52:12 +0100 Message-ID: <1437043932.32371.169.camel@citrix.com> References: <1437038675-14095-1-git-send-email-paul.durrant@citrix.com> <55A77AAA.8060301@citrix.com> <1437041564.32371.145.camel@citrix.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F4C9E41@AMSPEX01CL02.citrite.net> 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 1ZFgm6-0001bg-Bu for xen-devel@lists.xenproject.org; Thu, 16 Jul 2015 10:52:22 +0000 In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02F4C9E41@AMSPEX01CL02.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Andrew Cooper , "Keir (Xen.org)" , Jan Beulich , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-16 at 11:20 +0100, Paul Durrant wrote: > > -----Original Message----- > > From: Ian Campbell [mailto:ian.campbell@citrix.com] > > Sent: 16 July 2015 11:13 > > To: Andrew Cooper > > Cc: Paul Durrant; xen-devel@lists.xenproject.org; Keir (Xen.org); Jan Beulich > > Subject: Re: [Xen-devel] [PATCH (for 4.6)] x86/hvm: Unconditionally buffer > > writes to VRAM > > > > On Thu, 2015-07-16 at 10:34 +0100, Andrew Cooper wrote: > > > On 16/07/15 10:24, Paul Durrant wrote: > > > > When c/s 3bbaaec09 "unify stdvga mmio intercept with standard mmio > > > > intercept" was added, a small semantic change was made. Prior to > > > > this patch the hypervisor unconditionally sent all guest writes > > > > to the VGA aperture as buffered ioreqs, whereas after the patch it > > > > only does this when the VGA model is in 'stdvga' mode (sequencer > > > > register #7 == 0). > > > > > > > > When installing Windows 7 (64-bit) using the default QEMU VGA model > > > > (== cirrus), Windows leaves 'stdvga' mode early in boot and hence > > > > all further writes to the VGA aperture are done using synchronous > > > > ioreqs which slows down boot by several orders of magnitude (thanks > > > > to the elaborate splash screen that Windows presents). This can be > > > > viewed as a regression and so this patch re-instates previous > > > > buffering behaviour. > > > > > > > > Signed-off-by: Paul Durrant > > > > Tested-by: Wei Liu > > > > Cc: Keir Fraser > > > > Cc: Jan Beulich > > > > Cc: Andrew Cooper > > > > > > This is unfortunate, > > > > OOI why is it unfortunate? IOW why wouldn't we want buffer all accesses > > to the VRAM (leaving aside that perhaps the original authors only > > intended to do it for StdVGA). > > Well, VRAM (mapped through a PCI BAR) can't be buffered in general. > For instance, the Cirrus model in QEMU re-maps its I/O ports into the > first 256 bytes. I think we are ok to always buffer writes to the VGA > aperture though as I can't find any obvious side effects (in QEMU's > common code). Ah, so the aperture can contain things other than the framebuffer, makes sense! > > Paul > > > >