qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] exec: split out non-softmmu-specific parts


From: Paolo Bonzini
Subject: Re: [PATCH 2/2] exec: split out non-softmmu-specific parts
Date: Thu, 8 Oct 2020 09:56:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 08/10/20 09:47, Claudio Fontana wrote:
> On 10/6/20 11:19 AM, Paolo Bonzini wrote:
>> Over the years, most parts of exec.c that were not specific to softmmu
>> have been moved to accel/tcg; what's left is mostly the low-level part
>> of the memory API, which includes RAMBlock and AddressSpaceDispatch.
>> However exec.c also hosts 4-500 lines of code for the target specific
>> parts of the CPU QOM object, plus a few functions for user-mode
>> emulation that do not have a better place (they are not TCG-specific so
>> accel/tcg/user-exec.c is not a good place either).
>>
>> Move these parts to a new file, so that exec.c can be moved to
>> softmmu/physmem.c.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Hi Paolo,
> 
> the comment does not talk about cpu.c, which is now created in the top source 
> directory.
> What is the role of this new module?

It's actually in the commit message: "4-500 lines of code for the target
specific parts of the CPU QOM object, plus a few functions for user-mode
emulation that do not have a better place".

It's basically sitting between hw/core/cpu.c and target/*/cpu.c.  Hence
the non-descriptive name. :)

> Also, could we find a more descriptive file name than cpu.c?
> Do you plan further renaming of this new module functions?
> 
> Or its this basically a "leftovers" file for which we did not find a proper 
> role yet?

The user-mode parts are, but most of it is implementing the QOM CPU
object.  We can move those functions to hw/core/cpu.c and make that file
target-dependent, I wouldn't object to that.  But since there are some
opportunities for simplification, I'd rather do that in a separate patch
and keep the pure code-movement in this one.

Paolo




reply via email to

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