Skip to content
Snippets Groups Projects
Commit c5b0320b authored by Alejandro Jimenez's avatar Alejandro Jimenez Committed by Joerg Roedel
Browse files

iommu/amd: Preserve default DTE fields when updating Host Page Table Root


When updating the page table root field on the DTE, avoid overwriting any
bits that are already set. The earlier call to make_clear_dte() writes
default values that all DTEs must have set (currently DTE[V]), and those
must be preserved.

Currently this doesn't cause problems since the page table root update is
the first field that is set after make_clear_dte() is called, and
DTE_FLAG_V is set again later along with the permission bits (IR/IW).
Remove this redundant assignment too.

Fixes: fd5dff9d ("iommu/amd: Modify set_dte_entry() to use 256-bit DTE helpers")
Signed-off-by: default avatarAlejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: default avatarDheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Reviewed-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20250106191413.3107140-1-alejandro.j.jimenez@oracle.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent d082ecbc
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment