kvm: Report proper error on GET_VCPU_MMAP_SIZE failures
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm: Drop redundant kvm_enabled from kvm_cpu_thread_fn
kvm: Handle kvm_init_vcpu errors
Do not ignore errors of kvm_init_vcpu, they are fatal.
kvm: Provide sigbus services arch-independently
Provide arch-independent kvm_on_sigbus* stubs to remove the #ifdef'eryfrom cpus.c. This patch also fixes --disable-kvm build by providing themissing kvm_on_sigbus_vcpu kvm-stub.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Refactor signal setup functions in cpus.c
Move {tcg,kvm}_init_ipi and block_io_signals to avoid prototypes, renamethe former two to clarify that they deal with more than SIG_IPI. Nofunctional changes - except for the tiny fixup of strerror usage.
The forward declaration of sigbus_handler is just temporarily, it will...
kvm: Set up signal mask also for !CONFIG_IOTHREAD
Block SIG_IPI, unblock it during KVM_RUN, just like in io-thread mode.It's unused so far, but this infrastructure will be required forself-IPIs and to process SIGBUS plus, in KVM mode, SIGIO and SIGALRM. As...
kvm: Refactor qemu_kvm_eat_signals
We do not use the timeout, so drop its logic. As we always poll oursignals, we do not need to drop the global lock. Removing those callsallows some further simplifications. Also fix the error processing ofsigpending at this chance....
kvm: Call qemu_kvm_eat_signals also under !CONFIG_IOTHREAD
Move qemu_kvm_eat_signals around and call it also when the IO-thread isnot used. Do not yet process SIGBUS, will be armed in a separate step.
Set up signalfd under !CONFIG_IOTHREAD
Will be required for SIGBUS handling. For obvious reasons, this willremain a nop on Windows hosts.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm: Fix race between timer signals and vcpu entry under !IOTHREAD
Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec betweenchecking for exit_request on vcpu entry and timer signals arrivingbefore KVM starts to catch them. Plug it by blocking both timer related...
View all revisions | View revisions
Also available in: Atom