diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-03-27 10:52:54 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-03-27 10:52:54 +0000 |
commit | 8c8df59519d782fc31b41e7d1ec276c105e4eb4a (patch) | |
tree | ea91fd4236aa91a1c1f1d74ebf6a76c8ebf567d9 /xen/arch/x86/hvm/io.c | |
parent | 54e034136e4c4655f728edb332fb35195f1a3f13 (diff) | |
download | xen-8c8df59519d782fc31b41e7d1ec276c105e4eb4a.tar.gz xen-8c8df59519d782fc31b41e7d1ec276c105e4eb4a.tar.bz2 xen-8c8df59519d782fc31b41e7d1ec276c105e4eb4a.zip |
x86_emulate: On HVM MMIO emulation, cache the gva->pfn mapping for the
MMIO page. Speeds up Windows installation by about 20 percent.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/io.c')
-rw-r--r-- | xen/arch/x86/hvm/io.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 041d237888..bc5f8acce3 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -183,7 +183,9 @@ int handle_mmio(void) rc = hvm_emulate_one(&ctxt); if ( curr->arch.hvm_vcpu.io_state == HVMIO_awaiting_completion ) - curr->arch.hvm_vcpu.io_state = HVMIO_handle_mmio_awaiting_completion; + curr->arch.hvm_vcpu.io_state = HVMIO_handle_mmio_awaiting_completion; + else + curr->arch.hvm_vcpu.mmio_gva = 0; switch ( rc ) { @@ -210,6 +212,13 @@ int handle_mmio(void) return 1; } +int handle_mmio_with_translation(unsigned long gva, unsigned long gpfn) +{ + current->arch.hvm_vcpu.mmio_gva = gva & PAGE_MASK; + current->arch.hvm_vcpu.mmio_gpfn = gpfn; + return handle_mmio(); +} + void hvm_io_assist(void) { struct vcpu *v = current; |