On 7 February 2013 18:44, Andreas Färber <afaer...@suse.de> wrote: > Am 07.02.2013 17:31, schrieb Eduardo Habkost: >> My first question I had when I saw this was: are you really sure it is >> safe to call cpu_reset() and qemu_init_vcpu() before >> arm_translate_init()? >> >> But I see that you change this on commit 092028dbf1. So now I have the >> opposite question: are you really sure it is safe to call >> arm_translate_init() before arm_cpu_realizefn()? > > The answer to either is yes. TCG initialization functions themselves > (after this series latest) don't depend on CPU state and only calculate > static field offsets (in one or two cases depending on CPU versions that > I have inlined as part of the series). ARM's doesn't. If you spot any > remaining exception to that rule, please shout.
An idle thought: I wonder if we could rearrange things so that the target-specific TCG init is called via tcg_init(), to parallel the way that target-specific KVM init is called via kvm_init()? That would avoid the slight oddity that cpu_arm_init() &c have tcg_enabled()-specific code but not kvm_enabled()-specific or other accelerator-specific init. I'm not sure it would be worth the effort to make that change, though. -- PMM