From: muli@il.ibm.com Subject: [v10] Userspace patches for PCI device assignment Date: Wed, 29 Oct 2008 14:19:55 +0200 Message-ID: <1225282801-3648-1-git-send-email-muli@il.ibm.com> Cc: kvm@vger.kernel.org, anthony@codemonkey.ws, weidong.han@intel.com, benami@il.ibm.com, muli@il.ibm.com, amit.shah@redhat.com, allen.m.kay@intel.com To: avi@redhat.com Return-path: Received: from mtagate5.de.ibm.com ([195.212.29.154]:47436 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753148AbYJ2MVQ (ORCPT ); Wed, 29 Oct 2008 08:21:16 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id m9TCK4vG102320 for ; Wed, 29 Oct 2008 12:20:04 GMT Received: from d12av03.megacenter.de.ibm.com (d12av03.megacenter.de.ibm.com [9.149.165.213]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9TCK4DI720936 for ; Wed, 29 Oct 2008 13:20:04 +0100 Received: from d12av03.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av03.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9TCK3Ar025024 for ; Wed, 29 Oct 2008 13:20:04 +0100 Sender: kvm-owner@vger.kernel.org List-ID: This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Changes from v9->v10: - really emove nr_assigned_devices and device_assignment_enabled and other cleanups Changes from v8->v9 in no particular order: - fixed DEBUG, removed uneeded headers - introduce USE_KVM_DEVICE_ASSIGNMENT modeled after KVM_USE_PIT, per aliguori's suggestion - only call term_printf from the monitor - implement markmc's suggestions: don't overflow dev->regions, fix disable_iommu bogosity, fix usage and comment with regards to -pcidevice format, and some other bits Changes from v7->v8 in in particular order: - various formatting fixes, DEBUG cleanups, cast removals, etc. - s/strncpy/snprintf/ - split initialization in two phases per aliguori's suggestion - bail out on errors when we can't limp on - do ioperm on every cpu and vcpu (Weidong Han) - use pwrite/pread where applicable - split r_virtbase into different fields for memory and IO - fix destruction of MMIO regions (Disheng Su and Weidong Han) Changes from v6->v7 in no particular order: - formatting changes: adhere to qemu style - use strncmp, strncpy etc. instead of the insecure ones - move from array to linked list - change iopl() to ioperm() (Weidong Han) - other small changes as suggested during the review of v6.