[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/python: fix python libxc bindings to pass a max grant version
commit 1cffc48f1e1f972daeec579c62de4bb24f3152fa Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Wed Nov 17 12:43:05 2021 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Nov 17 12:43:05 2021 +0100 tools/python: fix python libxc bindings to pass a max grant version Such max version should be provided by the caller, otherwise the bindings will default to specifying a max version of 2, which is inline with the current defaults in the hypervisor. Fixes: 7379f9e10a ('gnttab: allow setting max version per-domain') Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> Acked-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> Release-Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 6293d205a3..fd00861032 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -116,7 +116,7 @@ static PyObject *pyxc_domain_create(XcObject *self, PyObject *args, PyObject *kwds) { - uint32_t dom = 0, target = 0; + uint32_t dom = 0, target = 0, max_grant_version = 2; int ret; size_t i; PyObject *pyhandle = NULL; @@ -132,12 +132,13 @@ static PyObject *pyxc_domain_create(XcObject *self, }; static char *kwd_list[] = { "domid", "ssidref", "handle", "flags", - "target", "max_vcpus", NULL }; + "target", "max_vcpus", "max_grant_version", + NULL }; - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiOiii", kwd_list, + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiOiiii", kwd_list, &dom, &config.ssidref, &pyhandle, &config.flags, &target, - &config.max_vcpus) ) + &config.max_vcpus, &max_grant_version) ) return NULL; if ( pyhandle != NULL ) { @@ -162,6 +163,7 @@ static PyObject *pyxc_domain_create(XcObject *self, #else #error Architecture not supported #endif + config.grant_opts = XEN_DOMCTL_GRANT_version(max_grant_version); if ( (ret = xc_domain_create(self->xc_handle, &dom, &config)) < 0 ) return pyxc_error_to_exception(self->xc_handle); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |