From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758736AbZHRLzT (ORCPT ); Tue, 18 Aug 2009 07:55:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758693AbZHRLzS (ORCPT ); Tue, 18 Aug 2009 07:55:18 -0400 Received: from mx2.redhat.com ([66.187.237.31]:36456 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758662AbZHRLzQ (ORCPT ); Tue, 18 Aug 2009 07:55:16 -0400 Message-ID: <4A8A9686.1070401@redhat.com> Date: Tue, 18 Aug 2009 14:54:46 +0300 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: "Michael S. Tsirkin" CC: Gregory Haskins , Ingo Molnar , Gregory Haskins , kvm@vger.kernel.org, alacrityvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver objects References: <20090817150844.GA3307@elte.hu> <4A89B08A.4010103@gmail.com> <20090818095313.GC13878@redhat.com> <4A8A7BB9.2020906@redhat.com> <20090818100945.GD13878@redhat.com> <4A8A7EE5.6090209@redhat.com> <20090818102840.GF13878@redhat.com> <4A8A8631.1040006@redhat.com> <20090818110708.GG13878@redhat.com> <4A8A8D6D.9040909@redhat.com> <20090818114914.GA17721@redhat.com> In-Reply-To: <20090818114914.GA17721@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/18/2009 02:49 PM, Michael S. Tsirkin wrote: > >> The host kernel sees a hypercall vmexit. How does it know if it's a >> nested-guest-to-guest hypercall or a nested-guest-to-host hypercall? >> The two are equally valid at the same time. >> > Here is how this can work - it is similar to MSI if you like: > - by default, the device uses pio kicks > - nested guest driver can enable hypercall capability in the device, > probably with pci config cycle > - guest userspace (hypervisor running in guest) will see this request > and perform pci config cycle on the "real" device, telling it to which > nested guest this device is assigned > So far so good. > - host userspace (hypervisor running in host) will see this. > it now knows both which guest the hypercalls will be for, > and that the device in question is an emulated one, > and can set up kvm appropriately > No it doesn't. The fact that one device uses hypercalls doesn't mean all hypercalls are for that device. Hypercalls are a shared resource, and there's no way to tell for a given hypercall what device it is associated with (if any). >> The host knows whether the guest or nested guest are running. If the >> guest is running, it's a guest-to-host hypercall. If the nested guest >> is running, it's a nested-guest-to-guest hypercall. We don't have >> nested-guest-to-host hypercalls (and couldn't unless we get agreement on >> a protocol from all hypervisor vendors). >> > Not necessarily. What I am saying is we could make this protocol part of > guest paravirt driver. the guest that loads the driver and enables the > capability, has to agree to the protocol. If it doesn't want to, it does > not have to use that driver. > It would only work for kvm-on-kvm. -- error compiling committee.c: too many arguments to function