Re: Event channels in KVM?

2008-09-22 Thread Matt Anger
Thanks for the info, I've been looking into it by trying to look
around kvm source code.
Apparently I have to write a kernel driver for the guest os and then
also write backend driver and modify qemu to use it? Is that correct?
That seems ugly, especially since now my io goes guest-guest kernel
driver-host kernel kvm-qemu-host kernel driver
With Xen event-channels my driver gets the event notification directly
with no user space intervention removing the middle 2 steps and I
don't have to touch any of Xen's codebase. My driver just registers
for an event-channel.

Thanks
-Matt

On Fri, Sep 19, 2008 at 12:14 PM, Anthony Liguori [EMAIL PROTECTED] wrote:
 Javier Guerra wrote:

 On Fri, Sep 19, 2008 at 1:31 PM, Anthony Liguori [EMAIL PROTECTED]
 wrote:


 Matt Anger wrote:


 Does KVM have any interface similar to event-channels like Xen does?
 Basically a way to send notifications between the host and guest.



 virtio is the abstraction we use.

 But virtio is based on the standard hardware interfaces of the PC--PIO,
 MMIO, and interrupts.


 this is rather low-level, it would be nice to have a multiplatform
 interface to this abstraction.


 That's exactly the purpose of virtio.  virtio is a high-level, cross
 platform interface.  It's been tested on x86, PPC, s390, and I believe ia64.
  It also works in lguest.

 It happens to use PIO, MMIO, and interrupts on x86 under KVM but other
 virtio implementations exist for other platforms.

 just for kicks, i've found and printed Rusty's paper about it. hope
 it's current :-)


 The other good thing to look at is the lguest documentation.  You can skip
 to just the virtio bits if you're so inclined.  It's really quite thoroughly
 documented.

 Regards,

 Anthony Liguori


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


Re: Event channels in KVM?

2008-09-22 Thread Matt Anger
I was referring to the bounce from host kernel to qemu and then back
to the host kernel for my BE driver.
Xen:
guest - guest kernel driver- host kernel driver

For both situations I need a FE and BE driver, but for KVM I need to
modify QEMU and teach it how to pass the virtio calls to my Host
driver. In Xen BE driver and Host driver are the same and I don't have
to recompile any part of Xen.

-Matt

On Mon, Sep 22, 2008 at 5:30 PM, Dong, Eddie [EMAIL PROTECTED] wrote:
 Matt Anger wrote:
 Thanks for the info, I've been looking into it by trying
 to look
 around kvm source code.
 Apparently I have to write a kernel driver for the guest
 os and then
 also write backend driver and modify qemu to use it? Is
 that correct?
 That seems ugly, especially since now my io goes
 guest-guest kernel driver-host kernel kvm-qemu-host
 kernel driver
 With Xen event-channels my driver gets the event
 notification directly
 with no user space intervention removing the middle 2
 steps and I

 Why virtio needs start from guest user space while event channel not?
 It is exactly same, event channel can start from user space or kernel
 space, same for virtio.
 The only difference is guest-host communication needs to go thru Qemu
 (host process) in your description model, while Xen handle event channel
 in hypervisor. But this can be enahnced also IMO by employing a kernel
 level device model which does inter-communication for CPU if performance
 is critical, but mostly probably not.

 don't have to touch any of Xen's codebase. My driver just
 registers
 for an event-channel.

 But you still need the counter part side to handle it.
 I think you may want to reuse Xen BE side code which is a wrong
 assumption.


 Thanks
 -Matt

 On Fri, Sep 19, 2008 at 12:14 PM, Anthony Liguori
 [EMAIL PROTECTED] wrote:
 Javier Guerra wrote:

 On Fri, Sep 19, 2008 at 1:31 PM, Anthony Liguori
 [EMAIL PROTECTED] wrote:


 Matt Anger wrote:


 Does KVM have any interface similar to event-channels
 like Xen does? Basically a way to send notifications
 between the host and guest.



 virtio is the abstraction we use.

 But virtio is based on the standard hardware
 interfaces of the PC--PIO, MMIO, and interrupts.


 this is rather low-level, it would be nice to have a
 multiplatform interface to this abstraction.


 That's exactly the purpose of virtio.  virtio is a
 high-level, cross platform interface.  It's been tested
 on x86, PPC, s390, and I believe ia64.  It also works in
 lguest.

 It happens to use PIO, MMIO, and interrupts on x86 under
 KVM but other virtio implementations exist for other
 platforms.

 just for kicks, i've found and printed Rusty's paper
 about it. hope it's current :-)


 The other good thing to look at is the lguest
 documentation.  You can skip to just the virtio bits if
 you're so inclined.  It's really quite thoroughly
 documented.

 Regards,

 Anthony Liguori


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


Event channels in KVM?

2008-09-19 Thread Matt Anger
Does KVM have any interface similar to event-channels like Xen does?
Basically a way to send notifications between the host and guest.

Thanks,
-Matt
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html