diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-02-21 18:02:42 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-02-21 18:02:42 +0000 |
commit | c9e9d610ca72069f33eb2e38acdf4de9c0ff54a1 (patch) | |
tree | 7305d8a648352ac7aabe5f3fd58cc12b4c64cf55 /xen/arch/x86/x86_emulate.c | |
parent | 7147da6f1198137a6605c330dac52301f4f81b08 (diff) | |
download | xen-c9e9d610ca72069f33eb2e38acdf4de9c0ff54a1.tar.gz xen-c9e9d610ca72069f33eb2e38acdf4de9c0ff54a1.tar.bz2 xen-c9e9d610ca72069f33eb2e38acdf4de9c0ff54a1.zip |
hvm: Remove lots of custom trap-and-emulate code and defer to
handle_mmio()->hvm_emulate_one()->x86_emulate().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/x86_emulate.c')
-rw-r--r-- | xen/arch/x86/x86_emulate.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c index fb3280d505..62a8495d0e 100644 --- a/xen/arch/x86/x86_emulate.c +++ b/xen/arch/x86/x86_emulate.c @@ -3036,6 +3036,17 @@ x86_emulate( struct segment_register reg; unsigned long base, limit, cr0, cr0w; + if ( modrm == 0xdf ) /* invlpga */ + { + generate_exception_if(in_realmode(ctxt, ops), EXC_UD); + generate_exception_if(!mode_ring0(), EXC_GP); + fail_if(ops->invlpg == NULL); + if ( (rc = ops->invlpg(x86_seg_none, truncate_ea(_regs.eax), + ctxt)) ) + goto done; + break; + } + switch ( modrm_reg & 7 ) { case 0: /* sgdt */ @@ -3096,6 +3107,13 @@ x86_emulate( if ( (rc = ops->write_cr(0, cr0, ctxt)) ) goto done; break; + case 7: /* invlpg */ + generate_exception_if(!mode_ring0(), EXC_GP); + generate_exception_if(ea.type != OP_MEM, EXC_UD); + fail_if(ops->invlpg == NULL); + if ( (rc = ops->invlpg(ea.mem.seg, ea.mem.off, ctxt)) ) + goto done; + break; default: goto cannot_emulate; } |