From patchwork Sun May 17 15:43:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 24316 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4HFhXUi012983 for ; Sun, 17 May 2009 15:43:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754447AbZEQPnb (ORCPT ); Sun, 17 May 2009 11:43:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754376AbZEQPna (ORCPT ); Sun, 17 May 2009 11:43:30 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:44884 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbZEQPn3 (ORCPT ); Sun, 17 May 2009 11:43:29 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e7.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4HFWHR9023421 for ; Sun, 17 May 2009 11:32:17 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4HFhUun253336 for ; Sun, 17 May 2009 11:43:30 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4HFfTwg030138 for ; Sun, 17 May 2009 11:41:30 -0400 Received: from localhost.localdomain (sig-9-65-8-189.mts.ibm.com [9.65.8.189]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n4HFfPcP030035; Sun, 17 May 2009 11:41:29 -0400 From: Anthony Liguori To: kvm@vger.kernel.org Cc: Glauber Costa , "Han, Weidong" , Avi Kivity , Anthony Liguori Subject: [PATCH 03/17] Fix build breakage on non-device-deassignment capable host kernels Date: Sun, 17 May 2009 10:43:04 -0500 Message-Id: <1242574999-20887-4-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1242574999-20887-1-git-send-email-aliguori@us.ibm.com> References: <1242574999-20887-1-git-send-email-aliguori@us.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Han, Weidong kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined. Signed-off-by: Weidong Han Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori diff --git a/hw/device-assignment.c b/hw/device-assignment.c index b7cbcec..56d70b4 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -551,6 +551,7 @@ static int assign_irq(AssignedDevInfo *adev) static void deassign_device(AssignedDevInfo *adev) { +#ifdef KVM_CAP_DEVICE_DEASSIGNMENT struct kvm_assigned_pci_dev assigned_dev_data; AssignedDevice *dev = adev->assigned_dev; int r; @@ -563,6 +564,7 @@ static void deassign_device(AssignedDevInfo *adev) if (r < 0) fprintf(stderr, "Failed to deassign device \"%s\" : %s\n", adev->name, strerror(-r)); +#endif } void remove_assigned_device(AssignedDevInfo *adev)