From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzj7z-0002Md-72 for qemu-devel@nongnu.org; Wed, 25 Jun 2014 05:04:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzj7r-00051k-Nh for qemu-devel@nongnu.org; Wed, 25 Jun 2014 05:04:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzj7r-00051Z-Gp for qemu-devel@nongnu.org; Wed, 25 Jun 2014 05:04:19 -0400 Date: Wed, 25 Jun 2014 12:04:20 +0300 From: "Michael S. Tsirkin" Message-ID: <20140625090420.GG32652@redhat.com> References: <1403662641-28526-1-git-send-email-tiejun.chen@intel.com> <1403662641-28526-3-git-send-email-tiejun.chen@intel.com> <20140625064545.GB25563@redhat.com> <53AA8404.8040708@intel.com> <20140625082850.GB32652@redhat.com> <53AA8AAB.30100@intel.com> <20140625084347.GE32652@redhat.com> <53AA8CC2.7090406@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53AA8CC2.7090406@intel.com> Subject: Re: [Qemu-devel] [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Chen, Tiejun" Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, stefano.stabellini@eu.citrix.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, Kelly.Zytaruk@amd.com, yang.z.zhang@intel.com, anthony@codemonkey.ws, anthony.perard@citrix.com, pbonzini@redhat.com On Wed, Jun 25, 2014 at 04:48:02PM +0800, Chen, Tiejun wrote: > On 2014/6/25 16:43, Michael S. Tsirkin wrote: > >On Wed, Jun 25, 2014 at 04:39:07PM +0800, Chen, Tiejun wrote: > >>>In fact it's exactly what passthrough does. > >>>I wonder if more bits from ./hw/i386/kvm/pci-assign.c > >>>can be reused. How do you poke at the host device? sysfs? > >> > >>Yes, sysfs. > >> > >>Thanks > >>Tiejun > > > >Then you should be able to re-use large chunks of > >./hw/i386/kvm/pci-assign.c: basically everything > >that deals with emulation. > > Do you mean those hooks to get info from the real device? Xen have its own > wrapper, xen_host_pci_get_block(), so we always go there in xen scenario. > > Thanks > Tiejun Yes and that's not good. We have two pieces of code doing mostly identical things slightly differently. hw/i386/kvm/pci-assign.c is a bit younger so it's cleaner, but these really need to be unified. > > > > > > > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge Date: Wed, 25 Jun 2014 12:04:20 +0300 Message-ID: <20140625090420.GG32652@redhat.com> References: <1403662641-28526-1-git-send-email-tiejun.chen@intel.com> <1403662641-28526-3-git-send-email-tiejun.chen@intel.com> <20140625064545.GB25563@redhat.com> <53AA8404.8040708@intel.com> <20140625082850.GB32652@redhat.com> <53AA8AAB.30100@intel.com> <20140625084347.GE32652@redhat.com> <53AA8CC2.7090406@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <53AA8CC2.7090406@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Chen, Tiejun" Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, stefano.stabellini@eu.citrix.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, Kelly.Zytaruk@amd.com, yang.z.zhang@intel.com, anthony@codemonkey.ws, anthony.perard@citrix.com, pbonzini@redhat.com List-Id: xen-devel@lists.xenproject.org On Wed, Jun 25, 2014 at 04:48:02PM +0800, Chen, Tiejun wrote: > On 2014/6/25 16:43, Michael S. Tsirkin wrote: > >On Wed, Jun 25, 2014 at 04:39:07PM +0800, Chen, Tiejun wrote: > >>>In fact it's exactly what passthrough does. > >>>I wonder if more bits from ./hw/i386/kvm/pci-assign.c > >>>can be reused. How do you poke at the host device? sysfs? > >> > >>Yes, sysfs. > >> > >>Thanks > >>Tiejun > > > >Then you should be able to re-use large chunks of > >./hw/i386/kvm/pci-assign.c: basically everything > >that deals with emulation. > > Do you mean those hooks to get info from the real device? Xen have its own > wrapper, xen_host_pci_get_block(), so we always go there in xen scenario. > > Thanks > Tiejun Yes and that's not good. We have two pieces of code doing mostly identical things slightly differently. hw/i386/kvm/pci-assign.c is a bit younger so it's cleaner, but these really need to be unified. > > > > > > > >