kvm: Fix race between timer signals and vcpu entry under !IOTHREAD
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 1 Feb 2011 21:15:57 +0000 (22:15 +0100)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 14 Feb 2011 14:39:45 +0000 (12:39 -0200)
commit43c5a11374b831a57e85e589b6363cab8c690553
tree5324fd7b9ecd4997d8f5d83ac9c26635329346eb
parent071c28d9665fdd231cd461d97bef7ae098c126cd
kvm: Fix race between timer signals and vcpu entry under !IOTHREAD

Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec between
checking for exit_request on vcpu entry and timer signals arriving
before KVM starts to catch them. Plug it by blocking both timer related
signals also on !CONFIG_IOTHREAD and process those via signalfd.

As this fix depends on real signalfd support (otherwise the timer
signals only kick the compat helper thread, and the main thread hangs),
we need to detect the invalid constellation and abort configure.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
CC: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
configure
cpus.c