* [PATCH] Passthough/domctl: Use correct struct in union
@ 2013-01-03 21:07 Andrew Cooper
2013-01-03 21:51 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2013-01-03 21:07 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Jan Beulich
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>
diff -r c4114a042410 -r 69ac79e96ddd xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Passthough/domctl: Use correct struct in union
2013-01-03 21:07 [PATCH] Passthough/domctl: Use correct struct in union Andrew Cooper
@ 2013-01-03 21:51 ` Andrew Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2013-01-03 21:51 UTC (permalink / raw)
To: xen-devel@lists.xen.org; +Cc: Keir (Xen.org), Jan Beulich
On 03/01/13 21:07, Andrew Cooper wrote:
> 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>
I should also say that this affects Xen-4.2 as well, so I suggest it as
a candidate for backport.
~Andrew
>
> diff -r c4114a042410 -r 69ac79e96ddd xen/drivers/passthrough/iommu.c
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -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;
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-03 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 21:07 [PATCH] Passthough/domctl: Use correct struct in union Andrew Cooper
2013-01-03 21:51 ` Andrew Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).