« Previous | Next » 

Revision 9ccfac9e

ID9ccfac9ea4b862a75a4270ed32db1f8e314911c5

Added by Jan Kiszka almost 11 years ago

kvm: Unconditionally reenter kernel after IO exits

KVM requires to reenter the kernel after IO exits in order to complete
instruction emulation. Failing to do so will leave the kernel state
inconsistently behind. To ensure that we will get back ASAP, we issue a
self-signal that will cause KVM_RUN to return once the pending
operations are completed.

We can move kvm_arch_process_irqchip_events out of the inner VCPU loop.
The only state that mattered at its old place was a pending INIT
request. Catch it in kvm_arch_pre_run and also trigger a self-signal to
process the request on next kvm_cpu_exec.

This patch also fixes the missing exit_request check in kvm_cpu_exec in
the CONFIG_IOTHREAD case.

Signed-off-by: Jan Kiszka <>
CC: Gleb Natapov <>
Signed-off-by: Marcelo Tosatti <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences