[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/2] 40p: fix PCI interrupt routin

From: Peter Maydell
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/2] 40p: fix PCI interrupt routing
Date: Wed, 19 Sep 2018 08:33:14 -0700

On 19 September 2018 at 07:47, Roman Kapl <address@hidden> wrote:
> It seems that the `dcbz` instruction is not emulated correctly (which may
> lead to some garbage in inittab?). However, if I manualy inline the
> `helper_dcbz_common` code into `helper dcbz`, it starts to work.

This is because helper_dcbz_common() uses GETPC() to get the
return address inside generated code which will be used when
an exception occurs. This only works from a function called
directly from generated code. If you want to abstract out
into a second function, then you need:
 * the second function to take a retaddr argument, which it
   can then pass to cpu_stq_data_ra()
 * the top level helpers called from TCG to pass GETPC() as
   that retaddr parameter

Incidentally, calling your secondary helper function
"helper_dcbz_common" is not ideal -- the "helper_" prefix
is generally used to indicate functions which are directly
called from TCG generated code as helper functions (which
does matter for some purposes, like this one).

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]