qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] virtio: Implement userspace forwarding for host notifiers
Date: Thu, 19 Nov 2015 12:41:14 +0100

On Thu, 19 Nov 2015 13:18:13 +0300
Pavel Fedin <address@hidden> wrote:

>  Hello!
> 
> > Looks like this would be ok for virtio-ccw (as it does not call
> > virtio_queue_set_host_notifier_forwarding)
> 
>  Yes, this is the reason why i intentionally did not insert extra logic into 
> virtio_queue_set_host_notifier_fd_handler(), but made
> it into separate function. I don't know whether KVM on S390 reports 
> KVM_CAP_IOEVENTFD.

Yes, it does.

> 
> > Question is might something like this for virtio-ccw useful as well?
> 
>  Yes, provided you have something to bind userspace actions to. Looks like 
> S390 doesn't use MMIO here at all, but some obscure (for
> me) thing, called "subchannel".

:) Think of a "subchannel" as a communication channel between the
operating system and the device. It is used to transmit commands that
can do various things like read, write, or configure stuff. Basically,
stuff that is handled via mmio on other platforms.

>  Another question is whether you can have kernel without KVM_CAP_IOEVENTFD on 
> S390. Was it introduced since the beginning, or some
> time later?

There are old kernels around that have the needed basic support for the
channel subsystem (needed for virtio-ccw), but not the ioeventfd
support.

> 
> > We cannot use memory_region, though, we would need to handle that in our
> > diagnose code.
> 
>  Sorry, this phrase is a complete mystery to me, i have no idea what is 
> diagnose code, as well as have never seen S390 in real life.

"diagnose" is a hypercall on the s390. For virtio-ccw, guest->host
notification happens via a special hypercall (diagnose 0x500).
Therefore, we need to hook into our implementation of that diagnose for
our handling.

> I think if you have motivation, you could implement userspace forwarding for 
> ccw yourself, since you know the thing and know how to
> do it. For MMIO it was indeed very simple.

I'll take a peek at your patch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]