On 2012년 10월 10일 03:36, Richard Henderson wrote:
On 10/09/2012 05:37 AM, Yeongkyoon Lee wrote:
Add declarations and templates of extended MMU helpers.
An extended helper takes an additional argument of the host address accessing
a guest memory which differs from the address of the call site to the helper
because helper call sites locate at the end of a generated code block.
...
+#ifndef CONFIG_QEMU_LDST_OPTIMIZATION

My feedback from the last round of review is that a version of the
helper functions that take the return address should *always* be available.

There are existing issues in the target-*/foo_helper.c files where
if a helper touches memory that we do no necessarily handle any
fault properly.  This is less true of system mode than user mode,
but it's still a problem.

The helper.c files ought to be changed to use these new "ra-enabled"
routines and pass GETPC().  That way a fault from a helper gets
treated *exactly* like it would if it were called from TCG generated code.

Thus, all this conditionalization should vanish.

Do you mean that there are call sites in target-*/foo_helper.c which call the helpers of softmmu_def.h? As far as I know, there is no access to those helpers other than from the functions in softmmu_header.h in which extra argument is handled.

Anyway, I'll try an approach to avoid helper fragmentation, which takes slight performance degradation of just one instruction for each fast path.



r~




Reply via email to