x86, hvm: Improve standard VGA performance
authorKeir Fraser <keir@xensource.com>
Fri, 26 Oct 2007 09:32:20 +0000 (10:32 +0100)
committerKeir Fraser <keir@xensource.com>
Fri, 26 Oct 2007 09:32:20 +0000 (10:32 +0100)
commit3ed09ac11ba5f60c2189242884a6a792ac450058
tree00e8f6d6ae4a891835dcb09dc5bbcc259bd0222d
parentaf287919fd8e4c447e87a76fe06595debfef95e8
x86, hvm: Improve standard VGA performance

This patch improves the performance of Standard VGA,
the mode used during Windows boot and by the Linux
splash screen.

It does so by buffering all the stdvga programmed output ops
and memory mapped ops (both reads and writes) that are sent to QEMU.

We maintain locally essential VGA state so we can respond
immediately to input and read ops without waiting for
QEMU.  We snoop output and write ops to keep our state
up-to-date.

PIO input ops are satisfied from cached state without
bothering QEMU.

PIO output and mmio ops are passed through to QEMU, including
mmio read ops.  This is necessary because mmio reads
can have side effects.

I have changed the format of the buffered_iopage.
It used to contain 80 elements of type ioreq_t (48 bytes each).
Now it contains 672 elements of type buf_ioreq_t (6 bytes each).
Being able to pipeline 8 times as many ops improves
VGA performance by a factor of 8.

I changed hvm_buffered_io_intercept to use the same
registration and callback mechanism as hvm_portio_intercept
rather than the hacky hardcoding it used before.

In platform.c, I fixed send_timeoffset_req() to sets its
ioreq size to 8 (rather than 4), and its count to 1 (which
was missing).

Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
tools/ioemu/target-i386-dm/helper2.c
tools/ioemu/xenstore.c
xen/arch/x86/hvm/Makefile
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/intercept.c
xen/arch/x86/hvm/platform.c
xen/arch/x86/hvm/stdvga.c [new file with mode: 0644]
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/hvm/io.h
xen/include/public/hvm/ioreq.h