From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH 0/3] generic hypercall support Date: Tue, 05 May 2009 18:02:14 +0300 Message-ID: <4A0054F6.30701@redhat.com> References: <20090505132005.19891.78436.stgit@dev.haskins.net> <4A0040C0.1080102@redhat.com> <4A0041BA.6060106@novell.com> <4A004676.4050604@redhat.com> <4A0049CD.3080003@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Gregory Haskins , linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Gregory Haskins Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55744 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996AbZEEPCS (ORCPT ); Tue, 5 May 2009 11:02:18 -0400 In-Reply-To: <4A0049CD.3080003@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Gregory Haskins wrote: > I see. I had designed it slightly different where KVM could assign any > top level vector it wanted and thus that drove the guest-side interface > you see here to be more "generic hypercall". However, I think your > proposal is perfectly fine too and it makes sense to more narrowly focus > these calls as specifically "dynamic"...as thats the only vectors that > we could technically use like this anyway. > > So rather than allocate a top-level vector, I will add "KVM_HC_DYNAMIC" > to kvm_para.h, and I will change the interface to follow suit (something > like s/hypercall/dynhc). Sound good? > Yeah. Another couple of points: - on the host side, we'd rig this to hit an eventfd. Nothing stops us from rigging pio to hit an eventfd as well, giving us kernel handling for pio trigger points. - pio actually has an advantage over hypercalls with nested guests. Since hypercalls don't have an associated port number, the lowermost hypervisor must interpret a hypercall as going to a guest's hypervisor, and not any lower-level hypervisors. What it boils down to is that you cannot use device assignment to give a guest access to a virtio/vbus device from a lower level hypervisor. (Bah, that's totally unreadable. What I want is instead of hypervisor[eth0/virtio-server] ----> intermediate[virtio-driver/virtio-server] ----> guest[virtio-driver] do hypervisor[eth0/virtio-server] ----> intermediate[assign virtio device] ----> guest[virtio-driver] well, it's probably still unreadable) -- error compiling committee.c: too many arguments to function