From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMZcg-0007aA-C6 for qemu-devel@nongnu.org; Wed, 27 Aug 2014 05:34:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMZcZ-0003AH-TU for qemu-devel@nongnu.org; Wed, 27 Aug 2014 05:34:34 -0400 Received: from mga01.intel.com ([192.55.52.88]:20624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMZcZ-0003A9-Nx for qemu-devel@nongnu.org; Wed, 27 Aug 2014 05:34:27 -0400 Message-ID: <53FDA61F.9080806@intel.com> Date: Wed, 27 Aug 2014 17:34:23 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 References: <1409130787-625-1-git-send-email-tiejun.chen@intel.com> <53FDA4F1.5050608@redhat.com> In-Reply-To: <53FDA4F1.5050608@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/1] qemu:pci-assign: try to pci-assign.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , aliguori@amazon.com, mst@redhat.com, lcapitulino@redhat.com, eblake@redhat.com, alex.williamson@redhat.com, pbonzini@redhat.com Cc: qemu-devel@nongnu.org On 2014/8/27 17:29, Laszlo Ersek wrote: > On 08/27/14 11:13, Tiejun Chen wrote: >> As you know I'm working on supporting IGD passthrough. >> >> Here we need load VGABIOS to work out IGD case. Obviously something may >> be duplicated to kvm codes, we should unify some codes but looks its not >> easy to finish that in short time. So as Michael suggestion, at least >> we'd better split assigned_dev_load_option_rom to reuse on both kvm >> and xen. >> >> I don't finish all IGD stuff patches but here I'd like to post >> some related codes to show how to use assigned_dev_load_option_rom() >> lately. >> >> +static int get_vgabios(XenPCIPassthroughState *s, void *ptr, >> + XenHostPCIDevice *dev) >> +{ >> + int size = 0; >> + >> + size = dev_load_option_rom(&s->dev, OBJECT(dev), ptr, dev->domain, >> + dev->bus, dev->dev, dev->func); >> + >> + return size; >> +} >> + >> +int xen_pt_setup_vga(XenPCIPassthroughState *s, XenHostPCIDevice *dev) >> +{ >> + void *bios = NULL; >> + int bios_size = 0; >> + int rc = 0; >> + >> + if (!is_vga_passthrough(dev)) { >> + return rc; >> + } >> + >> + bios_size = get_vgabios(s, bios, dev); >> + if (!bios || !bios_size) { >> + XEN_PT_ERR(NULL, "VGA: getting VBIOS!\n"); >> + rc = -1; >> + goto out; >> + } >> ... >> >> ---------------------------------------------------------------- >> Tiejun Chen (1): >> hw/pci-assign: split pci-assign.c >> >> hw/i386/kvm/pci-assign.c | 170 +++-------------------------------------------------------------------------------------------------------------------------------------- >> include/hw/pci/pci_assign.h | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 207 insertions(+), 167 deletions(-) >> create mode 100644 include/hw/pci/pci_assign.h >> >> Thanks >> Tiejun >> > > Just to make it clear: I'm assuming that you CC'd me because > get-maintainer.pl listed my name, as a committer. I had one series in Yes. > this area that improved error message propagation and error reporting. > Was that acked? If yes, I think I need to rebase on yours. > I have minimal knowledge about device assignment proper, so I will not > review your patch. Please don't wait for my review, and if you have > further patches in the area, there's no need to CC me -- I can't help. > Thanks for your info. Tiejun