From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang Subject: [PATCH 14 of 16] libxl: bind virtual bdf to physical bdf after device assignment Date: Fri, 23 Dec 2011 12:29:23 +0100 Message-ID: <7ac92c11a11a4dbdf85e.1324639763@gran.amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: JBeulich@suse.com, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com, keir@xen.org Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Wei Wang # Date 1324569415 -3600 # Node ID 7ac92c11a11a4dbdf85ef503445128be861cb400 # Parent 00bdad5dfb7f5efd0b1cc54622b3ccb1b1b1b16f libxl: bind virtual bdf to physical bdf after device assignment Signed-off-by: Wei Wang diff -r 00bdad5dfb7f -r 7ac92c11a11a tools/libxl/libxl_pci.c --- a/tools/libxl/libxl_pci.c Thu Dec 22 16:56:52 2011 +0100 +++ b/tools/libxl/libxl_pci.c Thu Dec 22 16:56:55 2011 +0100 @@ -735,6 +735,13 @@ out: LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc, "xc_assign_device failed"); return ERROR_FAIL; } + if (LIBXL__DOMAIN_IS_TYPE(gc, domid, HVM)) { + rc = xc_domain_bind_pt_bdf(ctx->xch, domid, pcidev->vdevfn, pcidev_encode_bdf(pcidev)); + if ( rc ) { + LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc, "xc_domain_bind_pt_bdf failed"); + return ERROR_FAIL; + } + } } if (!starting)