[PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-17 Thread Nadav Amit
When using address-size override prefix with string instructions in long-mode, ESI/EDI/ECX are zero extended if they are affected by the instruction (incremented/decremented). Currently, the KVM emulator does not do so. In addition, although it is not well-documented, when address override prefix

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-20 Thread Gleb Natapov
On Fri, Apr 18, 2014 at 07:11:33AM +0300, Nadav Amit wrote: > When using address-size override prefix with string instructions in long-mode, > ESI/EDI/ECX are zero extended if they are affected by the instruction > (incremented/decremented). Currently, the KVM emulator does not do so. > > In addi

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-21 Thread Nadav Amit
Gleb, On 4/20/14, 12:26 PM, Gleb Natapov wrote: On Fri, Apr 18, 2014 at 07:11:33AM +0300, Nadav Amit wrote: When using address-size override prefix with string instructions in long-mode, ESI/EDI/ECX are zero extended if they are affected by the instruction (incremented/decremented). Currently,

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-23 Thread Marcelo Tosatti
On Tue, Apr 22, 2014 at 09:04:45AM +0300, Nadav Amit wrote: > Gleb, > > On 4/20/14, 12:26 PM, Gleb Natapov wrote: > >On Fri, Apr 18, 2014 at 07:11:33AM +0300, Nadav Amit wrote: > >>When using address-size override prefix with string instructions in > >>long-mode, > >>ESI/EDI/ECX are zero extended

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-23 Thread Marcelo Tosatti
On Wed, Apr 23, 2014 at 04:58:32PM -0300, Marcelo Tosatti wrote: > On Tue, Apr 22, 2014 at 09:04:45AM +0300, Nadav Amit wrote: > > Gleb, > > > > On 4/20/14, 12:26 PM, Gleb Natapov wrote: > > >On Fri, Apr 18, 2014 at 07:11:33AM +0300, Nadav Amit wrote: > > >>When using address-size override prefix

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-23 Thread Nadav Amit
On 4/23/14, 11:11 PM, Marcelo Tosatti wrote: On Wed, Apr 23, 2014 at 04:58:32PM -0300, Marcelo Tosatti wrote: On Tue, Apr 22, 2014 at 09:04:45AM +0300, Nadav Amit wrote: Gleb, On 4/20/14, 12:26 PM, Gleb Natapov wrote: On Fri, Apr 18, 2014 at 07:11:33AM +0300, Nadav Amit wrote: When using add

Re: [PATCH 4/5] KVM: x86: RSI/RDI/RCX are zero-extended when affected by string ops

2014-04-23 Thread H. Peter Anvin
On 04/23/2014 01:53 PM, Nadav Amit wrote: >> >> Err, operand size is forced to 64-bits, not address size. >> >> "The following aspects of near branches are controlled by the effective >> operand size: >> • Truncation of the size of the instruction pointer" >> >> Still, "67h call" should not trunc