From mboxrd@z Thu Jan 1 00:00:00 1970 From: muli@il.ibm.com Subject: [v8] Userspace patches for PCI device assignment Date: Tue, 28 Oct 2008 12:06:44 +0200 Message-ID: <1225188410-2222-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 mtagate1.uk.ibm.com ([194.196.100.161]:44147 "EHLO mtagate1.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136AbYJ1KH4 (ORCPT ); Tue, 28 Oct 2008 06:07:56 -0400 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id m9SA7tnR029543 for ; Tue, 28 Oct 2008 10:07:55 GMT Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9SA7sfe1220844 for ; Tue, 28 Oct 2008 10:07:55 GMT Received: from d06av03.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9SA6rM7012307 for ; Tue, 28 Oct 2008 10:06:54 GMT Sender: kvm-owner@vger.kernel.org List-ID: [v8] Userspace patches for PCI device assignment This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. 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.