kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ioeventfd question
@ 2011-05-26 19:03 Sasha Levin
  2011-05-27  8:30 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2011-05-26 19:03 UTC (permalink / raw)
  To: Avi Kivity
  Cc: kvm, Ingo Molnar, Pekka Enberg, Asias He, Prasad Joshi,
	Cyrill Gorcunov

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.

This is an issue with devices which have multiple virtio-rings, such as
virtio-net.

-- 

Sasha.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ioeventfd question
  2011-05-26 19:03 ioeventfd question Sasha Levin
@ 2011-05-27  8:30 ` Avi Kivity
  2011-05-27  8:39   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2011-05-27  8:30 UTC (permalink / raw)
  To: Sasha Levin
  Cc: kvm, Ingo Molnar, Pekka Enberg, Asias He, Prasad Joshi,
	Cyrill Gorcunov

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.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ioeventfd question
  2011-05-27  8:30 ` Avi Kivity
@ 2011-05-27  8:39   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2011-05-27  8:39 UTC (permalink / raw)
  To: Avi Kivity
  Cc: kvm, Ingo Molnar, Pekka Enberg, Asias He, Prasad Joshi,
	Cyrill Gorcunov

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-27  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 19:03 ioeventfd question Sasha Levin
2011-05-27  8:30 ` Avi Kivity
2011-05-27  8:39   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).