On Thu, Apr 05, 2018 at 05:50:20PM +0200, Paolo Bonzini wrote: > On 28/03/2018 22:48, Justin Terry (VM) wrote: [...] > > If we use [2] to inject the answers at creation time WHPX needs access > > to the CPUX86State at accel init which also doesn't seem to be possible > > in QEMU today. WHPX could basically just call cpu_x86_cpuid() for each > > CPUID QEMU cares about and plumb the answer before start. This has the > > best performance as we avoid the additional exits but has an issue in > > that the results must be known ahead of time. > > The earliest where you have access to that is x86_cpu_initfn.
x86_cpu_initfn() is the earliest you have access to the CPU object, but note that the final CPUID bits (based on -cpu options, accel data, and possibly other input) are known only when x86_cpu_realizefn() is called. -- Eduardo