From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: ioeventfd question Date: Fri, 27 May 2011 11:39:37 +0300 Message-ID: <1306485577.3217.2.camel@lappy> References: <1306436620.3065.43.camel@lappy> <4DDF6118.9030103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm , Ingo Molnar , Pekka Enberg , Asias He , Prasad Joshi , Cyrill Gorcunov To: Avi Kivity Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:44054 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754345Ab1E0Ij5 (ORCPT ); Fri, 27 May 2011 04:39:57 -0400 Received: by wwa36 with SMTP id 36so1617070wwa.1 for ; Fri, 27 May 2011 01:39:56 -0700 (PDT) In-Reply-To: <4DDF6118.9030103@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2011-05-27 at 11:30 +0300, Avi Kivity wrote: > On 05/26/2011 10:03 PM, Sasha Levin wrote: > > Hi Avi, > > > > I'm working on adding ioeventfd support into tools/kvm/. > > Currently the implementation creates ioeventfd entries at the > > 'VIRTIO_PCI_QUEUE_NOTIFY' of each device and waits on all of them using > > epoll(). > > The basics are working - when IO is triggered I receive a notification > > using the event instead of an exit. > > > > I couldn't find a way to retrieve the value written to the PIO port - > > the guest memory at that location doesn't change, 'reading' the event > > just returns 1 (as expected) and I couldn't find anything else which > > might suggest what value was written to the PIO port. > > You can use KVM_IOEVENTFD_FLAG_DATAMATCH for that. > Oh, so I need to create one for each vq instead of one for each device. Thanks! -- Sasha.