> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard 
> Henderson
> On 06/29/2015 08:23 AM, Pavel Dovgalyuk wrote:
> > This patch passes TB return address into softmmu functions that are
> > invoked from target helpers. This allows correct PC and icount recovering
> > while handling MMU faults.
> >
> > Signed-off-by: Pavel Dovgalyuk<pavel.dovga...@ispras.ru>
> > ---
> >   target-i386/cc_helper.c   |    2
> >   target-i386/cpu.h         |    5
> >   target-i386/excp_helper.c |   21 +
> >   target-i386/fpu_helper.c  |  146 +++++----
> >   target-i386/helper.c      |    4
> >   target-i386/int_helper.c  |   32 +-
> >   target-i386/mem_helper.c  |   39 +-
> >   target-i386/misc_helper.c |   12 -
> >   target-i386/ops_sse.h     |    2
> >   target-i386/seg_helper.c  |  712 
> > +++++++++++++++++++++++----------------------
> >   target-i386/svm_helper.c  |    4
> >   target-i386/translate.c   |   25 --
> >   12 files changed, 503 insertions(+), 501 deletions(-)
> 
> This patch is too big.  It really needs to be split into several patches.
> 
> (1) Introduce raise_exception_ra that accepts the GETPC argument, so that
>      (a) you can stage the changes in and
>      (b) most of the seg_helper changes from do_interrupt et al
>          aren't needed.
> 
> (2) Stage in fixes for each of the (groups of) helpers callable from
>      translate.c.  E.g. fld, fst in one group, division in another.

Ok, I'll split this patch.

> And while this patch set fixes icount, do you have any evidence that we ever
> got incorrect PC values handling mmu faults?

Indeed. I described it here: 
http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg02960.html

One of the applications used maskmov_xmm, which caused MMU fault.
Then execution of TB restarted instead of continuing from maskmov.

Pavel Dovgalyuk


Reply via email to