Re: [PATCH 1/2] don't start cpu main loop while there is still init work to do.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glauber Costa wrote:
As soon as we call kvm_init_vcpu(), we start the vcpu thread.
However, there is still things that has to be done, as soon
as the new CPUState is created. Examples include initializing the
apic, halting the cpu, etc.

Without this patch, it is possible that the cpu may want to start
using those things, before initializing them, leading to segfaults.
We introduce another state variable, "initialized", meaning that
the cpu is already created, but not totally initialized,
to serialize it.

Before this patch:
(qemu) cpu_set X online => segfaults ~ 80 % of the time
After this patch:
(qemu) cpu_set X online => works.


Is it possible to move all those things to the vcpu thread, so it serializes naturally?

I'd like to avoid vcpu ioctls from more than one thread, in case we ever move to a syscall implementation.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux