Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/30/13 4:58 PM, Ying-Shiuan Pan wrote:
From: Ying-Shiuan Pan <yingshiuan.pan@xxxxxxxxx>

This patch fixes a bug that vtirtio_mmio_init_ioeventfd() passed a wrong
value when it invoked ioeventfd__add_event(). True value of 2nd parameter
indicates the eventfd uses PIO bus which is used by virito-pci, however,
for virtio-mmio, the value should be false.

Signed-off-by: Ying-Shiuan Pan <yspan@xxxxxxxxxxx>

Will, Marc? It would probably be good to change the two boolean
arguments into one "flags" argument to avoid future bugs.

---
  tools/kvm/virtio/mmio.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/virtio/mmio.c b/tools/kvm/virtio/mmio.c
index afa2692..3838774 100644
--- a/tools/kvm/virtio/mmio.c
+++ b/tools/kvm/virtio/mmio.c
@@ -55,10 +55,10 @@ static int virtio_mmio_init_ioeventfd(struct kvm *kvm,
  		 * Vhost will poll the eventfd in host kernel side,
  		 * no need to poll in userspace.
  		 */
-		err = ioeventfd__add_event(&ioevent, true, false);
+		err = ioeventfd__add_event(&ioevent, false, false);
  	else
  		/* Need to poll in userspace. */
-		err = ioeventfd__add_event(&ioevent, true, true);
+		err = ioeventfd__add_event(&ioevent, false, true);
  	if (err)
  		return err;

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux