From patchwork Thu Jan 15 13:47:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 2483 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 n0FDhmOA020391 for ; Thu, 15 Jan 2009 05:43:48 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758009AbZAONrv (ORCPT ); Thu, 15 Jan 2009 08:47:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761672AbZAONru (ORCPT ); Thu, 15 Jan 2009 08:47:50 -0500 Received: from mail09.svc.cra.dublin.eircom.net ([159.134.118.25]:31753 "HELO mail09.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758009AbZAONrp (ORCPT ); Thu, 15 Jan 2009 08:47:45 -0500 Received: (qmail 44551 messnum 5668826 invoked from network[83.71.77.218/83-71-77-218-dynamic.b-ras1.srl.dublin.eircom.net]); 15 Jan 2009 13:47:44 -0000 Received: from 83-71-77-218-dynamic.b-ras1.srl.dublin.eircom.net (HELO blaa.localdomain) (83.71.77.218) by mail09.svc.cra.dublin.eircom.net (qp 44551) with SMTP; 15 Jan 2009 13:47:44 -0000 Received: by blaa.localdomain (Postfix, from userid 500) id BC1AC2E45C1; Thu, 15 Jan 2009 13:47:42 +0000 (GMT) From: Mark McLoughlin To: avi@redhat.com Cc: kvm@vger.kernel.org, Mark McLoughlin Subject: [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Date: Thu, 15 Jan 2009 13:47:30 +0000 Message-Id: <1232027262-21487-6-git-send-email-markmc@redhat.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1232027262-21487-5-git-send-email-markmc@redhat.com> References: <1232027262-21487-1-git-send-email-markmc@redhat.com> <1232027262-21487-2-git-send-email-markmc@redhat.com> <1232027262-21487-3-git-send-email-markmc@redhat.com> <1232027262-21487-4-git-send-email-markmc@redhat.com> <1232027262-21487-5-git-send-email-markmc@redhat.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org get_slot() isn't exported by libkvm, so we shouldn't be using it. The worst thing that can happen because of this change is that libkvm will spew a warning. It looks to me like that can't happen though. Fixes: qemu/hw/device-assignment.c:161: warning: implicit declaration of function ‘get_slot’ Signed-off-by: Mark McLoughlin --- qemu/hw/device-assignment.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index d5eb7b2..f8faf5b 100644 --- a/qemu/hw/device-assignment.c +++ b/qemu/hw/device-assignment.c @@ -157,12 +157,9 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num, region->e_physbase = e_phys; region->e_size = e_size; - if (!first_map) { - int slot = get_slot(old_ephys); - if (slot != -1) - kvm_destroy_phys_mem(kvm_context, old_ephys, - TARGET_PAGE_ALIGN(old_esize)); - } + if (!first_map) + kvm_destroy_phys_mem(kvm_context, old_ephys, + TARGET_PAGE_ALIGN(old_esize)); if (e_size > 0) ret = kvm_register_phys_mem(kvm_context, e_phys,