From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882Ab1LUSsX (ORCPT ); Wed, 21 Dec 2011 13:48:23 -0500 Received: from sous-sol.org ([216.99.217.87]:58607 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753033Ab1LUSsV (ORCPT ); Wed, 21 Dec 2011 13:48:21 -0500 Date: Wed, 21 Dec 2011 10:48:11 -0800 From: Chris Wright To: "Hao, Xudong" Cc: Chris Wright , "dwmw2@infradead.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Zhang, Xiantao" , "kvm@vger.kernel.org" Subject: Re: [PATCH] intel-iommu: Add device info into list before doing context mapping Message-ID: <20111221184811.GC961@sequoia.sous-sol.org> References: <20111220160730.GD30205@sequoia.sous-sol.org> <20111221184108.GB961@sequoia.sous-sol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111221184108.GB961@sequoia.sous-sol.org> User-Agent: Mutt/1.5.20 (2009-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Chris Wright (chrisw@sous-sol.org) wrote: > * Hao, Xudong (xudong.hao@intel.com) wrote: > > Yes, Chris, thanks your comments. > > How about this one? > > Yes, it gets the locking right. Sorry, I missed one other problem on the error path. You need to also update pdev->dev.archdata.iommu to NULL (otherwise it is left pointing to freed memory). > Also makes host device and guest assigned device go through the same order: > > alloc_devinfo and init > lock; place info on lists; unlock > domain_context_mapping() > > The patch itself is whitespace damaged and does not apply. Please fix > and feel free to add my: > > Acked-by: Chris Wright