Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820Ab1EIU51 (ORCPT ); Mon, 9 May 2011 16:57:27 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:53343 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866Ab1EIU5Z (ORCPT ); Mon, 9 May 2011 16:57:25 -0400 Message-ID: <4DC85519.8020303@kernel.org> Date: Mon, 09 May 2011 13:56:57 -0700 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: David Woodhouse CC: Yinghai Lu , Kalle Valo , Jesse Barnes , "iommu@lists.linux-foundation.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] pci, dmar: flush IOTLB before exit domain References: <4DC34B21.9040203@oracle.com> <1304952530.30435.16.camel@i7.infradead.org> In-Reply-To: <1304952530.30435.16.camel@i7.infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090208.4DC85524.0020,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 30 On 05/09/2011 07:48 AM, David Woodhouse wrote: > On Thu, 2011-05-05 at 18:13 -0700, Yinghai Lu wrote: >> @@ -3252,6 +3252,9 @@ static int device_notifier(struct notifi >> return 0; >> >> if (action == BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) { >> + /* before we remove dev with domain, flush IOTLB */ >> + flush_unmaps(); >> + >> domain_remove_one_dev_info(domain, pdev); >> >> if (!(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE) && > > That calls flush_unmaps() without the async_umap_flush_lock held, > doesn't it? A few days ago I asked someone else to test this candidate > patch for a similar issue: > > http://david.woodhou.se/flush-unmaps-on-unbind.patch > Your patch works. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/