diff options
author | Avi Kivity <avi@qumranet.com> | 2008-05-05 07:58:26 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-05-18 07:34:14 -0400 |
commit | 107d6d2efa9eb8c48d050936d8019230ac6b24cd (patch) | |
tree | fc1d94a18e3f909e31c900ac698811831ed0abb2 /include/asm-x86/kvm_x86_emulate.h | |
parent | f26a3988917913b3d11b2bd741601a2c64ab9204 (diff) |
KVM: x86 emulator: fix writes to registers with modrm encodings
A register destination encoded with a mod=3 encoding left dst.ptr NULL.
Normally we don't trap writes to registers, but in the case of smsw, we do.
Fix by pointing dst.ptr at the destination register.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/asm-x86/kvm_x86_emulate.h')
-rw-r--r-- | include/asm-x86/kvm_x86_emulate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h index d6337f941c98..b877bbd2d3a7 100644 --- a/include/asm-x86/kvm_x86_emulate.h +++ b/include/asm-x86/kvm_x86_emulate.h | |||
@@ -135,6 +135,7 @@ struct decode_cache { | |||
135 | u8 modrm_rm; | 135 | u8 modrm_rm; |
136 | u8 use_modrm_ea; | 136 | u8 use_modrm_ea; |
137 | unsigned long modrm_ea; | 137 | unsigned long modrm_ea; |
138 | void *modrm_ptr; | ||
138 | unsigned long modrm_val; | 139 | unsigned long modrm_val; |
139 | struct fetch_cache fetch; | 140 | struct fetch_cache fetch; |
140 | }; | 141 | }; |