qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common locati


From: Paolo Bonzini
Subject: Re: [PATCH 1/2] accel: move qtest CpusAccel functions to a common location
Date: Mon, 12 Oct 2020 22:30:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 12/10/20 22:23, Claudio Fontana wrote:
> On 10/12/20 10:07 PM, Jason Andryuk wrote:
>> Move and rename accel/qtest/qtest-cpu.* files to accel/dummy/ so they
>> can be re-used by Xen.
>>
>> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
>> ---
>>  .../qtest-cpus.c => dummy/dummy-cpus.c}       | 22 +++++--------------
>>  .../qtest-cpus.h => dummy/dummy-cpus.h}       | 10 ++++-----
>>  accel/dummy/meson.build                       |  6 +++++
>>  accel/meson.build                             |  1 +
>>  accel/qtest/meson.build                       |  1 -
>>  accel/qtest/qtest.c                           |  7 +++++-
>>  6 files changed, 23 insertions(+), 24 deletions(-)
>>  rename accel/{qtest/qtest-cpus.c => dummy/dummy-cpus.c} (76%)
>>  rename accel/{qtest/qtest-cpus.h => dummy/dummy-cpus.h} (59%)
>>  create mode 100644 accel/dummy/meson.build

Maybe accel/dummy-cpus.c, no need to add a new directory.

>> diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c
>> index 537e8b449c..ac54bc8f52 100644
>> --- a/accel/qtest/qtest.c
>> +++ b/accel/qtest/qtest.c
>> @@ -25,7 +25,12 @@
>>  #include "qemu/main-loop.h"
>>  #include "hw/core/cpu.h"
>>  
>> -#include "qtest-cpus.h"
>> +#include "accel/dummy/dummy-cpus.h"
> 
> this is a bit strange from my perspective, does not look right.
> 
> Maybe this dummy cpu prototype should be somewhere in include/ ,
> like include/sysemu/cpus.h or even better include/sysemu/accel.h

Yes, it should be in include/sysemu/cpus.h.

Paolo

>> +
>> +const CpusAccel qtest_cpus = {
>> +    .create_vcpu_thread = dummy_start_vcpu_thread,
>> +    .get_virtual_clock = qtest_get_virtual_clock,
>> +};
>>  
>>  static int qtest_init_accel(MachineState *ms)
>>  {
>>
> 




reply via email to

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