From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 1 of 2] Ocaml/libxc bindings: Fix SBDF encoding
Date: Wed, 9 Jan 2013 13:42:23 +0000 [thread overview]
Message-ID: <50ED73BF.2000204@citrix.com> (raw)
In-Reply-To: <22e7cb73b4ad0b0f916e.1357253397@andrewcoop.uk.xensource.com>
Ping?
On 03/01/13 22:49, Andrew Cooper wrote:
> Changeset 23861:ec7c81fbe0de alters the SBDF encoding expected by the
> DOMCTL_{de,}assign_device hypercalls.
>
> While it updates libxl, libxc and the python bindings, the ocaml
> bindings got missed. As a result, any attempt to use PCI Passthrough
> with Xen-4.2 and later will fail.
>
> Signed-off-by: Andrew Cooper<andrew.cooper3@citrix.com>
>
> diff -r c4114a042410 -r 22e7cb73b4ad tools/ocaml/libs/xc/xenctrl_stubs.c
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -1085,11 +1085,10 @@ CAMLprim value stub_xc_domain_irq_permis
>
> static uint32_t pci_dev_to_bdf(int domain, int bus, int slot, int func)
> {
> - uint32_t bdf = 0;
> - bdf |= (bus& 0xff)<< 16;
> - bdf |= (slot& 0x1f)<< 11;
> - bdf |= (func& 0x7)<< 8;
> - return bdf;
> + return ((uint32_t)domain& 0xffff)<< 16 |
> + ((uint32_t)bus& 0xff)<< 8 |
> + ((uint32_t)slot& 0x1f)<< 3 |
> + ((uint32_t)func& 0x7);
> }
>
> CAMLprim value stub_xc_domain_test_assign_device(value xch, value domid, value desc)
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-01-09 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 22:49 [PATCH 1 of 2] Ocaml/libxc bindings: Fix SBDF encoding Andrew Cooper
2013-01-03 22:49 ` [PATCH 2 of 2] Ocaml/libxc bindings: Correct PCI terminology Andrew Cooper
2013-01-09 13:42 ` Andrew Cooper [this message]
2013-01-11 12:25 ` [PATCH 1 of 2] Ocaml/libxc bindings: Fix SBDF encoding Ian Campbell
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=50ED73BF.2000204@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.