[edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer

Leif Lindholm posted 2 patches 1 year ago
Failed in applying to current master (apply log)
ArmPkg/ArmPkg.dec                                                        |  1 +
ArmVirtPkg/ArmVirtQemu.dsc                                               |  1 +
ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf |  1 +
ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.c   | 13 +++++++++----
4 files changed, 12 insertions(+), 4 deletions(-)
[edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Leif Lindholm 1 year ago
An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
mach-virt.

Add a new Pcd for the new private peripheral interrupt id,
PcdArmArchTimerHypVirtIntrNum.

Update ArmVirtTimerFdtClientLib to:
- Only assert on receiving less information that required through DT.
- Set PcdArmArchTimerHypVirtIntrNum if provided through DT.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Leif Lindholm (2):
  ArmPkg: add EL2 virtual timer interrupt Pcd
  ArmVirtPkg: handle virtual EL2 timer in DT

 ArmPkg/ArmPkg.dec                                                        |  1 +
 ArmVirtPkg/ArmVirtQemu.dsc                                               |  1 +
 ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf |  1 +
 ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.c   | 13 +++++++++----
 4 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.30.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108823): https://edk2.groups.io/g/devel/message/108823
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Ard Biesheuvel 1 year ago
On Tue, 19 Sept 2023 at 13:20, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
> mach-virt.
>
> Add a new Pcd for the new private peripheral interrupt id,
> PcdArmArchTimerHypVirtIntrNum.
>
> Update ArmVirtTimerFdtClientLib to:
> - Only assert on receiving less information that required through DT.
> - Set PcdArmArchTimerHypVirtIntrNum if provided through DT.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
>
> Leif Lindholm (2):
>   ArmPkg: add EL2 virtual timer interrupt Pcd
>   ArmVirtPkg: handle virtual EL2 timer in DT
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

>  ArmPkg/ArmPkg.dec                                                        |  1 +
>  ArmVirtPkg/ArmVirtQemu.dsc                                               |  1 +
>  ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf |  1 +
>  ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.c   | 13 +++++++++----
>  4 files changed, 12 insertions(+), 4 deletions(-)
>
> --
> 2.30.2
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108837): https://edk2.groups.io/g/devel/message/108837
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Peter Maydell 1 year ago
On Tue, 19 Sept 2023 at 12:20, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
> mach-virt.
>
> Add a new Pcd for the new private peripheral interrupt id,
> PcdArmArchTimerHypVirtIntrNum.
>
> Update ArmVirtTimerFdtClientLib to:
> - Only assert on receiving less information that required through DT.
> - Set PcdArmArchTimerHypVirtIntrNum if provided through DT.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Sami Mujawar <sami.mujawar@arm.com>

Thanks for writing and sending out these patches. I've tested, and
they are sufficient to get EDK2 to not assert and successfully
boot a guest OS when using my QEMU RFC patchset that reports the
new interrupt ID via the dtb:
https://patchew.org/QEMU/20230919101240.2569334-1-peter.maydell@linaro.org/

-- PMM


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108835): https://edk2.groups.io/g/devel/message/108835
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Leif Lindholm 1 year ago
On Tue, Sep 19, 2023 at 14:18:01 +0100, Peter Maydell wrote:
> On Tue, 19 Sept 2023 at 12:20, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
> >
> > An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
> > mach-virt.
> >
> > Add a new Pcd for the new private peripheral interrupt id,
> > PcdArmArchTimerHypVirtIntrNum.
> >
> > Update ArmVirtTimerFdtClientLib to:
> > - Only assert on receiving less information that required through DT.
> > - Set PcdArmArchTimerHypVirtIntrNum if provided through DT.
> >
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Sami Mujawar <sami.mujawar@arm.com>
> 
> Thanks for writing and sending out these patches. I've tested, and
> they are sufficient to get EDK2 to not assert and successfully
> boot a guest OS when using my QEMU RFC patchset that reports the
> new interrupt ID via the dtb:
> https://patchew.org/QEMU/20230919101240.2569334-1-peter.maydell@linaro.org/

CI told me I was a muppet and needed to add the same
[PcdsDynamicDefault.common] stanza to all the other .dscs in
ArmVirtPkg, so given they were all identical I took the liberty not to
ask for re-review.
Pushed as 7275993dc644..eb485b6438f4.

Thanks all!

/
    Leif


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108859): https://edk2.groups.io/g/devel/message/108859
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Leif Lindholm 1 year ago
On 2023-09-19 14:18, Peter Maydell wrote:
> On Tue, 19 Sept 2023 at 12:20, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>>
>> An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
>> mach-virt.
>>
>> Add a new Pcd for the new private peripheral interrupt id,
>> PcdArmArchTimerHypVirtIntrNum.
>>
>> Update ArmVirtTimerFdtClientLib to:
>> - Only assert on receiving less information that required through DT.
>> - Set PcdArmArchTimerHypVirtIntrNum if provided through DT.
>>
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Sami Mujawar <sami.mujawar@arm.com>
> 
> Thanks for writing and sending out these patches. I've tested, and
> they are sufficient to get EDK2 to not assert and successfully
> boot a guest OS when using my QEMU RFC patchset that reports the
> new interrupt ID via the dtb:
> https://patchew.org/QEMU/20230919101240.2569334-1-peter.maydell@linaro.org/

Are you happy for me to interpret that as Tested-by for 2/2? (1/2 just 
being internal plumbing not related to preventing the ASSERT)

/
     Leif




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108849): https://edk2.groups.io/g/devel/message/108849
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/2] ArmPkg/ArmVirtPkg: handle FEAT_VHE NS-EL2 virtual timer
Posted by Peter Maydell 1 year ago
On Tue, 19 Sept 2023 at 16:19, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> On 2023-09-19 14:18, Peter Maydell wrote:
> > On Tue, 19 Sept 2023 at 12:20, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
> >>
> >> An ASSERT trips when we try to add the NS-EL2 virtual timer to qemu
> >> mach-virt.
> >>
> >> Add a new Pcd for the new private peripheral interrupt id,
> >> PcdArmArchTimerHypVirtIntrNum.
> >>
> >> Update ArmVirtTimerFdtClientLib to:
> >> - Only assert on receiving less information that required through DT.
> >> - Set PcdArmArchTimerHypVirtIntrNum if provided through DT.
> >>
> >> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> >> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> >> Cc: Sami Mujawar <sami.mujawar@arm.com>
> >
> > Thanks for writing and sending out these patches. I've tested, and
> > they are sufficient to get EDK2 to not assert and successfully
> > boot a guest OS when using my QEMU RFC patchset that reports the
> > new interrupt ID via the dtb:
> > https://patchew.org/QEMU/20230919101240.2569334-1-peter.maydell@linaro.org/
>
> Are you happy for me to interpret that as Tested-by for 2/2? (1/2 just
> being internal plumbing not related to preventing the ASSERT)

Yes, if you do Tested-by tags in this project feel free to add
that from me.

-- PMM


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108855): https://edk2.groups.io/g/devel/message/108855
Mute This Topic: https://groups.io/mt/101453745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-