On 2015-06-18 11:29, Paolo Bonzini wrote: > On 18/06/2015 11:08, Aurelien Jarno wrote: > > For an i386 guest still on an x86 host, I get a 4% slower boot time by > > not using retranslation (see patch below). This is not that much > > compared to the complexity retranslation bring us. > > QEMU could just always compute and store the restore_state information. > TCG needs to help filling it in (a new TCG opcode?), but it should be easy.
Yes, that was another approach I have in mind (I called it exception table in my other mail), but it requires a tiny more work than just saving the CPU state all the time. The problem is that the state information we want to save are varying for target to target. Going through a TCG opcode means we can use the liveness analysis pass to save the minimum amount of data. That said I would like to push further the idea of always saving the CPU state a bit more to see if we can keep the same performances. There are still improvements to do, by removing more code on the core side (like finding the call to tb_finc_pc which is now useless), or on the target side by checking/improving helper flags. We might save the CPU state too often if a helper doesn't declare it doesn't touch globals. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net