Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440312

Re: [PATCH] iommu/amd: Fix unity mapping initialization race

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu/amd: Fix unity mapping initialization race
Date Mon, 11 Jul 2016 09:30:01 +0200
Message-ID <rTDPb-3Uh-1@gated-at.bofh.it> (permalink)
References <rRXyG-2Wq-35@gated-at.bofh.it> <rTlpf-6S-9@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1468221599; bh=8uJouBY/ToWyri5bT/dHVTFOyGRzZhmqrUsCpMyzGTI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gv4qfYwpNCN0nHv7vyo2geLlpF1amKCxO6i1vs6Naec3V6gh/9emBlMZzIbm2wmUt 6pnPWLFt/Zd2QT/lJTvcj2xHRuAVMwIwBk+WGi4NFKwUW6iMjiaZhjg0UVzkp649SZ avES2FfzM67KkYS5UFISo57xEx7xeo37fyLpS9LY9+7zQVjyNikD/b7BG8tMcJIfh6 /1RaoxO8hhY7LSDCEWdqt5Z7hSZHB7B4/XyXUXKvW68GiuMlguwO7ora3zCt15j243 7DHndEUlumMEl4vsgIiyujpOdZ8V//iorfT3+NV2AHEyUGNTIiWbHbP7B6poVTtxO/ JIAKome6IIGmA==
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc iommu@lists.linux-foundation.org, Joerg Roedel <jroedel@suse.de>, linux-kernel@vger.kernel.org, stable@vger.kernel.org
X-Original-Date Mon, 11 Jul 2016 09:19:59 +0200
X-Original-Message-ID <20160711071959.GB12639@8bytes.org>
X-Original-References <1467820838-5059-1-git-send-email-joro@8bytes.org> <57823445.1020808@iommu.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1440312

Show key headers only | View raw


On Sun, Jul 10, 2016 at 07:40:53PM +0800, Wan Zongshun wrote:
> Do you mean we need enable the V and TV bits to DTE entry after all
> DTEs tables were initialized completely?

Yes, this is what my patch does and what fixes the bug that was
reported on machines which have unity-mapping entries.

> I checked this function 'init_device_table_dma', and find it just set
> V and TV bit, to set translation info valid and DTE bits127:1 valid.

Right, if no other bits are set this blocks all DMA from the gives
device-id.

> So I just think all things it should to do are to allow DMA access,
> GPA-to-SPA translation should be active, why you add function
> comments below is to not allow DMA access and suppress all page
> faults?
> 
> /*
>  * Init the device table to not allow DMA access for devices and
>  * suppress all page faults
>  */

Yeah, that comment needs to be updated. Not all DMA is blocked and
page-faults are not suppressed at all. Thanks for noticing.



	Joerg

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] iommu/amd: Fix unity mapping initialization race Joerg Roedel <joro@8bytes.org> - 2016-07-06 18:10 +0200
  Re: [PATCH] iommu/amd: Fix unity mapping initialization race Wan Zongshun <vw@iommu.org> - 2016-07-10 13:50 +0200
    Re: [PATCH] iommu/amd: Fix unity mapping initialization race Joerg Roedel <joro@8bytes.org> - 2016-07-11 09:30 +0200
      Re: [PATCH] iommu/amd: Fix unity mapping initialization race Wan Zongshun <vw@iommu.org> - 2016-07-11 11:30 +0200
        Re: [PATCH] iommu/amd: Fix unity mapping initialization race Joerg Roedel <joro@8bytes.org> - 2016-07-11 11:40 +0200
          Re: [PATCH] iommu/amd: Fix unity mapping initialization race Wan ZongShun <mcuos.com@gmail.com> - 2016-07-11 12:10 +0200

csiph-web