From d5c98b0845d17920d5781bf29f8c3e10465c0875 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin <markmc@redhat.com> Date: Thu, 21 May 2009 17:08:32 -0700 Subject: [PATCH 03/15] kvm: qemu: device-assignment: don't use libkvm's private get_slot() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 <markmc@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit f2bc1b43758452d89709473bf40bd4cfe628574e) Signed-off-by: Chris Wright <chrisw@redhat.com> Bugzilla: 498084 Message-Id: <1242950924-30161-2-git-send-email-chrisw@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: applied Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Don Dutile <ddutile@redhat.com> --- 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 8b9767a..5b2ccea 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, -- 1.6.3.rc4.29.g8146