[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: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/2] 40p: fix PCI interrupt routing
Date: Wed, 19 Sep 2018 18:22:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 19/09/2018 16:33, Peter Maydell wrote:

> 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).

Brilliant! I had no idea about the restrictions on GETPC(). Thanks so much for
helping here, Peter.



reply via email to

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