diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-09-03 08:24:29 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-09-06 11:07:38 -0400 |
commit | b3356bf0dbb34980620f2f7def7d1b9a0d325225 (patch) | |
tree | 508f58ece4a7ff5613181584fd0461e7cbfd5d20 /arch/x86/include | |
parent | f3bd64c68a8f1245e3d037f70c6936cd7bb1196b (diff) |
KVM: emulator: optimize "rep ins" handling
Optimize "rep ins" by allowing emulator to write back more than one
datum at a time. Introduce new operand type OP_MEM_STR which tells
writeback() that dst contains pointer to an array that should be written
back as opposite to just one data element.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index e9e5675c0dfb..15f960c06ff7 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -213,8 +213,9 @@ typedef u32 __attribute__((vector_size(16))) sse128_t; | |||
213 | 213 | ||
214 | /* Type, address-of, and value of an instruction's operand. */ | 214 | /* Type, address-of, and value of an instruction's operand. */ |
215 | struct operand { | 215 | struct operand { |
216 | enum { OP_REG, OP_MEM, OP_IMM, OP_XMM, OP_MM, OP_NONE } type; | 216 | enum { OP_REG, OP_MEM, OP_MEM_STR, OP_IMM, OP_XMM, OP_MM, OP_NONE } type; |
217 | unsigned int bytes; | 217 | unsigned int bytes; |
218 | unsigned int count; | ||
218 | union { | 219 | union { |
219 | unsigned long orig_val; | 220 | unsigned long orig_val; |
220 | u64 orig_val64; | 221 | u64 orig_val64; |
@@ -234,6 +235,7 @@ struct operand { | |||
234 | char valptr[sizeof(unsigned long) + 2]; | 235 | char valptr[sizeof(unsigned long) + 2]; |
235 | sse128_t vec_val; | 236 | sse128_t vec_val; |
236 | u64 mm_val; | 237 | u64 mm_val; |
238 | void *data; | ||
237 | }; | 239 | }; |
238 | }; | 240 | }; |
239 | 241 | ||