From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Keir (Xen.org)" <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] Passthough/domctl: Use correct struct in union
Date: Thu, 3 Jan 2013 21:51:25 +0000 [thread overview]
Message-ID: <50E5FD5D.9010107@citrix.com> (raw)
In-Reply-To: <69ac79e96ddd501627f1.1357247263@andrewcoop.uk.xensource.com>
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
prev parent reply other threads:[~2013-01-03 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 21:07 [PATCH] Passthough/domctl: Use correct struct in union Andrew Cooper
2013-01-03 21:51 ` Andrew Cooper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50E5FD5D.9010107@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).