From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [RFC v1 5/5] Call irqbypass update routine when updating irqfd Date: Fri, 10 Jul 2015 08:11:01 -0600 Message-ID: <1436537461.1391.255.camel@redhat.com> References: <1436497207-4786-1-git-send-email-feng.wu@intel.com> <1436497207-4786-6-git-send-email-feng.wu@intel.com> <1436498778.1391.246.camel@redhat.com> <559FBEFE.4000202@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "Wu, Feng" , "kvm@vger.kernel.org" , "joro@8bytes.org" , "avi.kivity@gmail.com" , "eric.auger@linaro.org" To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754847AbbGJOLD (ORCPT ); Fri, 10 Jul 2015 10:11:03 -0400 In-Reply-To: <559FBEFE.4000202@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2015-07-10 at 14:47 +0200, Paolo Bonzini wrote: > > On 10/07/2015 10:28, Wu, Feng wrote: > > > Yes, you are right. All we need is the producer information which has been > > > passed in the register routine. And we can easily make this update logic > > > inside the consumer. Thanks for your comments! > > > > BTW, Paolo & Alex, in VFIO framework, how can we know a vCPU or a guest > > has assigned devices to it? > > See here: > http://article.gmane.org/gmane.comp.emulators.kvm.devel/137930/raw In general, VFIO has zero visibility into KVM. VFIO doesn't know or care what the userspace driver is, whether it's QEMU/KVM, a set of ruby bindings for VFIO, a DPDK library, etc. As Paolo points out, KVM does have ways to be told about assigned devices from userspace and probe some properties, like whether the IOMMU allows non-coherent DMA. These are handled by the KVM-VFIO pseudo device (virt/kvm/vfio.c). Thanks, Alex