|
From: | Paolo Bonzini |
Subject: | Re: modular tcg (was: Re: [PATCH v2 1/1] modules: Improve error message when module is not) found |
Date: | Thu, 29 Jul 2021 18:40:17 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 29/07/21 11:14, Gerd Hoffmann wrote:
The common functions could be added TCGCPUOps to allow them being called via CPUClass->tcg_ops->$name instead of a direct symbol reference. Not sure this is a good idea though. Experimental patch covering tcg_exec_realizefn + tcg_exec_unrealizefn below.
A lot of these (though probably not all) are already stubbed out as "static inline" in include/exec/exec-all.h. I think they can be changed to function pointers in the style of ui/spice-module.c (accel/tcg/tcg-module.c?).
No idea yet how to handle arch-specific bits best. Seems there is no existing infrastructure to untangle target-specific code and tcg, so this probably needs something new.
If they are few enough, I would just move them out of target/i386/tcg and into target/i386/cpu-sysemu.c.
Noticed softmmu/physmem.c has lots of CONFIG_TCG #ifdefs, splitting this into softmmu/physmem-{common,tcg}.c is probably a good idea.
I only count one, and those function should be easily moved to accel/tcg/cputlb.c (after all both physmem.c and cputlb.c used to be a single file, exec.c, so this is just an oversight).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |