iommu/amd: Don't clear DTE flags when modifying it
authorJoerg Roedel <jroedel@suse.de>
Tue, 20 Oct 2015 12:59:36 +0000 (14:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 18:12:58 +0000 (10:12 -0800)
commit8e7439f32a99a5600fd8d37ca2cc1e93ea6766c1
tree273a2a0252a8643d40a7ca6f9680efb005bee642
parent7d304ceb538097825a3d253d1992ff39ed6c551d
iommu/amd: Don't clear DTE flags when modifying it

commit cbf3ccd09d683abf1cacd36e3640872ee912d99b upstream.

During device assignment/deassignment the flags in the DTE
get lost, which might cause spurious faults, for example
when the device tries to access the system management range.
Fix this by not clearing the flags with the rest of the DTE.

Reported-by: G. Richard Bellamy <rbellamy@pteradigm.com>
Tested-by: G. Richard Bellamy <rbellamy@pteradigm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c
drivers/iommu/amd_iommu_types.h