From nobody Mon Feb 9 07:55:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1564760243; cv=none; d=zoho.com; s=zohoarc; b=fnfrUyqSATD2pIBIcE9C68wLeQFap/dwa9RpoS2c3b++bC5JWupcJtlTn5ADGGNfqdp1UuDjq8i+deawF50RInqs5Ebc8chReBfdAFd1Fy4JkIxre9BQusg8SvlVhI2GVk3KGUz6JdJSk99CCuceYBSYBi+c9xBMEtncxTUMIKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564760243; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=k2ENBEVqFSij9FVGteT1BJXCtyuLL+JCM7HBfDZH5dg=; b=C+DlA0wjHtSOrITbaBOPWBrx2bn+Q4ZJnHL7/fAPLSFLpcUZz/kddxQi9nqykWLM+qMzT8d9ZIy3HM3e/6Jci3Fm1Bg1sPA2eJJSIg0j9RPgj4OwSnz4h2PMDQjsq4nmgbuKZyGa8LCbWYWh+ZHkhdRmrTOfQdDfoy1OqMRGVvo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564760243689896.5740747089283; Fri, 2 Aug 2019 08:37:23 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1htZbM-00034R-2U; Fri, 02 Aug 2019 15:36:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1htZbK-00033A-0Y for xen-devel@lists.xenproject.org; Fri, 02 Aug 2019 15:36:14 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 4122ca74-b53b-11e9-8980-bc764e045a96; Fri, 02 Aug 2019 15:36:11 +0000 (UTC) X-Inumbo-ID: 4122ca74-b53b-11e9-8980-bc764e045a96 Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: iIopPvFFWRQPOo+6lnRf89Fm0ADPcMpK8VUCRqSfwdONB4aKP+K1fmUbqXZybzDXAbbuxmJC1W 2RKan1AGhOL5OuWf1Z8dtBs+RFtJ1kciGQtmtn0SGDiJygGQZLFZ+/ers8LzfHrjoBAK7N1qAF gYT52Ipkzsejn4ugPPy+dPg2ttGlHeO5zIANz8dTzRaNgvwkg6lGHzI/ArOZNF6iYAcS6Xkw9H /SfcX++i/m6iD4tdgDG2UtnFf1yjpOgCgGg7hDBFCVFBP5ILjvgbl8AXUpmxzHAf+LWJg98r8/ yng= X-SBRS: 2.7 X-MesageID: 3950109 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,338,1559534400"; d="scan'208";a="3950109" From: Anthony PERARD To: Date: Fri, 2 Aug 2019 16:35:40 +0100 Message-ID: <20190802153606.32061-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802153606.32061-1-anthony.perard@citrix.com> References: <20190802153606.32061-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 09/35] libxl: Deprecate libxl__domain_{unpause, resume} X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ian Jackson , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" These two functions are used from many places in libxl and need to change to be able to accomodate libxl__ev_qmp calls and thus needs to be asynchronous. (There is also libxl__domain_resume_device_model in the mix.) A later patch will introduce a new libxl__domain_resume and libxl__domain_unpause which will make use of libxl__ev_qmp. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_colo_restore.c | 4 ++-- tools/libxl/libxl_colo_save.c | 4 ++-- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_dom_suspend.c | 6 +++--- tools/libxl/libxl_domain.c | 8 ++++---- tools/libxl/libxl_internal.h | 12 ++++++++---- tools/libxl/libxl_remus.c | 2 +- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/tools/libxl/libxl_colo_restore.c b/tools/libxl/libxl_colo_rest= ore.c index aaa70552b8..aa365670fb 100644 --- a/tools/libxl/libxl_colo_restore.c +++ b/tools/libxl/libxl_colo_restore.c @@ -124,7 +124,7 @@ static void colo_resume_vm(libxl__egc *egc, return; } } - rc =3D libxl__domain_resume(gc, crs->domid, 0); + rc =3D libxl__domain_resume_deprecated(gc, crs->domid, 0); if (rc) LOGD(ERROR, crs->domid, "cannot resume secondary vm"); =20 @@ -853,7 +853,7 @@ static void colo_unpause_svm(libxl__egc *egc, EGC_GC; =20 /* We have enabled secondary vm's logdirty, so we can unpause it now */ - rc =3D libxl__domain_unpause(gc, domid); + rc =3D libxl__domain_unpause_deprecated(gc, domid); if (rc) { LOGD(ERROR, domid, "cannot unpause secondary vm"); goto out; diff --git a/tools/libxl/libxl_colo_save.c b/tools/libxl/libxl_colo_save.c index 1d261a1639..b47f038f6e 100644 --- a/tools/libxl/libxl_colo_save.c +++ b/tools/libxl/libxl_colo_save.c @@ -470,7 +470,7 @@ static void colo_preresume_cb(libxl__egc *egc, } =20 /* Resumes the domain and the device model */ - if (libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1)) { + if (libxl__domain_resume_deprecated(gc, dss->domid, /* Fast Suspend */= 1)) { LOGD(ERROR, dss->domid, "cannot resume primary vm"); goto out; } @@ -480,7 +480,7 @@ static void colo_preresume_cb(libxl__egc *egc, * no disk migration. */ if (css->paused) { - rc =3D libxl__domain_unpause(gc, dss->domid); + rc =3D libxl__domain_unpause_deprecated(gc, dss->domid); if (rc) { LOGD(ERROR, dss->domid, "cannot unpause primary vm"); goto out; diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index bb5339784e..246c570121 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2404,7 +2404,7 @@ static void stubdom_pvqemu_cb(libxl__egc *egc, goto out; } =20 - rc =3D libxl__domain_unpause(gc, dm_domid); + rc =3D libxl__domain_unpause_deprecated(gc, dm_domid); if (rc) goto out; =20 sdss->xswait.ao =3D ao; diff --git a/tools/libxl/libxl_dom_suspend.c b/tools/libxl/libxl_dom_suspen= d.c index d1af3a6573..2460021e5a 100644 --- a/tools/libxl/libxl_dom_suspend.c +++ b/tools/libxl/libxl_dom_suspend.c @@ -421,7 +421,7 @@ static void domain_suspend_callback_common_done(libxl__= egc *egc, =20 /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Do= main resume =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D*/ =20 -int libxl__domain_resume_device_model(libxl__gc *gc, uint32_t domid) +int libxl__domain_resume_device_model_deprecated(libxl__gc *gc, uint32_t d= omid) { const char *path, *state; =20 @@ -449,7 +449,7 @@ int libxl__domain_resume_device_model(libxl__gc *gc, ui= nt32_t domid) return 0; } =20 -int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel) +int libxl__domain_resume_deprecated(libxl__gc *gc, uint32_t domid, int sus= pend_cancel) { int rc =3D 0; =20 @@ -460,7 +460,7 @@ int libxl__domain_resume(libxl__gc *gc, uint32_t domid,= int suspend_cancel) } =20 if (type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { - rc =3D libxl__domain_resume_device_model(gc, domid); + rc =3D libxl__domain_resume_device_model_deprecated(gc, domid); if (rc) { LOGD(ERROR, domid, "failed to resume device model:%d", rc); goto out; diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index f2d5c86427..80797c5ed2 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -178,7 +178,7 @@ int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid,= int suspend_cancel, const libxl_asyncop_how *ao_how) { AO_CREATE(ctx, domid, ao_how); - int rc =3D libxl__domain_resume(gc, domid, suspend_cancel); + int rc =3D libxl__domain_resume_deprecated(gc, domid, suspend_cancel); libxl__ao_complete(egc, ao, rc); return AO_INPROGRESS; } @@ -593,7 +593,7 @@ int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t dom= id, return AO_INPROGRESS; } =20 -int libxl__domain_unpause(libxl__gc *gc, libxl_domid domid) +int libxl__domain_unpause_deprecated(libxl__gc *gc, libxl_domid domid) { int r, rc; =20 @@ -604,7 +604,7 @@ int libxl__domain_unpause(libxl__gc *gc, libxl_domid do= mid) } =20 if (type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { - rc =3D libxl__domain_resume_device_model(gc, domid); + rc =3D libxl__domain_resume_device_model_deprecated(gc, domid); if (rc < 0) { LOGD(ERROR, domid, "Failed to unpause device model for domain: %d", rc); @@ -628,7 +628,7 @@ int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid, AO_CREATE(ctx, domid, ao_how); int rc =3D 0; =20 - rc =3D libxl__domain_unpause(gc, domid); + rc =3D libxl__domain_unpause_deprecated(gc, domid); if (rc) goto out; =20 libxl__ao_complete(egc, ao, rc); diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 5e09e602ed..da3631d853 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1314,7 +1314,8 @@ _hidden int libxl__domain_rename(libxl__gc *gc, uint3= 2_t domid, const char *old_name, const char *new_nam= e, xs_transaction_t trans); =20 -_hidden int libxl__domain_resume_device_model(libxl__gc *gc, uint32_t domi= d); +/* Deprecated, use libxl__dm_resume instead. */ +_hidden int libxl__domain_resume_device_model_deprecated(libxl__gc *gc, ui= nt32_t domid); =20 _hidden const char *libxl__userdata_path(libxl__gc *gc, uint32_t domid, const char *userdata_userid, @@ -1331,8 +1332,12 @@ _hidden int libxl__userdata_store(libxl__gc *gc, uin= t32_t domid, const char *userdata_userid, const uint8_t *data, int datalen); =20 -_hidden int libxl__domain_resume(libxl__gc *gc, uint32_t domid, - int suspend_cancel); +/* Deprecated, use libxl__domain_resume instead */ +_hidden int libxl__domain_resume_deprecated(libxl__gc *gc, uint32_t domid, + int suspend_cancel); +/* Deprecated, use libxl__domain_unpause instead */ +_hidden int libxl__domain_unpause_deprecated(libxl__gc *, + libxl_domid domid); =20 /* returns 0 or 1, or a libxl error code */ _hidden int libxl__domain_pvcontrol_available(libxl__gc *gc, uint32_t domi= d); @@ -4103,7 +4108,6 @@ _hidden void libxl__remus_teardown(libxl__egc *egc, int rc); _hidden void libxl__remus_restore_setup(libxl__egc *egc, libxl__domain_create_state *dcs); -_hidden int libxl__domain_unpause(libxl__gc *, libxl_domid domid); =20 =20 /* diff --git a/tools/libxl/libxl_remus.c b/tools/libxl/libxl_remus.c index 29a47838c8..6338a1bae5 100644 --- a/tools/libxl/libxl_remus.c +++ b/tools/libxl/libxl_remus.c @@ -267,7 +267,7 @@ static void remus_devices_preresume_cb(libxl__egc *egc, goto out; =20 /* Resumes the domain and the device model */ - rc =3D libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1); + rc =3D libxl__domain_resume_deprecated(gc, dss->domid, /* Fast Suspend= */1); if (rc) goto out; =20 --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel