[xen master] x86/iommu: fix wrong usage of iommu_hwdom_inclusive

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] x86/iommu: fix wrong usage of iommu_hwdom_inclusive

patchbot
commit 8ce6ba37d6bd8959e0d00b92103c85cc662f6afd
Author:     Roger Pau Monné <[hidden email]>
AuthorDate: Tue Oct 2 17:01:41 2018 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Oct 2 17:01:41 2018 +0200

    x86/iommu: fix wrong usage of iommu_hwdom_inclusive
   
    iommu_hwdom_inclusive was used where iommu_hwdom_reserved should be
    used.
   
    Reported-by: Suravee Suthikulpanit <[hidden email]>
    Signed-off-by: Roger Pau Monné <[hidden email]>
    Reviewed-by: Jan Beulich <[hidden email]>
---
 xen/drivers/passthrough/iommu.c     | 2 +-
 xen/drivers/passthrough/x86/iommu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index ae6cf2f0ff..8f4309760a 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -157,7 +157,7 @@ static int __init parse_dom0_iommu_param(const char *s)
         else if ( (val = parse_boolean("map-inclusive", s, ss)) >= 0 )
             iommu_hwdom_inclusive = val;
         else if ( (val = parse_boolean("map-reserved", s, ss)) >= 0 )
-            iommu_hwdom_inclusive = val;
+            iommu_hwdom_reserved = val;
         else
             rc = -EINVAL;
 
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
index b7c8b5be41..69e45b8e00 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -210,7 +210,7 @@ void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
 
     BUG_ON(!is_hardware_domain(d));
 
-    ASSERT(iommu_hwdom_inclusive != -1 && iommu_hwdom_inclusive != -1);
+    ASSERT(iommu_hwdom_inclusive != -1 && iommu_hwdom_reserved != -1);
     if ( iommu_hwdom_inclusive && !is_pv_domain(d) )
     {
         printk(XENLOG_WARNING
--
generated by git-patchbot for /home/xen/git/xen.git#master


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog