Skip to contentSkip to conversation

x86/iommu: add missing break

PATCH In review Roger Pau Monne 2 participants 3 messages Feb 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/iommu: add missing break

50a498 failed to add a break in the p2m_mmio_direct case, so Xen was still not adding IOMMU entries for p2m_mmio_direct regions.

---

---
 xen/include/asm-x86/p2m.h | 1 +
 1 file changed, 1 insertion(+)
xen/include/asm-x86/p2m.h +1 -0
index 173a6f8..c68ff58 100644
@@ -819,6 +819,7 @@ static inline unsigned int p2m_get_iommu_flags(p2m_type_t p2mt, mfn_t mfn)
         flags = IOMMUF_readable;
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn_x(mfn)) )
             flags |= IOMMUF_writable;
+        break;
     default:
         flags = 0;
         break;
Signature · 7 lines
2.10.1 (Apple Git-78)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

Ccing the maintainers...

Quoted 25 lines · Roger Pau Monne

50a498 failed to add a break in the p2m_mmio_direct case, so Xen was still not adding IOMMU entries for p2m_mmio_direct regions.

---

---
 xen/include/asm-x86/p2m.h | 1 +
 1 file changed, 1 insertion(+)
xen/include/asm-x86/p2m.h +1 -0
index 173a6f8..c68ff58 100644
@@ -819,6 +819,7 @@ static inline unsigned int p2m_get_iommu_flags(p2m_type_t p2mt, mfn_t mfn)
         flags = IOMMUF_readable;
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn_x(mfn)) )
             flags |= IOMMUF_writable;
+        break;
     default:
         flags = 0;
         break;
Signature · 1 line
2.10.1 (Apple Git-78)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reviewed-by
#2 lore raw
Quoted 5 lines · Roger Pau Monne

Ccing the maintainers...

Quoted 2 lines · Roger Pau Monne

50a498 failed to add a break in the p2m_mmio_direct case, so Xen was still not adding IOMMU entries for p2m_mmio_direct regions.

Spotted by Coverity

Quoted 3 lines
Quoted 3 lines

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel