Skip to content

Simplify cpu initialization

Glauber Costa qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4move registering of cpu_reset to inside cpu_inithw/pc.c target-i386/helper.c+8 -73 replies
2/4move CPUID_APIC flag to where it belongshw/pc.c target-i386/helper.c+1 -56 replies
3/4move halted state setting to inside of cpu_x86_inithw/pc.c target-i386/helper.c+3 -23 replies
4/4move apic functions to a separate apic.h headerhw/apic.c hw/apic.h hw/ioapic.c +3 more+23 -152 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] Simplify cpu initialization

Currently, there are pieces of cpu initialization being done in two different places. The big part of it, is done inside cpu_x86_init, while minor others are done in pc.c, after cpu_x86_init returns.

For things like halting cpus != 0, registering reset handler, etc, there is no reason whatsoever for not doing it in cpu initialization.

The apic initialization should be moved there too, and theorectically, it should not depend on pci machine. However, it currently breaks our isa machine, and to avoid a hack, it is left where it is.