lkml.org 
[lkml]   [2017]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 11/13] iommu/amd: Don't copy GCR3 table root pointer
On Tue, Aug 01, 2017 at 07:37:27PM +0800, Baoquan He wrote:
> @@ -908,6 +911,14 @@ static int copy_device_table(void)
> old_dev_tbl_cpy[devid].data[1]
> = old_devtb[devid].data[1];
> __set_bit(dom_id, amd_iommu_pd_alloc_bitmap);
> + /* If gcr3 table existed, mask it out */
> + if (old_devtb[devid].data[0] & DTE_FLAG_GV) {
> + tmp = DTE_GCR3_VAL_B(~0ULL) << DTE_GCR3_SHIFT_B;
> + tmp |= DTE_GCR3_VAL_C(~0ULL) << DTE_GCR3_SHIFT_C;
> + old_dev_tbl_cpy[devid].data[1] &= ~tmp;
> + tmp = DTE_GCR3_VAL_A(~0ULL) << DTE_GCR3_SHIFT_A;
> + old_dev_tbl_cpy[devid].data[0] &= ~tmp;

You also need to clear the DTE_FLAG_GV bit.

\
 
 \ /
  Last update: 2017-08-04 14:28    [W:0.109 / U:3.612 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site