[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host
From: |
Pavel Fedin |
Subject: |
Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers |
Date: |
Thu, 19 Nov 2015 14:44:37 +0300 |
Hello!
> OK, that's better, thanks!
Yes, indeed this was simple.
> Why do we need
> if (kvm_eventfds_enabled()) {
> memory_region_add_eventfd(&proxy->iomem, VIRTIO_MMIO_QUEUENOTIFY,
> 4,
> true, n, notifier);
> } else if (!set_handler) {
> virtio_queue_set_host_notifier_forwarding(vq);
> }
> everywhere though?
>
> Can't memory_region_add_eventfd DTRT depending on kvm etc?
You know... I took a look at this, and yes, i could simply hook up emulation
into memory region handlers. And everything that
expects KVM eventfd binding will magically start working, probably rendering
some bypass code obsolete.
I have only one concern against this. qemu is a large piece of software,
consisting of lots of components. I cannot test absolutely
everything in every configuration. I suggest, old code was written with the
assumption that if memory_region_add_eventfd() works, we
are really using KVM acceleration. If we break this assumption, how much code
will mysteriously misbehave instead of throwing
"function not supported" error, which is quite easy to trace down and fix?
What i would refactor, perhaps, is to add a return code to
memory_region_add_eventfd(), so that it can signal failure instead of a
critical abort, this would allow to get rid of kvm_eventfds_enabled()
accompanying checks.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Michael S. Tsirkin, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers,
Pavel Fedin <=
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Michael S. Tsirkin, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Paolo Bonzini, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Michael S. Tsirkin, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Pavel Fedin, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Paolo Bonzini, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Cornelia Huck, 2015/11/19
- Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers, Pavel Fedin, 2015/11/19