aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/sys_string.h
diff options
context:
space:
mode:
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>2013-07-11 14:22:44 +0200
committerJan Beulich <jbeulich@suse.com>2013-07-11 14:22:44 +0200
commit5c33c9ce22fe3c03242cdd465feb518bb614f7c7 (patch)
tree23627dc406171973e09c9d48a3d7cd606a7b4fdd /tools/lib/sys_string.h
parent094c1cb9757a3456ea63491a1c0d6016bdfa2711 (diff)
downloadxen-5c33c9ce22fe3c03242cdd465feb518bb614f7c7.tar.gz
xen-5c33c9ce22fe3c03242cdd465feb518bb614f7c7.tar.bz2
xen-5c33c9ce22fe3c03242cdd465feb518bb614f7c7.zip
iommu/amd: Fix logic for clearing the IOMMU interrupt bits
The IOMMU interrupt bits in the IOMMU status registers are "read-only, and write-1-to-clear (RW1C). Therefore, the existing logic which reads the register, set the bit, and then writing back the values could accidentally clear certain bits if it has been set. The correct logic would just be writing only the value which only set the interrupt bits, and leave the rest to zeros. This patch also, clean up #define masks as Jan has suggested. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> With iommu_interrupt_handler() properly having got switched its readl() from status to control register, the subsequent writel() needed to be switched too (and the RW1C comment there was bogus). Some of the cleanup went too far - undone. Further, with iommu_interrupt_handler() now actually disabling the interrupt sources, they also need to get re-enabled by the tasklet once it finished processing the respective log. This also implies re-running the tasklet so that log entries added between reading the log and re- enabling the interrupt will get handled in a timely manner. Finally, guest write emulation to the status register needs to be done with the RW1C (and RO for all other bits) semantics in mind too. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Tim Deegan <tim@xen.org> Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> master commit: 2823a0c7dfc979db316787e1dd42a8845e5825c0 master date: 2013-07-02 08:49:43 +0200
Diffstat (limited to 'tools/lib/sys_string.h')
0 files changed, 0 insertions, 0 deletions