Skip to content
Commit 35ab3b77 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

KVM: x86: drop PIO from unregistered devices



KVM protects the device list with SRCU, and therefore different calls
to kvm_io_bus_read()/kvm_io_bus_write() can very well see different
incarnations of kvm->buses.  If userspace unregisters a device while
vCPUs are running there is no well-defined result.  This patch applies
a safe fallback by returning early from emulator_pio_in_out().  This
corresponds to returning zeroes from IN, and dropping the writes on
the floor for OUT.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 0f87ac23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment