[PATCH] KVM: emulator: fix execution close to the segment limit

2014-10-27 Thread Paolo Bonzini
Emulation of code that is 14 bytes to the segment limit or closer (e.g. RIP = 0xFFF2 after reset) is broken because we try to read as many as 15 bytes from the beginning of the instruction, and __linearize fails when the passed (address, size) pair reaches out of the segment. To fix this, let

Re: [PATCH] KVM: emulator: fix execution close to the segment limit

2014-10-27 Thread Borislav Petkov
On Mon, Oct 27, 2014 at 03:31:46PM +0100, Paolo Bonzini wrote: Emulation of code that is 14 bytes to the segment limit or closer (e.g. RIP = 0xFFF2 after reset) is broken because we try to read as many as 15 bytes from the beginning of the instruction, and __linearize fails when the passed