diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-09-03 15:24:29 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-09-06 18:07:38 +0300 |
commit | b3356bf0dbb34980620f2f7def7d1b9a0d325225 (patch) | |
tree | 508f58ece4a7ff5613181584fd0461e7cbfd5d20 /arch/x86/include | |
parent | f3bd64c68a8f1245e3d037f70c6936cd7bb1196b (diff) | |
download | op-kernel-dev-b3356bf0dbb34980620f2f7def7d1b9a0d325225.zip op-kernel-dev-b3356bf0dbb34980620f2f7def7d1b9a0d325225.tar.gz |
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 e9e5675..15f960c 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; /* Type, address-of, and value of an instruction's operand. */ struct operand { - enum { OP_REG, OP_MEM, OP_IMM, OP_XMM, OP_MM, OP_NONE } type; + enum { OP_REG, OP_MEM, OP_MEM_STR, OP_IMM, OP_XMM, OP_MM, OP_NONE } type; unsigned int bytes; + unsigned int count; union { unsigned long orig_val; u64 orig_val64; @@ -234,6 +235,7 @@ struct operand { char valptr[sizeof(unsigned long) + 2]; sse128_t vec_val; u64 mm_val; + void *data; }; }; |