[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtim
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime |
Date: |
Fri, 12 Mar 2021 10:32:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 3/12/21 10:05 AM, Paolo Bonzini wrote:
> On 12/03/21 00:12, Philippe Mathieu-Daudé wrote:
>> -#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel
>> tcg "
>> +#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm "
>
> Wouldn't qtest_init simply fail here if KVM is not available?
I guess my previous approach was what you suggested.
The previous patch (bios-tables-test) is a better example:
g_autofree char *args = NULL;
args = test_acpi_create_args(data, params, use_uefi);
data->qts = qtest_init_for_accel(args, "tcg");
if (data->tcg_only && !data->qts) {
g_test_skip("TCG not available, skipping test");
return;
} else {
// check data->qts or the following will abort
}
Having qtest_init_for_accel() calling qtest_quit(),
but this makes the tests logic more complex IMO...
Is that what you have in mind?
- Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command, (continued)
[PATCH 2/6] tests/qtest: Add qtest_probe_accel() method, Philippe Mathieu-Daudé, 2021/03/11
[PATCH 5/6] qtest/arm-cpu-features: Check TCG availability at runtime, Philippe Mathieu-Daudé, 2021/03/11
[PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime, Philippe Mathieu-Daudé, 2021/03/11
[PATCH 6/6] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore, Philippe Mathieu-Daudé, 2021/03/11
[PATCH 3/6] qtest/bios-tables-test: Make test build-independent from accelerator, Philippe Mathieu-Daudé, 2021/03/11