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


Groups > linux.kernel > #1440395

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

From Wan Zongshun <vw@iommu.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu/amd: Fix unity mapping initialization race
Date 2016-07-11 11:30 +0200
Message-ID <rTFHj-55x-13@gated-at.bofh.it> (permalink)
References <rRXyG-2Wq-35@gated-at.bofh.it> <rTlpf-6S-9@gated-at.bofh.it> <rTDPb-3Uh-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016年07月11日 15:19, Joerg Roedel wrote:
> 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.

Okay, this patch should also better to general case not only unity-mapping.

How about the interrupt remap function? Do we need same considering for 
IV bit enable for interrupt remap?

>
>> 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.

Sorry, why you still say this 'init_device_table_dma' can block DMA?
I just think this function will enable DMA transfer, since  we set the V 
and TV bits, right? or I misunderstand what "block DMA" mean?

>
>> 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