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

Re: [libvirt] [PATCH 3/5] qemu: Use GICv2 for aarch64/virt TCG guests



On Fri, May 12, 2017 at 16:14:45 +0200, Andrea Bolognani wrote:
> There are currently some limitations in the emulated GICv3
> that make it unsuitable as a default. Use GICv2 instead.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1450433
> 
> Signed-off-by: Andrea Bolognani <abologna redhat com>
> ---
>  src/qemu/qemu_domain.c                             | 41 +++++++++++++++-------
>  .../qemuxml2argv-aarch64-gic-none-tcg.args         |  2 +-
>  .../qemuxml2xmlout-aarch64-gic-none-tcg.xml        |  2 +-
>  3 files changed, 31 insertions(+), 14 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index cc02c80..31ed391 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -2559,17 +2559,31 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def,
>      if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ABSENT &&
>          qemuDomainIsVirt(def)) {
>  
> -        VIR_DEBUG("Looking for usable GIC version in domain capabilities");
> -        for (version = VIR_GIC_VERSION_LAST - 1;
> -             version > VIR_GIC_VERSION_NONE;
> -             version--) {
> -            if (virQEMUCapsSupportsGICVersion(qemuCaps,
> -                                              def->virtType,
> -                                              version)) {
> -                VIR_DEBUG("Using GIC version %s",
> -                          virGICVersionTypeToString(version));
> -                def->gic_version = version;
> -                break;
> +        /* We want to use the highest available GIC version for guests;
> +         * however, the emulated GICv3 is currently lacking a MSI controller,
> +         * making it unsuitable for the pure PCIe topology we aim for.
> +         *
> +         * For that reason, we skip this step entirely for TCG guests,
> +         * and rely on the code below to pick the default version, GICv2,
> +         * which supports all the features we need.
> +         *
> +         * We'll want to revisit this once MSI support for GICv3 has been
> +         * implemented in QEMU.
> +         *
> +         * See https://bugzilla.redhat.com/show_bug.cgi?id=1414081 */
> +        if (def->virtType == VIR_DOMAIN_VIRT_KVM) {

Currently it does not matter that much, since there are only two
versions but this looks very non-future-proof to me.

When qemu adds the feature you'll need to add a capability, where you
also enable the code below for TCG guests.

If there will be another version or something the condition will need to
be altered.

I'd rather see that v3 is specifically disqualified for TCG guests
(which will be later relaxed using the capability.). That way you'll
still run the detection process.

> +            VIR_DEBUG("Looking for usable GIC version in domain capabilities");
> +            for (version = VIR_GIC_VERSION_LAST - 1;
> +                 version > VIR_GIC_VERSION_NONE;
> +                 version--) {
> +                if (virQEMUCapsSupportsGICVersion(qemuCaps,
> +                                                  def->virtType,
> +                                                  version)) {
> +                    VIR_DEBUG("Using GIC version %s",
> +                              virGICVersionTypeToString(version));
> +                    def->gic_version = version;
> +                    break;
> +                }
>              }
>          }

Attachment: signature.asc
Description: PGP signature


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