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 <pbonz...@redhat.com> > --- > MAINTAINERS | 4 +- > cpu.c | 452 +++++++++++++++++++++++++++++++++++ > include/exec/cpu-common.h | 3 + > meson.build | 2 +- > softmmu/meson.build | 3 +- > exec.c => softmmu/physmem.c | 454 +----------------------------------- > 6 files changed, 467 insertions(+), 451 deletions(-) > create mode 100644 cpus.c > rename exec.c => softmmu/physmem.c (91%)
I suppose it would be easier to review split in 2 patches, first extract cpu.c, then move to physmem.c, but it is now reviewed. [...] > diff --git a/exec.c b/softmmu/physmem.c > similarity index 91% > rename from exec.c > rename to softmmu/physmem.c > index ec68f4a9ca..6acd220f53 100644 > --- a/exec.c > +++ b/softmmu/physmem.c > @@ -1,5 +1,5 @@ > /* > - * Virtual page mapping > + * RAM allocation and memory access [...] This comment and the one from softmmu/memory.c are confusing: /* * Physical memory management * ... Otherwise: Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> Tested-by: Philippe Mathieu-Daudé <phi...@redhat.com>