From nobody Mon Feb 9 08:56:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1568913491; cv=none; d=zoho.com; s=zohoarc; b=WMARBaoXQZjP+ZGhsofHecmo8GOUVDJQ9rZDJYWgvtf9DLGTW1n3V3U6NI7iJT1GoPGiC1oCzeQuEjXRcOoygDQ+CksBMfeiFGF9LKIcnY1m7/c/W4o17bojXCFV7wuPCYjth6HdzPvqllaPy1vZqWbyV20sdqUusE7bd5VOrrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568913491; 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=xhNG6E7BZMI54b3YFbhXp4KK5QAPSdt+mYhI7+qUGCM=; b=Nt7vrPQ8jzIfjua0zdbdsovh83jAsF+95arFFiuyPoY88dvuYFrm8yOgPFYyOcFD8kX1CV26Ria5zLZ1KMapYTDJjvYi/tzup8FudKTcfzERqCe8GicgVt2SeLUf9kWWo2Gg1YABsbos+MYtmUVcZumddU6fcyNuBoYJH0BYYtI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1568913491605215.89037034254227; Thu, 19 Sep 2019 10:18:11 -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 1iB03H-0000tC-TL; Thu, 19 Sep 2019 17:17:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iB03G-0000ss-8M for xen-devel@lists.xenproject.org; Thu, 19 Sep 2019 17:17:06 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4c605964-db01-11e9-a337-bc764e2007e4; Thu, 19 Sep 2019 17:17:04 +0000 (UTC) X-Inumbo-ID: 4c605964-db01-11e9-a337-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568913424; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4anWEIAxyS+Xid9vj3B3eTP68Z1g0RchEBW0hcaqr+k=; b=MYTYxbW9FWL/flBAHKYcJyXX1ae56K125pYOXcECv9AmFqNuRlR8vgWX xdO5KyKC8K8xCWqNNzlZv27Tt0QG705RReHtWAkmCWA04idGDA+9oOWxw tZzvFJxElGjaHQAEo1WqlS/WDsR+ku+pwXoFwKfyoS2UmUqIbzp2md9qH 8=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: YXFkbCCEOGV410H9Rt0nMie0ITnI4uyAkvu4k3ZTXu2jrY7EmTn0pbjLnLgn6E1tDpRU00Y8FS DF7xA/6Jjtl3QIytUV+8R4S4imYqSs6wO2Qo9QStGwCoYtZ6mL8kLVCJT5343EyGyBMktZgtIm g0Dkzxk8a3cisI6kr75gN8Zm5thEYerw56AoYqkVEmvACiYA6fn+f1hjz1t55EwhLLuNvQgq16 V5FLfkLzwHmdZEaXQHL9OFYKgm7JOOfBkBDlJff3nhO7N39FhKrbPfjyDkfuwLsGp+TEtWg9iw qfk= X-SBRS: 2.7 X-MesageID: 5804915 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,524,1559534400"; d="scan'208";a="5804915" From: Anthony PERARD To: Date: Thu, 19 Sep 2019 18:16:29 +0100 Message-ID: <20190919171656.899649-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919171656.899649-1-anthony.perard@citrix.com> References: <20190919171656.899649-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 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" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 aaa70552b8c4..aa365670fb14 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 1d261a1639f7..b47f038f6e6e 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 bb5339784ea8..246c570121d3 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 d1af3a657303..2460021e5a59 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 f2d5c86427ad..80797c5ed21c 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 f5f234be7e3c..db8860507b18 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1315,7 +1315,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, @@ -1332,8 +1333,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); @@ -4104,7 +4109,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 29a47838c8e6..6338a1bae5a5 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