From: Cornelia Huck Subject: Re: [PATCH V6 4/6] kvm: fix zero length mmio searching Date: Tue, 15 Sep 2015 09:52:35 +0200 Message-ID: <20150915095235.1333ab5f.cornelia.huck@de.ibm.com> References: <1442299319-5253-1-git-send-email-jasowang@redhat.com> <1442299319-5253-5-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, stable@vger.kernel.org To: Jason Wang Return-path: In-Reply-To: <1442299319-5253-5-git-send-email-jasowang@redhat.com> Sender: stable-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, 15 Sep 2015 14:41:57 +0800 Jason Wang wrote: > Currently, if we had a zero length mmio eventfd assigned on > KVM_MMIO_BUS. It will never be found by kvm_io_bus_cmp() since it > always compares the kvm_io_range() with the length that guest > wrote. This will cause e.g for vhost, kick will be trapped by qemu > userspace instead of vhost. Fixing this by using zero length if an > iodevice is zero length. > > Cc: stable@vger.kernel.org > Cc: Gleb Natapov > Cc: Paolo Bonzini > Signed-off-by: Jason Wang > --- > virt/kvm/kvm_main.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) Reviewed-by: Cornelia Huck