From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbdG1LOn (ORCPT ); Fri, 28 Jul 2017 07:14:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:55545 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751751AbdG1LOm (ORCPT ); Fri, 28 Jul 2017 07:14:42 -0400 Date: Fri, 28 Jul 2017 13:14:39 +0200 From: Joerg Roedel To: Baoquan He Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 10/13] iommu/amd: Allocate memory below 4G for dev table if translation pre-enabled Message-ID: <20170728111439.GB3431@suse.de> References: <1500627551-12930-1-git-send-email-bhe@redhat.com> <1500627551-12930-11-git-send-email-bhe@redhat.com> <20170727155550.GO3610@suse.de> <20170728090619.GM24304@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170728090619.GM24304@x1> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 28, 2017 at 05:06:19PM +0800, Baoquan He wrote: > Do you mean the allocation of amd_iommu_dev_table in > early_amd_iommu_init() also need be addressed for 1st kernel? Seems we > don't make sure that for 1st kernel, like adding GFP_DMA32 flag when > allocate amd_iommu_dev_table in amd_iommu_dev_table > early_amd_iommu_init(). Yes, exactly, the first device table also needs to be allocated with GFP_DMA32 so that it ends up below 4GB.