From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [v10] Userspace patches for PCI device assignment Date: Thu, 30 Oct 2008 07:44:27 -0500 Message-ID: <4909AC2B.2010709@codemonkey.ws> References: <1225282801-3648-1-git-send-email-muli@il.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, kvm@vger.kernel.org, weidong.han@intel.com, benami@il.ibm.com, amit.shah@redhat.com, allen.m.kay@intel.com To: muli@il.ibm.com Return-path: Received: from rn-out-0910.google.com ([64.233.170.191]:44745 "EHLO rn-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753808AbYJ3Mod (ORCPT ); Thu, 30 Oct 2008 08:44:33 -0400 Received: by rn-out-0910.google.com with SMTP id k40so368918rnd.17 for ; Thu, 30 Oct 2008 05:44:31 -0700 (PDT) In-Reply-To: <1225282801-3648-1-git-send-email-muli@il.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: muli@il.ibm.com wrote: > This patchset enables device assignment for KVM hosts for PCI > devices. It uses the Intel IOMMU by default if available. > This is still broken wrt CPU hotplug. If a new CPU comes online, it won't have it's ioperm mask set correct and it will crash QEMU. You need to keep track of the current ioperm settings and whenever a new VCPU comes online, issue an ioperm. Regards, Anthony Liguori > 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. >