From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 1/2] pci-assign: Re-order initfn for memory API Date: Thu, 22 Sep 2011 11:03:14 +0200 Message-ID: <4E7AF9D2.5090409@siemens.com> References: <20110922030909.4121.66872.stgit@s20.home> <20110922031236.4121.62055.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" , "avi@redhat.com" , "yongjie.ren@intel.com" To: Alex Williamson Return-path: Received: from thoth.sbs.de ([192.35.17.2]:25390 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821Ab1IVJDY (ORCPT ); Thu, 22 Sep 2011 05:03:24 -0400 In-Reply-To: <20110922031236.4121.62055.stgit@s20.home> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-09-22 05:12, Alex Williamson wrote: > We now need to scan PCI capabilities and setup an MSI-X page > before we walk the device resources since the overlay is now > setup during init instead of at the first mapping by the guest. > > Signed-off-by: Alex Williamson > --- > > hw/device-assignment.c | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/hw/device-assignment.c b/hw/device-assignment.c > index 288f80c..93913b3 100644 > --- a/hw/device-assignment.c > +++ b/hw/device-assignment.c > @@ -1603,6 +1603,14 @@ static int assigned_initfn(struct PCIDevice *pci_dev) > goto out; > } > > + if (assigned_device_pci_cap_init(pci_dev) < 0) > + goto out; > + > + /* intercept MSI-X entry page in the MMIO */ > + if (dev->cap.available & ASSIGNED_DEVICE_CAP_MSIX) > + if (assigned_dev_register_msix_mmio(dev)) > + goto out; > + Please adjust the coding style at this chance. Looks correct otherwise. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux