From nobody Sat Apr 20 01:55:52 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; arc=fail (BodyHash is different from the expected one) Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565730743900304.1287209955226; Tue, 13 Aug 2019 14:12:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB2C24DB1F; Tue, 13 Aug 2019 21:12:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57CAA8048A; Tue, 13 Aug 2019 21:12:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B0D454A486; Tue, 13 Aug 2019 21:12:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7DLCJoc022110 for ; Tue, 13 Aug 2019 17:12:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 90E5780483; Tue, 13 Aug 2019 21:12:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 899D36E704 for ; Tue, 13 Aug 2019 21:12:17 +0000 (UTC) Received: from m4a0041g.houston.softwaregrp.com (m4a0041g.houston.softwaregrp.com [15.124.2.87]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C91233064FD3 for ; Tue, 13 Aug 2019 21:12:11 +0000 (UTC) Received: FROM m4a0041g.houston.softwaregrp.com (15.120.17.147) BY m4a0041g.houston.softwaregrp.com WITH ESMTP; Tue, 13 Aug 2019 21:11:59 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 13 Aug 2019 21:06:08 +0000 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (15.124.8.13) by M4W0334.microfocus.com (15.120.17.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Tue, 13 Aug 2019 21:06:08 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (10.255.139.204) by BY5PR18MB3155.namprd18.prod.outlook.com (10.255.136.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.14; Tue, 13 Aug 2019 21:06:07 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a]) by BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a%6]) with mapi id 15.20.2157.022; Tue, 13 Aug 2019 21:06:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X4KJSl0Qh4qwTMzGNhl/Lwv1bxYPKIe5T1NKlvz7ld3OG4DsPfZ3GtE5OHUPXNw4frTp5iFZ7F6+CG72ZtVS90CQrQfanw0KAp/Sk9L/sEkiDhLZSWGxufBPy3mV4iTYWKx5foM6bHwdkSv7KKQkCpl0xYwtUe8mcoVRo47TM28IJDa9bln9SzNZlNtpO1u9Oliy64oY3zszcxfF9xHPuq8Jw5GJoojBcr6bmunmqTC/XtINpStAN+yNOjrW+oMiCPujuRi/EpNRoL6wJ76KRXZnFOVlChN5o93zOfYuGJe0TkpAtcVmHjL/TjnzySxj2eSBUV/OVwRdW/9H4dBVnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ouBWVpWIDr8bk4xduKrfLUzOHMK03Wb18oWtdsLlbro=; b=RYv1uydo3ATELxEib7xEBalLXyKYIqS3wY205d2GIKX23d8ksfp/9jbOS42yuxgeu4Pl4CE1PBe59owBKv0ui53Vd+bclkZzaeDaS3p2UuoTWVIUHLW5l4/6OPgRXSzbu/l1DcK1PLSbtsNmz1sWP57xGi+AGN0zx4H55WBD5B9CDQl9Sq7eIAkl3T12JOjk+4W7RJM4vRmnEs0esJDHEb22Pzr1wI8oLGKFO32awKeRTo0Bpi8eTuI0Sn2sYJm7MlcEqBCO2R0MHWMqmhgGpfKvWbEjxgfrSSKYSdmlJVSvPj0QGvonjQVS1+bNOtuBdSrvKVAczveJ31uvknwzcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none From: Jim Fehlig To: "libvir-list@redhat.com" Thread-Topic: [PATCH 1/2] Revert "libxl: send lifecycle event on suspend" Thread-Index: AQHVUhrsdOZLpnlcnkadGVu5sX4l4g== Date: Tue, 13 Aug 2019 21:06:06 +0000 Message-ID: <20190813210552.18613-2-jfehlig@suse.com> References: <20190813210552.18613-1-jfehlig@suse.com> In-Reply-To: <20190813210552.18613-1-jfehlig@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR14CA0066.namprd14.prod.outlook.com (2603:10b6:300:81::28) To BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=JFEHLIG@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:113:8044:4009:ffff:ffff:ffff:e5a1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 383663f8-bf8d-4c00-d6f7-08d720320edf x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:BY5PR18MB3155; x-ms-traffictypediagnostic: BY5PR18MB3155: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:241; x-forefront-prvs: 01283822F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(136003)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(15650500001)(99286004)(50226002)(66556008)(4326008)(66446008)(66946007)(36756003)(64756008)(25786009)(186003)(446003)(66476007)(46003)(6916009)(1076003)(5660300002)(81156014)(11346002)(81166006)(53936002)(2351001)(2501003)(102836004)(6512007)(86362001)(486006)(8936002)(476003)(107886003)(386003)(8676002)(5640700003)(478600001)(6506007)(14454004)(52116002)(316002)(6486002)(305945005)(71190400001)(256004)(2616005)(54906003)(14444005)(76176011)(6436002)(7736002)(6116002)(71200400001)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3155; H:BY5PR18MB3315.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ssp1pFR/LUFEboS2ORA7jvJh/lkmyAHNY1dJfrzyaqOKexsXZ7fvw1ZNmInxwzLq+sVdVKyou/fCc6hDRIxnWBp0m2uGA7reUpCz3axLctyTjAsu0ZmCZuqFX34g3y8YO1e2iuBcb8+V0op0968o+oES8blAIOR8cBgLuJbds/QK7Z3T0L5TpYKvby9GzYEbETTWYNaiw1239UKjONWPciZGarTSSEg0GBh8QSAf2ZwWoYRQ1nY5wE0+A7/jjuh3VyXxpGAi7GENVgsEFZ0IeJ4AiirGkmKtLG+cYx6QZb3r1G7iuUkjdVy2nrhnivrNEhBWvaGoIUqrkE6DgY5FRNjAi6OMChKA773dodgPRm+iyKHDHGo3udc1IUmndAKlaoeGUiwM2xjDErrK4ECJ9O8gDB4JEYlbueESW6EopQw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 383663f8-bf8d-4c00-d6f7-08d720320edf X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2019 21:06:06.9566 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5e++CtffISVVMBKGWH68MdMfhAwj6VqbcFq+nGCy2I8A7po+naeCrLCu2bikt6sNmEVwoI0vdnh2crr2qImS9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3155 X-OriginatorOrg: suse.com X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 13 Aug 2019 21:12:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 13 Aug 2019 21:12:16 +0000 (UTC) for IP:'15.124.2.87' DOMAIN:'m4a0041g.houston.softwaregrp.com' HELO:'m4a0041g.houston.softwaregrp.com' FROM:'JFEHLIG@suse.com' RCPT:'' X-RedHat-Spam-Score: 0.001 (RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY) 15.124.2.87 m4a0041g.houston.softwaregrp.com 15.124.2.87 m4a0041g.houston.softwaregrp.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id x7DLCJoc022110 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] Revert "libxl: send lifecycle event on suspend" X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 13 Aug 2019 21:12:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" A libxl event with shutdown reason LIBXL_SHUTDOWN_REASON_SUSPEND is sent after a domain is successfully suspended, which could result from suspending the domain to file (virDomainSave), suspending it to socket (virDomainMigrate), or suspending it to memory (virDomainPMSuspendForDuration). Commit d00c77ae changed the event handler to always set domain state to VIR_DOMAIN_PMSUSPENDED when LIBXL_SHUTDOWN_REASON_SUSPEND is received. The causes a persistent domain to show state "pmsuspended" after a successful migrate or save operation. Revert the commit and ignore the suspend event as before. This reverts commit d00c77ae45c7d9fd90384f01cd8b04c54f501e96. Signed-off-by: Jim Fehlig Reviewed-by: Daniel Henrique Barboza --- src/libxl/libxl_domain.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index b60511a266..4073bf8d46 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -559,17 +559,6 @@ libxlDomainShutdownThread(void *opaque) case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: goto endjob; } - } else if (xl_reason =3D=3D LIBXL_SHUTDOWN_REASON_SUSPEND) { - virDomainObjSetState(vm, VIR_DOMAIN_PMSUSPENDED, - VIR_DOMAIN_PMSUSPENDED_UNKNOWN); - - dom_event =3D virDomainEventLifecycleNewFromObj(vm, - VIR_DOMAIN_EVENT_PMSUSPENDED, - VIR_DOMAIN_EVENT_PMSUSPENDED_ME= MORY); - /* - * Similar to the xl implementation, ignore SUSPEND. Any actions = needed - * after calling libxl_domain_suspend() are handled by it's caller= s. - */ #ifdef LIBXL_HAVE_SOFT_RESET } else if (xl_reason =3D=3D LIBXL_SHUTDOWN_REASON_SOFT_RESET) { libxlDomainObjPrivatePtr priv =3D vm->privateData; @@ -669,6 +658,7 @@ void libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *eve= nt) { libxlDriverPrivatePtr driver =3D data; + libxl_shutdown_reason xl_reason =3D event->u.domain_shutdown.shutdown_= reason; struct libxlShutdownThreadInfo *shutdown_info =3D NULL; virThread thread; libxlDriverConfigPtr cfg; @@ -680,6 +670,13 @@ libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CO= NST libxl_event *event) goto error; } =20 + /* + * Similar to the xl implementation, ignore SUSPEND. Any actions need= ed + * after calling libxl_domain_suspend() are handled by its callers. + */ + if (xl_reason =3D=3D LIBXL_SHUTDOWN_REASON_SUSPEND) + goto error; + /* * Start a thread to handle shutdown. We don't want to be tying up * libxl's event machinery by doing a potentially lengthy shutdown. --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 20 01:55:52 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; arc=fail (BodyHash is different from the expected one) Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565730622885752.6804055811152; Tue, 13 Aug 2019 14:10:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66A1BA70E; Tue, 13 Aug 2019 21:10:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1ED57E33; Tue, 13 Aug 2019 21:10:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 80021180B536; Tue, 13 Aug 2019 21:10:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7DLABa0022050 for ; Tue, 13 Aug 2019 17:10:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id EDC6652C3; Tue, 13 Aug 2019 21:10:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E678E8095 for ; Tue, 13 Aug 2019 21:10:09 +0000 (UTC) Received: from m4a0040g.houston.softwaregrp.com (m4a0040g.houston.softwaregrp.com [15.124.2.86]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 325F681F10 for ; Tue, 13 Aug 2019 21:10:03 +0000 (UTC) Received: FROM m4a0040g.houston.softwaregrp.com (15.120.17.146) BY m4a0040g.houston.softwaregrp.com WITH ESMTP; Tue, 13 Aug 2019 21:09:45 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 13 Aug 2019 21:06:09 +0000 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (15.124.8.12) by M4W0334.microfocus.com (15.120.17.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Tue, 13 Aug 2019 21:06:09 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (10.255.139.204) by BY5PR18MB3155.namprd18.prod.outlook.com (10.255.136.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.14; Tue, 13 Aug 2019 21:06:08 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a]) by BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a%6]) with mapi id 15.20.2157.022; Tue, 13 Aug 2019 21:06:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O2sL4m/n7g1ccz92vLfif1IdePuOUHqC7/T77sBIvwm7eSKbz0wvfK4oRJiiF8besESPxuP/Z9sigYPWXjNE0NswaJ+4xkg87h7w7e/xC2fO/2c4iyp2RspizBtvxx8J34WriUc8O7g6a8wYabshkvfCjLDnwd3KjmheGqCu4p2rzL/Mm37Xat7eDrv/Db1XFqTxpS0f8vRid3yoRQBciFY+rBSwNSKa3IbthiZtzY+vss72NV7Ec9vzI7av0CEQsvh2o9tpXGFtO8mzRWM94jDibfbuF6xJDspWww6a5FPiFC0jGqfWGlljLk4czk6CfxWsWE908TPNJKPsdFddXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N+awm82fMjVzvpqncGhGNmpIouRq5y3KblwtZPiG60M=; b=MVQkWEgHn89reMMMagEKsCxP10p1pBzLkqPxSfgsm1r0j/OfHEFvn4VGHQ1JHsGWsENzJHXWZ7WXwLCTAPOZsFXaiNRzddsULff8q8BGCNQu7PTqYBOXGCYgvEJ0ZrRckHQGHHdKGVgi8mo0AEUaSojJPjA8/rZpTgo6nm3H/TRflp6Onr7cEVsQ4aNnwdHEh8aYByev8a8IVqwGJUYcDM4IHa/e82IHsI+yjr9BS3tBvQY5ib59vVoqd+4+efq48g4NYUVw3XawazQhYoQ3qfpFcl711XSoEyDk9gtAZL0vtYc3kVjSuXXzXY6c58wc7Zj3a/PA2WSMmRzCrlU+yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none From: Jim Fehlig To: "libvir-list@redhat.com" Thread-Topic: [PATCH 2/2] libxl: send lifecycle event on PMSuspend Thread-Index: AQHVUhrtbbTg5I/QW0mrWDey+HsvIA== Date: Tue, 13 Aug 2019 21:06:08 +0000 Message-ID: <20190813210552.18613-3-jfehlig@suse.com> References: <20190813210552.18613-1-jfehlig@suse.com> In-Reply-To: <20190813210552.18613-1-jfehlig@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR14CA0066.namprd14.prod.outlook.com (2603:10b6:300:81::28) To BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=JFEHLIG@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:113:8044:4009:ffff:ffff:ffff:e5a1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: abd7dc62-ee2f-47e5-9bef-08d720320f7c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:BY5PR18MB3155; x-ms-traffictypediagnostic: BY5PR18MB3155: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:339; x-forefront-prvs: 01283822F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(136003)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(99286004)(50226002)(66556008)(4326008)(66446008)(66946007)(36756003)(64756008)(25786009)(186003)(446003)(66476007)(46003)(6916009)(1076003)(5660300002)(81156014)(11346002)(81166006)(53936002)(2351001)(2501003)(102836004)(6512007)(86362001)(486006)(8936002)(476003)(107886003)(386003)(8676002)(5640700003)(478600001)(6506007)(14454004)(52116002)(316002)(6486002)(305945005)(71190400001)(256004)(2616005)(54906003)(14444005)(76176011)(6436002)(7736002)(6116002)(71200400001)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3155; H:BY5PR18MB3315.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TyAmlKM8gUD9d/OYMKJP4mL1wWDCb3XdzuHxqhqirhHJA0dEYEzk/EOGO19wpW8/ILHUHYIREBJcWSuShCyD8p6ylVH/tOr/iGbCDyoaMmBcH2No0uTDTs8FfWCPja9GEOgSXSJGrfPS85nOlhQ335Stm+cHeapkENCe9fIOXRxxS/2GPgLXlIspL0x5WIQ48HWyV01vIaxZOcFZJmUGacwrJcRha4wiZMbKPCIMI7oTl03P4i+RISh9Qd+E/rKcrq7qfXFuKWxKm2ZR7Mm4NVT2ci4nuT5W7Uqb0IDNdLjO8lgbXTeNgaNUA+E2H/19jz9miHawYioXVrL9Ng3Cqy60XDHHM1L019+t9smWW/xJC9k6bwKuc8DBk8ij7JsmoSdHevBD91uNBUVTP2SX2s+xa/Ne4LgmxV8cKZFghzw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: abd7dc62-ee2f-47e5-9bef-08d720320f7c X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2019 21:06:08.0580 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BnCpIxgm9Kcz0bzPTBzGjZ/5STNvyBYrSVMDJodW7AnrKgCRYZb9hmJqLd+t4DK/t6HfoDtuttPYx7eQWVTLDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3155 X-OriginatorOrg: suse.com X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 13 Aug 2019 21:10:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 13 Aug 2019 21:10:08 +0000 (UTC) for IP:'15.124.2.86' DOMAIN:'m4a0040g.houston.softwaregrp.com' HELO:'m4a0040g.houston.softwaregrp.com' FROM:'JFEHLIG@suse.com' RCPT:'' X-RedHat-Spam-Score: 0.001 (RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY) 15.124.2.86 m4a0040g.houston.softwaregrp.com 15.124.2.86 m4a0040g.houston.softwaregrp.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id x7DLABa0022050 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] libxl: send lifecycle event on PMSuspend X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 13 Aug 2019 21:10:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" After a successful call to libxl_domain_suspend_only(), set domain state to VIR_DOMAIN_PMSUSPENDED and send lifecycle event. Signed-off-by: Jim Fehlig Reviewed-by: Daniel Henrique Barboza --- src/libxl/libxl_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 2a9db026bb..d0396e4781 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -1434,6 +1434,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, int ret =3D -1; libxlDriverPrivatePtr driver =3D dom->conn->privateData; libxlDriverConfigPtr cfg =3D libxlDriverConfigGet(driver); + virObjectEventPtr event =3D NULL; =20 virCheckFlags(0, -1); if (target !=3D VIR_NODE_SUSPEND_TARGET_MEM) { @@ -1474,6 +1475,10 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, goto endjob; } =20 + virDomainObjSetState(vm, VIR_DOMAIN_PMSUSPENDED, VIR_DOMAIN_PMSUSPENDE= D_UNKNOWN); + event =3D virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_PMSUS= PENDED, + VIR_DOMAIN_EVENT_PMSUSPENDED= _MEMORY); + ret =3D 0; =20 endjob: @@ -1481,6 +1486,7 @@ libxlDomainPMSuspendForDuration(virDomainPtr dom, =20 cleanup: virDomainObjEndAPI(&vm); + virObjectEventStateQueue(driver->domainEventState, event); return ret; } #endif --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list