aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_emulate.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-03-18 16:02:36 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-03-18 16:02:36 +0000
commit402f603f49d544ba363605c8527b59cec162e878 (patch)
tree1bd22426a3bc16b88b1d2ef368bb894b13b8d95e /xen/arch/x86/x86_emulate.c
parent102cd68e625846f10848a0e19541bea9e2fc5a87 (diff)
downloadxen-402f603f49d544ba363605c8527b59cec162e878.tar.gz
xen-402f603f49d544ba363605c8527b59cec162e878.tar.bz2
xen-402f603f49d544ba363605c8527b59cec162e878.zip
x86: check ModR/M mod bits for CR/DR access insns
Signed-off-by: Jan Beulich <jbeulich@novell.com> 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c
index 224cefb52c..b3bb4deb52 100644
--- a/xen/arch/x86/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate.c
@@ -3219,8 +3219,8 @@ x86_emulate(
case 0x21: /* mov dr,reg */
case 0x22: /* mov reg,cr */
case 0x23: /* mov reg,dr */
+ generate_exception_if(ea.type != OP_REG, EXC_UD, -1);
generate_exception_if(!mode_ring0(), EXC_GP, 0);
- modrm_rm |= (rex_prefix & 1) << 3;
modrm_reg |= lock_prefix << 3;
if ( b & 2 )
{