mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializing devices. Since we are already registering them, calling qemu_system_reset() should suffice. Actually, it is what happens when we reboot the machine, and using the same process instead of a special case semantics will even allow us to find bugs easier. Furthermore, the fact that we initialize things like the cpu quite early, leads to the need to introduce synchronization stuff like qemu_system_cond. This patch removes it entirely. All we need to do is call qemu_system_reset() only when we're already sure the system is up and running I tested it with qemu (with and without io-thread) and qemu-kvm, and it seems to be doing okay - although qemu-kvm uses a slightly different patch. [ v2: user mode still needs cpu_reset, so put it in ifdef. ] [ v3: leave qemu_system_cond for now. ] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
cae334cd6b
commit
c169998802
14 changed files with 4 additions and 13 deletions
1
vl.c
1
vl.c
|
@ -4034,6 +4034,7 @@ static void main_loop(void)
|
|||
qemu_system_ready = 1;
|
||||
qemu_cond_broadcast(&qemu_system_cond);
|
||||
#endif
|
||||
qemu_system_reset();
|
||||
|
||||
for (;;) {
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue