[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities
|
From: |
Markus Armbruster |
|
Subject: |
Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/ |
|
Date: |
Thu, 08 Aug 2024 13:05:09 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Peter Maydell <peter.maydell@linaro.org> writes:
> On Thu, 8 Aug 2024 at 10:02, Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>> > On Thu, 8 Aug 2024 at 05:32, Markus Armbruster <armbru@redhat.com> wrote:
>> >>
>> >> Peter Maydell <peter.maydell@linaro.org> writes:
>> >>
>> >> [...]
>> >>
>> >> > The QAPI command which this code is implementing is
>> >> > also (a) target-specific and (b) unfortunately
>> >> > designed so that it doesn't get passed a particular
>> >> > CPU or particular device to query, it's just assumed
>> >> > to be a part of the whole simulation.
>> >>
>> >> We can fix (b) if we care: add a suitable optional argument, default to
>> >> the sole GIC in the system, fail if there's more than one. I assume we
>> >> have no machines with more than one now.
>> >
>> > The exynos4210 SoC (board types 'nuri', 'smdkc210') has
>> > two GICs. (It's a rather odd design -- there's the
>> > interrupt controller that's part of the main CPU
>> > cluster, and then they used a second "external" GIC
>> > that feeds into that one.)
>>
>> Then "fail if there's more than one" would be an incompatible change for
>> this machine.
>>
>> If the two GICs have identical capabilities, it doesn't matter to which
>> of the two query-gic-capabilities technically applies.
>>
>> Else, it matters, and we have an interface issue. Do we?
>
> It's not possible to use KVM with that machine type, so the
> question is a bit moot. (This also indicates that the
> interface is not very helpful -- it purports to tell the
> management layer whether it can use an accelerated in-kernel
> GIC, but because it doesn't specifiy the board type there's
> no way to provide an accurate answer. It would be useful
> to know exactly what libvirt/etc actually use this for...)
I had a look at libvirt.
It executes query-gic-capabilities only for certain ARM architectures,
namely
qemuCaps->arch == VIR_ARCH_AARCH64 ||
qemuCaps->arch == VIR_ARCH_ARMV6L ||
qemuCaps->arch == VIR_ARCH_ARMV7L
This is virQEMUCapsProbeQMPGICCapabilities(). It stores the result of
query-gic-capabilities in a virGICCapability array.
The only use of the array I can see is in
virQEMUCapsSupportsGICVersion(). It returns true when one of the array
entries matches its version argument and supports its virtType argument.
Two users:
* virQEMUCapsFillDomainFeatureGICCaps() uses it to find a supported GIC
version. I believe this is then stored in domain XML.
* qemuDomainDefEnableDefaultFeatures() uses it to pick a default GIC
version. I believe this is then used to set machine property
"gic-version".
- [RFC PATCH-for-9.1? 0/2] hw/intc/arm_gic: Only provide query-gic-capabilities when GIC built-in, Philippe Mathieu-Daudé, 2024/08/06
- [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Philippe Mathieu-Daudé, 2024/08/06
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Richard Henderson, 2024/08/06
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Philippe Mathieu-Daudé, 2024/08/07
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Peter Maydell, 2024/08/07
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Markus Armbruster, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Peter Maydell, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Markus Armbruster, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Peter Maydell, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/,
Markus Armbruster <=
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Daniel P . Berrangé, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Peter Maydell, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Daniel P . Berrangé, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Daniel P . Berrangé, 2024/08/08
- Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Peter Maydell, 2024/08/08
Re: [RFC PATCH-for-9.1? 1/2] target/arm: Move qmp_query_gic_capabilities() to hw/intc/, Markus Armbruster, 2024/08/07
[RFC PATCH-for-9.1? 2/2] hw/intc/arm_gic: Only provide query-gic-capabilities when GIC built-in, Philippe Mathieu-Daudé, 2024/08/06