From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54509)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1YqcBp-00011q-BQ
for qemu-devel@nongnu.org; Fri, 08 May 2015 02:55:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1YqcBh-0003cs-28
for qemu-devel@nongnu.org; Fri, 08 May 2015 02:55:13 -0400
Received: from mailout2.w1.samsung.com ([210.118.77.12]:55030)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1YqcBg-0003ZV-Su
for qemu-devel@nongnu.org; Fri, 08 May 2015 02:55:09 -0400
Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245])
by mailout2.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NO000H01QR1BW40@mailout2.w1.samsung.com> for
qemu-devel@nongnu.org; Fri, 08 May 2015 07:45:01 +0100 (BST)
From: Pavel Fedin
References: <016001d088b3$8da9bfa0$a8fd3ee0$@samsung.com>
<20150507153942.29afef5f.cornelia.huck@de.ibm.com>
In-reply-to: <20150507153942.29afef5f.cornelia.huck@de.ibm.com>
Date: Fri, 08 May 2015 09:45:00 +0300
Message-id: <00aa01d0895a$81d423d0$857c6b70$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-language: ru
Subject: Re: [Qemu-devel] [PATCH v2 2/3] virtio-mmio: introduce
set_guest_notifiers
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: 'Cornelia Huck'
Cc: qemu-devel@nongnu.org
Hello!
> Hm, weren't there some patches for irqfd on arm?
Yes, there were. However, they had a design problem by breaking backwards compatibility
with unmodified virtio. Their idea was to set up one more shared memory area between
virtio and vhost-net and use it to pass ISR value, which helps to distinguish, which event
took place (queue update or config change). So, this idea was rejected.
http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg03056.html
I thought about it, and technically, i think, this can be done in better way. Actually,
as far as i understood, all we need is mechanism for distinguishing between these two
events. On PCI we do this by using multiple IRQs via MSI-X, and one IRQ signals exactly
one type of event. MSI-X code also has "two IRQs" mode as a failsafe, where one IRQ
signals config change and another IRQ signals queues update (and all queues are polled in
turn). I think a similar thing could be done for virtio-mmio. It could allocate two IRQs
instead of one and describe both of them in the device tree. Guest side, upon seeing that,
could make use of those two IRQs and acknowledge to the host side that "yes, i am new
version and use new mode".
But, sorry, i will unlikely implement this, because we already have PCI with MSI-X (i
hope this is going to be published soon), so my project can use PCI emulation. So
implementing irqfds for virtio-mmio is a bit out of my scope.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia