Re: [PATCH 0/7] Streamline arithmetic instruction emulation

2013-01-03 Thread Marcelo Tosatti
On Thu, Jan 03, 2013 at 09:39:14PM +0200, Avi Kivity wrote:
   Avi Kivity (7):
 KVM: x86 emulator: framework for streamlining arithmetic opcodes
 KVM: x86 emulator: Support for declaring single operand fastops
 KVM: x86 emulator: introduce NoWrite flag
 KVM: x86 emulator: mark CMP, CMPS, SCAS, TEST as NoWrite
 KVM: x86 emulator: convert NOT, NEG to fastop
 KVM: x86 emulator: add macros for defining 2-operand fastop emulation
 KVM: x86 emulator: convert basic ALU ops to fastop
  
arch/x86/kvm/emulate.c | 215
 +++--
1 file changed, 120 insertions(+), 95 deletions(-)
  
  Looks good to me.
 
 Ping?

Please regenerate against 'queue' branch. 

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/7] Streamline arithmetic instruction emulation

2012-12-23 Thread Gleb Natapov
On Sat, Dec 22, 2012 at 02:26:50PM +0200, Avi Kivity wrote:
 The current arithmetic instruction emulation is fairly clumsy: after
 decode, each instruction gets a switch (size), and for every size
 we fetch the operands, prepare flags, emulate the instruction, then store
 back the flags and operands.
 
 This patchset simplifies things by moving everything into common code
 except the instruction itself.  All the pre- and post- processing is
 coded just once.  The per-instrution code looks like:
 
   add %bl, %al
   ret
 
   add %bx, %ax
   ret
 
   add %ebx, %eax
   ret
 
   add %rbx, %rax
   ret
 
 The savings in size, for the ten instructions converted in this patchset,
 are fairly large:
 
text  data bss dec hex filename
   63724 0   0   63724f8ec arch/x86/kvm/emulate.o.before
   61268 0   0   61268ef54 arch/x86/kvm/emulate.o.after
 
 - around 2500 bytes.
 
 Avi Kivity (7):
   KVM: x86 emulator: framework for streamlining arithmetic opcodes
   KVM: x86 emulator: Support for declaring single operand fastops
   KVM: x86 emulator: introduce NoWrite flag
   KVM: x86 emulator: mark CMP, CMPS, SCAS, TEST as NoWrite
   KVM: x86 emulator: convert NOT, NEG to fastop
   KVM: x86 emulator: add macros for defining 2-operand fastop emulation
   KVM: x86 emulator: convert basic ALU ops to fastop
 
  arch/x86/kvm/emulate.c | 215 
 +++--
  1 file changed, 120 insertions(+), 95 deletions(-)
 
Looks good to me.

--
Gleb.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/7] Streamline arithmetic instruction emulation

2012-12-22 Thread Avi Kivity
The current arithmetic instruction emulation is fairly clumsy: after
decode, each instruction gets a switch (size), and for every size
we fetch the operands, prepare flags, emulate the instruction, then store
back the flags and operands.

This patchset simplifies things by moving everything into common code
except the instruction itself.  All the pre- and post- processing is
coded just once.  The per-instrution code looks like:

  add %bl, %al
  ret

  add %bx, %ax
  ret

  add %ebx, %eax
  ret

  add %rbx, %rax
  ret

The savings in size, for the ten instructions converted in this patchset,
are fairly large:

   textdata bss dec hex filename
  63724   0   0   63724f8ec arch/x86/kvm/emulate.o.before
  61268   0   0   61268ef54 arch/x86/kvm/emulate.o.after

- around 2500 bytes.

Avi Kivity (7):
  KVM: x86 emulator: framework for streamlining arithmetic opcodes
  KVM: x86 emulator: Support for declaring single operand fastops
  KVM: x86 emulator: introduce NoWrite flag
  KVM: x86 emulator: mark CMP, CMPS, SCAS, TEST as NoWrite
  KVM: x86 emulator: convert NOT, NEG to fastop
  KVM: x86 emulator: add macros for defining 2-operand fastop emulation
  KVM: x86 emulator: convert basic ALU ops to fastop

 arch/x86/kvm/emulate.c | 215 +++--
 1 file changed, 120 insertions(+), 95 deletions(-)

-- 
1.7.11.7

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html