passthrough/domctl: use correct struct in union
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 4 Jan 2013 09:06:47 +0000 (10:06 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 4 Jan 2013 09:06:47 +0000 (10:06 +0100)
This appears to be a copy paste error from c/s 23861:ec7c81fbe0de.

It is safe, functionally speaking, as both the xen_domctl_assign_device
and xen_domctl_get_device_group structure start with a 'uint32_t
machine_sbdf'.  We should however use the correct union structure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/iommu.c

index 1cd00075422b885c704905157068aebeeeed8421..2d584d2a776ae5917fb8f666b1d274628560e02a 100644 (file)
@@ -591,7 +591,7 @@ int iommu_do_domctl(
         if ( ret )
             break;
 
-        seg = domctl->u.get_device_group.machine_sbdf >> 16;
+        seg = domctl->u.assign_device.machine_sbdf >> 16;
         bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff;
         devfn = domctl->u.assign_device.machine_sbdf & 0xff;
 
@@ -615,7 +615,7 @@ int iommu_do_domctl(
         if ( ret )
             break;
 
-        seg = domctl->u.get_device_group.machine_sbdf >> 16;
+        seg = domctl->u.assign_device.machine_sbdf >> 16;
         bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff;
         devfn = domctl->u.assign_device.machine_sbdf & 0xff;
 
@@ -634,7 +634,7 @@ int iommu_do_domctl(
         if ( ret )
             break;
 
-        seg = domctl->u.get_device_group.machine_sbdf >> 16;
+        seg = domctl->u.assign_device.machine_sbdf >> 16;
         bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff;
         devfn = domctl->u.assign_device.machine_sbdf & 0xff;