From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH (for 4.6)] x86/hvm: Unconditionally buffer writes to VRAM
Date: Thu, 16 Jul 2015 10:34:34 +0100 [thread overview]
Message-ID: <55A77AAA.8060301@citrix.com> (raw)
In-Reply-To: <1437038675-14095-1-git-send-email-paul.durrant@citrix.com>
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 <paul.durrant@citrix.com>
> Tested-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
This is unfortunate, but should be returned to its previous behaviour.
Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
> ---
> xen/arch/x86/hvm/stdvga.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c
> index 6d22b22..f50bff7 100644
> --- a/xen/arch/x86/hvm/stdvga.c
> +++ b/xen/arch/x86/hvm/stdvga.c
> @@ -441,7 +441,7 @@ static int stdvga_mem_write(const struct hvm_io_handler *handler,
> };
> struct hvm_ioreq_server *srv;
>
> - if ( !s->cache )
> + if ( !s->cache || !s->stdvga )
> goto done;
>
> /* Intercept mmio write */
> @@ -503,9 +503,6 @@ static bool_t stdvga_mem_accept(const struct hvm_io_handler *handler,
>
> spin_lock(&s->lock);
>
> - if ( !s->stdvga )
> - goto reject;
> -
> if ( p->dir == IOREQ_WRITE && p->count > 1 )
> {
> /*
> @@ -526,7 +523,7 @@ static bool_t stdvga_mem_accept(const struct hvm_io_handler *handler,
>
> goto reject;
> }
> - else if ( p->dir == IOREQ_READ && !s->cache )
> + else if ( p->dir == IOREQ_READ && (!s->cache || !s->stdvga) )
> goto reject;
>
> /* s->lock intentionally held */
next prev parent reply other threads:[~2015-07-16 9:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 9:24 [PATCH (for 4.6)] x86/hvm: Unconditionally buffer writes to VRAM Paul Durrant
2015-07-16 9:34 ` Andrew Cooper [this message]
2015-07-16 10:12 ` Ian Campbell
2015-07-16 10:20 ` Paul Durrant
2015-07-16 10:52 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55A77AAA.8060301@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.