iommu/vt-d: Check capability before disabling protected memory
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 20 Mar 2019 01:58:33 +0000 (09:58 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 22 Mar 2019 11:02:26 +0000 (12:02 +0100)
commit5bb71fc790a88d063507dc5d445ab8b14e845591
treec21370e76c78b268cc3d3b00d9ccf3559d723d65
parent80ef4464d5e27408685e609d389663aad46644b9
iommu/vt-d: Check capability before disabling protected memory

The spec states in 10.4.16 that the Protected Memory Enable
Register should be treated as read-only for implementations
not supporting protected memory regions (PLMR and PHMR fields
reported as Clear in the Capability register).

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: mark gross <mgross@intel.com>
Suggested-by: Ashok Raj <ashok.raj@intel.com>
Fixes: f8bab73515ca5 ("intel-iommu: PMEN support")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c