From: Auger Eric <eric.auger@redhat.com>
To: Andrew Jones <drjones@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, qemu list <qemu-devel@nongnu.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [question] hw/arm/virt: about the default gic-version in accelerated mode
Date: Tue, 28 Jan 2020 13:34:06 +0100 [thread overview]
Message-ID: <e0b73504-b37a-cc57-3c3f-b9872dd1e16c@redhat.com> (raw)
In-Reply-To: <20200128122915.ehzgj5kpmsw5azap@kamzik.brq.redhat.com>
Hi Drew,
On 1/28/20 1:29 PM, Andrew Jones wrote:
> On Tue, Jan 28, 2020 at 10:52:50AM +0000, Peter Maydell wrote:
>> On Tue, 28 Jan 2020 at 10:47, Auger Eric <eric.auger@redhat.com> wrote:
>>> When arm virt machine is run in accelerated mode with "-cpu host
>>> -machine virt", the default gic version is 2.
>>>
>>> I understand the rationale with TCG where we don't have MSI ITS
>>> emulation along with GICv3 so we need to choose GICv2 to get GICv2M
>>> functionality.
>>>
>>> However in KVM mode, I would have expected to see the host GIC probed to
>>> set the same version on guest. Indeed most of our HW now have GICv3
>>> without GICv2 compat mode so our default values lead to weird traces:
>>>
>>> "
>>> qemu-system-aarch64: PMU: KVM_SET_DEVICE_ATTR: Invalid argument
>>> qemu-system-aarch64: failed to set irq for PMU
>>> "
>>>
>>> I would like to propose a patch to improve those errors and also suggest
>>> a hint. But I also wanted to know whether you would accept to change the
>>> default value with KVM and choose the host version instead of 2. For TCG
>>> we would keep v2.
>>
>> As with the -cpu option, the default is there for command
>> line backward compatibility primarily. Even if we had
>> better support for MSI ITS emulation we'd still leave
>> the default at GICv2.
>>
>> If you want "do the best you can, regardless of accelerator"
>> that is "-cpu max -machine gic-version=max".
>>
>
> There is a case where we can probe without breaking backward
> compatibility. That case is kvm-enabled and no gic-version
> specified. The reason it would be safe to probe the GIC version
> is because unless the host was a gicv2 host, then that command
> line wouldn't have worked anyway.
Except if the host GICv3 has a GICv2 compat (which is pretty unlikely)?
Eric
And, if it is a gicv2 host,
> then the probing will come to the same conclusion as the
> default and nothing will have changed.
>
> Thanks,
> drew
>
>
next prev parent reply other threads:[~2020-01-28 12:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 10:47 [question] hw/arm/virt: about the default gic-version in accelerated mode Auger Eric
2020-01-28 10:52 ` Peter Maydell
2020-01-28 10:58 ` Dr. David Alan Gilbert
2020-01-28 10:59 ` Auger Eric
2020-01-28 12:29 ` Andrew Jones
2020-01-28 12:34 ` Auger Eric [this message]
2020-01-28 12:41 ` Andrew Jones
2020-01-28 13:53 ` Auger Eric
2020-01-28 14:52 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0b73504-b37a-cc57-3c3f-b9872dd1e16c@redhat.com \
--to=eric.auger@redhat.com \
--cc=dgilbert@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).