Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2015-09-19 Thread Peter Maydell
On 21 October 2014 at 13:14, Pavel Dovgalyuk wrote: > Sometimes page faults happen during the translation of the target > instructions. > To avoid the faults in the middle of the TB we have to stop translation at > the end of the page. Current implementation of ARM translation assumes that > inst

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-24 Thread Leon Alrae
On 23/10/2014 17:15, Richard Henderson wrote: > [3] Hello, MIPS. Leon, the test for mips is (now) incorrect: > > if ((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0) > break; > > may never succeed for mips16 and micromips. Indeed, this test doesn't look right (although I'm not sure w

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 10/21/2014 05:14 AM, Pavel Dovgalyuk wrote: > > Sometimes page faults happen during the translation of the target > > instructions. > > To avoid the faults in the middle of the TB we have to stop translatio

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Richard Henderson
On 10/23/2014 09:25 AM, Peter Maydell wrote: > On 23 October 2014 17:15, Richard Henderson wrote: >> [1] Why 32 when the maximum insn size is more like 15 bytes, I don't know. >> But >> it likely doesn't matter since I'd expect such large TB's to fill up the >> opcode >> buffer first. There wo

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Peter Maydell
On 23 October 2014 17:15, Richard Henderson wrote: > [1] Why 32 when the maximum insn size is more like 15 bytes, I don't know. > But > it likely doesn't matter since I'd expect such large TB's to fill up the > opcode > buffer first. There would have to be a lot of nops on that page. Do we ac

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Richard Henderson
On 10/21/2014 05:14 AM, Pavel Dovgalyuk wrote: > Sometimes page faults happen during the translation of the target > instructions. > To avoid the faults in the middle of the TB we have to stop translation at > the end of the page. Current implementation of ARM translation assumes that > instructio

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Laurent Desnogues
Hello, On Tue, Oct 21, 2014 at 2:14 PM, Pavel Dovgalyuk wrote: > Sometimes page faults happen during the translation of the target > instructions. > To avoid the faults in the middle of the TB we have to stop translation at > the end of the page. Current implementation of ARM translation assumes

Re: [Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-23 Thread Peter Maydell
On 21 October 2014 13:14, Pavel Dovgalyuk wrote: > Sometimes page faults happen during the translation of the target > instructions. > To avoid the faults in the middle of the TB we have to stop translation at > the end of the page. Current implementation of ARM translation assumes that > instruc

[Qemu-devel] [PATCH] arm: fix TB alignment check

2014-10-21 Thread Pavel Dovgalyuk
Sometimes page faults happen during the translation of the target instructions. To avoid the faults in the middle of the TB we have to stop translation at the end of the page. Current implementation of ARM translation assumes that instructions are aligned to their own size (4 or 2 bytes). But in th