qemu-arm
[Top][All Lists]
Advanced

[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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]