diff options
author | Suravee Suthikulpanit <[email protected]> | 2020-09-16 11:17:20 +0000 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2020-09-18 11:17:19 +0200 |
commit | e97685abd5d711c885053d4949178f7ab9acbaef (patch) | |
tree | cd93e24c8e9c84af9e8c72a5f15df21140a85acb /tools/perf/util/trace-event-scripting.c | |
parent | 14c4acc5ed22c21f9821103be7c48efdf9763584 (diff) |
iommu/amd: Restore IRTE.RemapEn bit for amd_iommu_activate_guest_mode
Commit e52d58d54a32 ("iommu/amd: Use cmpxchg_double() when updating
128-bit IRTE") removed an assumption that modify_irte_ga always set
the valid bit, which requires the callers to set the appropriate value
for the struct irte_ga.valid bit before calling the function.
Similar to the commit 26e495f34107 ("iommu/amd: Restore IRTE.RemapEn
bit after programming IRTE"), which is for the function
amd_iommu_deactivate_guest_mode().
The same change is also needed for the amd_iommu_activate_guest_mode().
Otherwise, this could trigger IO_PAGE_FAULT for the VFIO based VMs with
AVIC enabled.
Fixes: e52d58d54a321 ("iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE")
Reported-by: Maxim Levitsky <[email protected]>
Signed-off-by: Suravee Suthikulpanit <[email protected]>
Tested-by: Maxim Levitsky <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Reviewed-by: Maxim Levitsky <[email protected]>
Cc: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions