]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
x86/hvm: unify stdvga mmio intercept with standard mmio intercept
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 9 Jul 2015 17:04:00 +0000 (19:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Jul 2015 08:03:49 +0000 (10:03 +0200)
commit3bbaaec09b1b942f5624dee176da6e416d31f982
treed693d9440d7cd79b194c7447d042342acbc24518
parent3aaf558d635aaf89918da84703ed3981d3bc276e
x86/hvm: unify stdvga mmio intercept with standard mmio intercept

It's clear from the following check in hvmemul_rep_movs:

    if ( sp2mt == p2m_mmio_direct || dp2mt == p2m_mmio_direct ||
         (sp2mt == p2m_mmio_dm && dp2mt == p2m_mmio_dm) )
        return X86EMUL_UNHANDLEABLE;

that mmio <-> mmio copy is not handled. This means the code in the
stdvga mmio intercept that explicitly handles mmio <-> mmio copy when
hvm_copy_to/from_guest_phys() fails is never going to be executed.

This patch therefore adds a check in hvmemul_do_io_addr() to make sure
mmio <-> mmio is disallowed and then registers standard mmio intercept ops
in stdvga_init().

With this patch all mmio and portio handled within Xen now goes through
process_io_intercept().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/intercept.c
xen/arch/x86/hvm/stdvga.c
xen/include/asm-x86/hvm/io.h