aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/amd-iommu.h
diff options
context:
space:
mode:
authorWei Wang <wei.wang2@amd.com>2012-03-01 16:35:54 +0000
committerWei Wang <wei.wang2@amd.com>2012-03-01 16:35:54 +0000
commit39eb9768411ef1ff0905297c1cc95fde8d0ee49c (patch)
tree4b476a8ff84f3a9f4b93074af6f67046dcea844e /xen/include/asm-x86/amd-iommu.h
parentdb730e2b4fc3b650f05e99e556893e0d8cb771f1 (diff)
downloadxen-39eb9768411ef1ff0905297c1cc95fde8d0ee49c.tar.gz
xen-39eb9768411ef1ff0905297c1cc95fde8d0ee49c.tar.bz2
xen-39eb9768411ef1ff0905297c1cc95fde8d0ee49c.zip
amd iommu: Introduce a new lock for event and ppr logging
iommu->lock is used with irq disabled, so it cannot be used to protect ppr log. Otherwise, after c/s 24770, get_gfn will trigger a BUG() if called by parse_ppr_log_entry(). This patch adds an additional lock to protect ppr and event pointers in iommu_read_log(). signed-off-by: Wei Wang <wei.wang2@amd.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/amd-iommu.h')
-rw-r--r--xen/include/asm-x86/amd-iommu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/asm-x86/amd-iommu.h b/xen/include/asm-x86/amd-iommu.h
index 0a781c90d2..92423e21da 100644
--- a/xen/include/asm-x86/amd-iommu.h
+++ b/xen/include/asm-x86/amd-iommu.h
@@ -65,6 +65,7 @@ struct ring_buffer {
unsigned long alloc_size;
uint32_t tail;
uint32_t head;
+ spinlock_t lock; /* protect buffer pointers */
};
typedef struct iommu_cap {