[PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()

Alexander Graf posted 2 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221223090107.98888-1-agraf@csgraf.de
Maintainers: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt.c         | 200 ++++++++++++++++++++++--------------------
include/hw/arm/virt.h |  15 ++--
2 files changed, 115 insertions(+), 100 deletions(-)
[PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Alexander Graf 1 year, 4 months ago
The finalize_gic_version() function tries to determine which GIC version
the current accelerator / host combination supports. During the initial
HVF porting efforts, I didn't realize that I also had to touch this
function. Then Zenghui brought up this function as reply to my HVF GICv3
enablement patch - and boy it is a mess.

This patch set cleans up all of the GIC finalization so that we can
easily plug HVF in and also hopefully will have a better time extending
it in the future. As second step, it explicitly adds HVF support and
fails loudly for any unsupported accelerators.

Alex

v1 -> v2:

  - Leave VIRT_GIC_VERSION defines intact, we need them for MADT generation
  - Include TCG header for tcg_enabled()

v2 -> v3:

  - Fix comment
  - Flip kvm-enabled logic for host around

Alexander Graf (2):
  hw/arm/virt: Consolidate GIC finalize logic
  hw/arm/virt: Make accels in GIC finalize logic explicit

 hw/arm/virt.c         | 200 ++++++++++++++++++++++--------------------
 include/hw/arm/virt.h |  15 ++--
 2 files changed, 115 insertions(+), 100 deletions(-)

-- 
2.37.1 (Apple Git-137.1)
Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Peter Maydell 1 year, 2 months ago
On Fri, 23 Dec 2022 at 09:01, Alexander Graf <agraf@csgraf.de> wrote:
>
> The finalize_gic_version() function tries to determine which GIC version
> the current accelerator / host combination supports. During the initial
> HVF porting efforts, I didn't realize that I also had to touch this
> function. Then Zenghui brought up this function as reply to my HVF GICv3
> enablement patch - and boy it is a mess.
>
> This patch set cleans up all of the GIC finalization so that we can
> easily plug HVF in and also hopefully will have a better time extending
> it in the future. As second step, it explicitly adds HVF support and
> fails loudly for any unsupported accelerators.
>
> Alex



Applied to target-arm.next, thanks.

-- PMM
Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
Hi Peter,

On 2/2/23 18:57, Peter Maydell wrote:
> On Fri, 23 Dec 2022 at 09:01, Alexander Graf <agraf@csgraf.de> wrote:
>>
>> The finalize_gic_version() function tries to determine which GIC version
>> the current accelerator / host combination supports. During the initial
>> HVF porting efforts, I didn't realize that I also had to touch this
>> function. Then Zenghui brought up this function as reply to my HVF GICv3
>> enablement patch - and boy it is a mess.
>>
>> This patch set cleans up all of the GIC finalization so that we can
>> easily plug HVF in and also hopefully will have a better time extending
>> it in the future. As second step, it explicitly adds HVF support and
>> fails loudly for any unsupported accelerators.
>>
>> Alex
> 
> 
> 
> Applied to target-arm.next, thanks.

Did you squash the changes mentioned here?
https://lore.kernel.org/qemu-devel/3278ab81-ccdc-9ccc-e504-dca757db5658@linaro.org/
Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Peter Maydell 1 year, 2 months ago
On Fri, 3 Feb 2023 at 07:07, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Hi Peter,
>
> On 2/2/23 18:57, Peter Maydell wrote:
> > On Fri, 23 Dec 2022 at 09:01, Alexander Graf <agraf@csgraf.de> wrote:
> >>
> >> The finalize_gic_version() function tries to determine which GIC version
> >> the current accelerator / host combination supports. During the initial
> >> HVF porting efforts, I didn't realize that I also had to touch this
> >> function. Then Zenghui brought up this function as reply to my HVF GICv3
> >> enablement patch - and boy it is a mess.
> >>
> >> This patch set cleans up all of the GIC finalization so that we can
> >> easily plug HVF in and also hopefully will have a better time extending
> >> it in the future. As second step, it explicitly adds HVF support and
> >> fails loudly for any unsupported accelerators.

> > Applied to target-arm.next, thanks.
>
> Did you squash the changes mentioned here?
> https://lore.kernel.org/qemu-devel/3278ab81-ccdc-9ccc-e504-dca757db5658@linaro.org/

Yes, I found those when I noticed the patch didn't pass 'make check' :-)

-- PMM
Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Peter Maydell 1 year, 3 months ago
On Fri, 23 Dec 2022 at 09:01, Alexander Graf <agraf@csgraf.de> wrote:
>
> The finalize_gic_version() function tries to determine which GIC version
> the current accelerator / host combination supports. During the initial
> HVF porting efforts, I didn't realize that I also had to touch this
> function. Then Zenghui brought up this function as reply to my HVF GICv3
> enablement patch - and boy it is a mess.
>
> This patch set cleans up all of the GIC finalization so that we can
> easily plug HVF in and also hopefully will have a better time extending
> it in the future. As second step, it explicitly adds HVF support and
> fails loudly for any unsupported accelerators.
>
> Alex
>
> v1 -> v2:
>
>   - Leave VIRT_GIC_VERSION defines intact, we need them for MADT generation
>   - Include TCG header for tcg_enabled()
>
> v2 -> v3:
>
>   - Fix comment
>   - Flip kvm-enabled logic for host around
>
> Alexander Graf (2):
>   hw/arm/virt: Consolidate GIC finalize logic
>   hw/arm/virt: Make accels in GIC finalize logic explicit

Since AIUI these patches depend on "hvf: arm: Add support for GICv3",
would you mind including these when you respin that one (ie make
a series-of-3-patches)? That way I don't need to keep this series
on my to-review queue just because it's blocked on another patch :-)

thanks
-- PMM
Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()
Posted by Richard Henderson 1 year, 4 months ago
On 12/23/22 01:01, Alexander Graf wrote:
> The finalize_gic_version() function tries to determine which GIC version
> the current accelerator / host combination supports. During the initial
> HVF porting efforts, I didn't realize that I also had to touch this
> function. Then Zenghui brought up this function as reply to my HVF GICv3
> enablement patch - and boy it is a mess.
> 
> This patch set cleans up all of the GIC finalization so that we can
> easily plug HVF in and also hopefully will have a better time extending
> it in the future. As second step, it explicitly adds HVF support and
> fails loudly for any unsupported accelerators.
> 
> Alex
> 
> v1 -> v2:
> 
>    - Leave VIRT_GIC_VERSION defines intact, we need them for MADT generation
>    - Include TCG header for tcg_enabled()
> 
> v2 -> v3:
> 
>    - Fix comment
>    - Flip kvm-enabled logic for host around
> 
> Alexander Graf (2):
>    hw/arm/virt: Consolidate GIC finalize logic
>    hw/arm/virt: Make accels in GIC finalize logic explicit

Series:
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~