[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v16 04/99] qtest/arm-cpu-features: Use generic qtest_has_acce
From: |
Eric Blake |
Subject: |
Re: [PATCH v16 04/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM |
Date: |
Tue, 8 Jun 2021 09:28:48 -0500 |
User-agent: |
NeoMutt/20210205 |
On Tue, Jun 08, 2021 at 02:39:03PM +0200, Philippe Mathieu-Daudé wrote:
> >
> > Not enough coffee earlier. I think this is a documentation problem,
> > query-kvm returns a list of *runtime* accelerators:
> > https://www.mail-archive.com/qemu-devel@nongnu.org/msg811144.html
> >
> > IIUC what Paolo said, if something asks for an accelerator that
> > is not present at build-time, then this is a configuration problem,
> > not relevant for the management interface.
>
> Argh no... sigh. So we have 4 cases:
>
> 1- accelerator not built
> 2- accelerator built in as module but not loaded
> 3- accelerator built in & loaded but not usable
> 4- accelerator built in & loaded and usable
>
> QMP query-accels returns "accelerator built in & loaded"
> without precising it is usable.
>
> qtest kvm_enabled() checks if the accelerator is enabled
> without checking it is built-in.
>
> QMP query-kvm returns 'present' as in built-in (so case 1),
> and 'enabled' (a.k.a. 'allowed') updated once init_machine()
> succeeded (so case 4).
>
> So, again, IIUC Paolo, what he said is for the management layer
> 1 and 2 are the same, the accelerator is not present.
Isn't 3 in the same boat? Really, the management app cares if it can
use the accelerator, not whether it is present.
>
> For qtests, we want the 'usable' case (4) right? Whether the
> accelerator is builtin / loaded is irrelevant.
>
> Could we improve the terminology here? Maybe is_present() and
> is_usable()? Suggestions?
>
> Do we need to add both query-present-accels query-usable-accels
> commands? Is it actually possible to return an array of 'usable'
> accelerators?
>
> Maybe simply add query-present-accels() -> [] and
> query-usable-accel(accel) -> bool.
Can you just make query-accels return both pieces of information?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- Re: [PATCH v16 01/99] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section, (continued)
[PATCH v16 05/99] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM, Alex Bennée, 2021/06/04
[PATCH v16 08/99] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64, Alex Bennée, 2021/06/04
[PATCH v16 07/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG, Alex Bennée, 2021/06/04