diff options
author | Wei Wang <wei.wang2@amd.com> | 2012-03-01 16:35:54 +0000 |
---|---|---|
committer | Wei Wang <wei.wang2@amd.com> | 2012-03-01 16:35:54 +0000 |
commit | 39eb9768411ef1ff0905297c1cc95fde8d0ee49c (patch) | |
tree | 4b476a8ff84f3a9f4b93074af6f67046dcea844e /xen/include/asm-x86/amd-iommu.h | |
parent | db730e2b4fc3b650f05e99e556893e0d8cb771f1 (diff) | |
download | xen-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.h | 1 |
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 { |