From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756183AbbHFVGN (ORCPT ); Thu, 6 Aug 2015 17:06:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50269 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390AbbHFVGM (ORCPT ); Thu, 6 Aug 2015 17:06:12 -0400 Message-ID: <1438888787.4023.116.camel@redhat.com> Subject: Re: [PATCH 00/26] iommu/vt-d: Clean up device<->domain attachment From: Alex Williamson To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, David Woodhouse , linux-kernel@vger.kernel.org, jroedel@suse.de Date: Thu, 06 Aug 2015 13:19:47 -0600 In-Reply-To: <1438787937-7340-1-git-send-email-joro@8bytes.org> References: <1438787937-7340-1-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-08-05 at 17:18 +0200, Joerg Roedel wrote: > Hi, > > here is a (bigger than I expected) patch-set which cleans up > the code to attach and detach domains to iommus in the Intel > VT-d driver. > > In particular, the patch-set does: > > * Remove special cases around the handling of > various domain types and align their handling > where possible > > * Rework the data structures for the domain<->iommu > relation to better match with its usage. This > allowed to get rid of a couple of search loops. > > * Make the domain attachment and detachment path > to/from an iommu more symmetric. This makes the > code easier to understand and maintain. > > * Rework and simplify the locking around the > domain<->iommu attachment/detachment path. > > A few rough edges and special cases are still left, but I > expect that these will be removed with the conversion to > default domains. > > I tested the code with some additional debug code to make > sure that domain and domain-id allocation/deallocation works > as expected. > > As test I booted a kernel with the patches (with and > without iommu=pt) and ran a KVM guest with devices assigned. > No lockdep warning popped up and the debug output was also > fine. But of course this is no guarantee that there are no > issues left, so I am happy about feedback. Please review! Nice cleanup, Joerg! A few minor comments in follow-up to the individual patches. Thanks, Alex