All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni.tedesco@citrix.com>
To: "Kay, Allen M" <allen.m.kay@intel.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>,
	Vincent Hanquez <vincent.hanquez@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: build break in xl.c in python
Date: Fri, 8 Oct 2010 09:28:57 +0100	[thread overview]
Message-ID: <1286526537.12843.130.camel@qabil.uk.xensource.com> (raw)
In-Reply-To: <987664A83D2D224EAE907B061CE93D530163EA9749@orsmsx505.amr.corp.intel.com>

On Fri, 2010-10-08 at 01:28 +0100, Kay, Allen M wrote:
> I'm getting a build break in python xl code.  Looks like the following changeset did not make the corresponding parameter change from the caller site in python:
> 
> -static int do_pci_remove(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev)
> +static int do_pci_remove(libxl__gc *gc, uint32_t domid,
> +                         libxl_device_pci *pcidev, int force)
> 
> 
> Changeset:
> 
> 31 hours ago: xl: Implement PCI passthrough force removal 
> changeset 22229: 1385b15e168f 
> tag: tip 
> author: Gianni Tedesco <gianni.tedesco@citrix.com> 
> date: Wed Oct 06 17:38:15 2010 +0100 
> files: tools/libxl/libxl.h tools/libxl/libxl_pci.c tools/libxl/xl_cmdimpl.c  

You are right, I should have realised! It also breaks the ocaml binding.

Vincent, I have patched this so that it builds but perhaps you want to
expose the new PCI force removal in the ocaml binding? I just set
'force' parameter to always be zero for now to keep it building and
running same as before.

---
xl: Fix build in python binding since API change in 22229:1385b15e168f

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>

diff -r 1385b15e168f tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c	Wed Oct 06 17:38:15 2010 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c	Fri Oct 08 09:25:22 2010 +0100
@@ -638,7 +638,7 @@ value stub_xl_pci_remove(value info, val
 	device_pci_val(&gc, &c_info, info);
 
 	INIT_CTX();
-	ret = libxl_device_pci_remove(&ctx, Int_val(domid), &c_info);
+	ret = libxl_device_pci_remove(&ctx, Int_val(domid), &c_info, 0);
 	if (ret != 0)
 		failwith_xl("pci_remove", &lg);
 	FREE_CTX();
diff -r 1385b15e168f tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c	Wed Oct 06 17:38:15 2010 +0100
+++ b/tools/python/xen/lowlevel/xl/xl.c	Fri Oct 08 09:25:22 2010 +0100
@@ -441,15 +441,16 @@ static PyObject *pyxl_pci_del(XlObject *
 {
     Py_device_pci *pci;
     PyObject *obj;
-    int domid;
-    if ( !PyArg_ParseTuple(args, "iO", &domid, &obj) )
+    int domid, force = 0;
+
+    if ( !PyArg_ParseTuple(args, "iO|i", &domid, &obj) )
         return NULL;
     if ( !Pydevice_pci_Check(obj) ) {
         PyErr_SetString(PyExc_TypeError, "Xxpected xl.device_pci");
         return NULL;
     }
     pci = (Py_device_pci *)obj;
-    if ( libxl_device_pci_remove(&self->ctx, domid, &pci->obj) ) {
+    if ( libxl_device_pci_remove(&self->ctx, domid, &pci->obj, force) ) {
         PyErr_SetString(xl_error_obj, "cannot remove pci device");
         return NULL;
     }

  parent reply	other threads:[~2010-10-08  8:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08  0:28 build break in xl.c in python Kay, Allen M
2010-10-08  4:34 ` Configuration of nestedhvm Dong, Eddie
2010-10-08  7:12   ` Keir Fraser
2010-10-08  7:56     ` Dong, Eddie
2010-10-08  8:15       ` Keir Fraser
2010-10-08  8:22       ` Keir Fraser
2010-10-08  8:47         ` Dong, Eddie
2010-10-08 11:29           ` Keir Fraser
2010-10-08  8:44   ` Christoph Egger
2010-10-08  8:54     ` Dong, Eddie
2010-10-08 10:02       ` Christoph Egger
2010-10-08 13:33         ` Dong, Eddie
2010-10-08 13:48           ` Christoph Egger
2010-10-09  2:54           ` add missing VMCS definition Dong, Eddie
2010-10-08  8:28 ` Gianni Tedesco [this message]
2010-10-08  8:33   ` Re: build break in xl.c in python Gianni Tedesco
2010-10-08 10:43     ` Stefano Stabellini

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=1286526537.12843.130.camel@qabil.uk.xensource.com \
    --to=gianni.tedesco@citrix.com \
    --cc=allen.m.kay@intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=vincent.hanquez@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.