From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 07/10] iommu/amd: copy old dev tables and do not touch dev tables Date: Tue, 29 Sep 2015 18:08:08 +0200 Message-ID: <20150929160808.GO3036@8bytes.org> References: <1443076656-31776-1-git-send-email-bhe@redhat.com> <1443076656-31776-8-git-send-email-bhe@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1443076656-31776-8-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Baoquan He Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Thu, Sep 24, 2015 at 02:37:33PM +0800, Baoquan He wrote: > + if ( !translation_pre_enabled() ) { > + iommu_disable(iommu); > + iommu_init_flags(iommu); > + iommu_set_device_table(iommu); > + iommu_enable_command_buffer(iommu); > + iommu_enable_event_buffer(iommu); > + iommu_set_exclusion_range(iommu); > + iommu_enable(iommu); > + iommu_flush_all_caches(iommu); > + } else { > + copy_dev_tables(); > + copy_command_buffer(); > + copy_event_buffer(); > + } Hmm, this leaves the old device-table in place and removes flushing the iommu-caches in kdump kernel, right? Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965436AbbI2QIW (ORCPT ); Tue, 29 Sep 2015 12:08:22 -0400 Received: from 8bytes.org ([81.169.241.247]:56696 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933631AbbI2QIK (ORCPT ); Tue, 29 Sep 2015 12:08:10 -0400 Date: Tue, 29 Sep 2015 18:08:08 +0200 From: Joerg Roedel To: Baoquan He Cc: iommu@lists.linux-foundation.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/10] iommu/amd: copy old dev tables and do not touch dev tables Message-ID: <20150929160808.GO3036@8bytes.org> References: <1443076656-31776-1-git-send-email-bhe@redhat.com> <1443076656-31776-8-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443076656-31776-8-git-send-email-bhe@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2015 at 02:37:33PM +0800, Baoquan He wrote: > + if ( !translation_pre_enabled() ) { > + iommu_disable(iommu); > + iommu_init_flags(iommu); > + iommu_set_device_table(iommu); > + iommu_enable_command_buffer(iommu); > + iommu_enable_event_buffer(iommu); > + iommu_set_exclusion_range(iommu); > + iommu_enable(iommu); > + iommu_flush_all_caches(iommu); > + } else { > + copy_dev_tables(); > + copy_command_buffer(); > + copy_event_buffer(); > + } Hmm, this leaves the old device-table in place and removes flushing the iommu-caches in kdump kernel, right? Joerg