From: Paolo Bonzini Subject: Re: [PATCH RFC] kvm/hypercall: Add the PVI hypercall support Date: Fri, 14 Oct 2016 14:29:46 -0400 (EDT) Message-ID: <324343827.3688430.1476469785994.JavaMail.zimbra@redhat.com> References: <1476448259-99631-1-git-send-email-wei.w.wang@intel.com> <98c0bfa2-1fd2-493d-3aef-c2a74d8282c3@redhat.com> <286AC319A985734F985F78AFA26841F736E2FF04@shsmsx102.ccr.corp.intel.com> <286AC319A985734F985F78AFA26841F736E2FF96@shsmsx102.ccr.corp.intel.com> <33c4d5db-f2e7-f410-b820-6549c3996149@redhat.com> <286AC319A985734F985F78AFA26841F736E30126@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mst@redhat.com, marcandre lureau , stefanha@redhat.com To: Wei W Wang Return-path: Received: from mx4-phx2.redhat.com ([209.132.183.25]:47091 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753456AbcJNScZ (ORCPT ); Fri, 14 Oct 2016 14:32:25 -0400 In-Reply-To: <286AC319A985734F985F78AFA26841F736E30126@shsmsx102.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Friday, October 14, 2016 6:51:53 PM, Wei W Wang" wrote: > When it comes to the "guest virtio<-->guest virtio" notification case, it > should be clear where the interrupt should go to (e.g. which specific device > interrupt it is), rather than just trapping to the host. So, instead of > simply trapping to the host by an MMIO write, hypercall gives us the > flexibility to pass some parameters. What parameters do you need? There is no difference between "which specific device interrupt you are raising" and "which specific virtqueue you are kicking". The latter uses ioeventfd just fine, and VFIO also uses eventfd successfully. > The GSI number is assigned in QEMU. By making use of the traditional irqfd > implementation code in QEMU, a virtq's GSI is stored in the irqfd struct - > "VirtIOIRQFD->virq", we can pass it or them(the multi-queue case) to the > sender. I prefer GSI, because the KVM irq routing table is indexed by GSI. > Would this be acceptable? > Alternatively, we can pass the vector of the virtq. No, the hypercall will not be accepted in any form. The established protocols for communication between KVM and the outside world, including other KVM instances, are MMIO write and irqfd. Paolo