From: Keir Fraser Subject: Re: [PATCH] AMD IOMMU: Defer IO pagetable construction until device assignment Date: Wed, 02 Apr 2008 15:52:07 +0100 Message-ID: References: <1207145594.3980.28.camel@gran.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1207145594.3980.28.camel@gran.amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Wei Wang2 , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/4/08 15:13, "Wei Wang2" wrote: > During HVM domain creation, I/O page tables are filled by coping p2m > entries from p2m table, which is a useless step for non-passthru domain. > This patch defers I/O page table construction until the moment of device > assignment. In case that pci devices are never assigned or hot plugged, > the unnecessary duplication will be avoid. You can't duplicate p2m_lock() and p2m_unlock(). Why do you need to protect your new function with that lock anyway? -- Keir