From patchwork Fri Aug 2 15:35:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 11073769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F426746 for ; Fri, 2 Aug 2019 15:37:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E60E2886F for ; Fri, 2 Aug 2019 15:37:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8281428874; Fri, 2 Aug 2019 15:37:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 135092886F for ; Fri, 2 Aug 2019 15:37:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1htZbK-00033g-Fn; Fri, 02 Aug 2019 15:36:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1htZbJ-00032y-It for xen-devel@lists.xenproject.org; Fri, 02 Aug 2019 15:36:13 +0000 X-Inumbo-ID: 3feb4f18-b53b-11e9-964a-6368ec9e1575 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3feb4f18-b53b-11e9-964a-6368ec9e1575; Fri, 02 Aug 2019 15:36:09 +0000 (UTC) Authentication-Results: esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: jFJBgI4oDbHIzUy6+Bp83BOFGKL/kf0++bUMXjrRW40iX4NmIjgTOUCNAcaVS7nincotfkE9+v KXPewQAOSxVSZoACj0w+4e0Q6+v2ITxsHx7+oCDZoYGx3XyoE2zFfHn6nlQntgqLmi/DQqyygt K4QNcueEm+7TxyKNXi6qDnbJ33sFWCYIdL7vTS62mJVt1Y/c+rQiipHt7Wnup4Y2+teELLumH6 EA1pnBpP3D2CzHRh2jFRVnuBohR4Np0O/xnAbf35ucRovTgJn2S8TYZQrc4WbjJQ+3tymH9Ul3 FEo= X-SBRS: 2.7 X-MesageID: 3910073 X-Ironport-Server: esa5.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="3910073" From: Anthony PERARD To: Date: Fri, 2 Aug 2019 16:35:31 +0100 Message-ID: <20190802153606.32061-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 00/35] libxl refactoring to use ev_qmp (with API changes) 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 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, On the quest to have QEMU depriviledge, we need to make quite a few changes to libxl. This patch series rework quite a few libxl feature to use libxl__ev_qmp, which is the new asynchronous way of communicating with QEMU in libxl. Unfortunately, some libxl functions (in the public API) are supposed to be synchronous but are communicating with QEMU before returning. So those functions are made asynchronous with an additional parameter `libxl_asyncop_how'. Functions that are changes: - libxl_domain_unpause - libxl_domain_pause - libxl_send_trigger - libxl_set_vcpuonline - libxl_retrieve_domain_configuration - libxl_qemu_monitor_command This series depends on both: - [PATCH v2 0/9] libxl: New slow lock + fix libxl_cdrom_insert with QEMU depriv - [PATCH 00/15] Some cleanup of libxl Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.libxl-ev_qmp-refactoring-v1 Cheers, Anthony PERARD (35): libxl: Make libxl_domain_unpause async libxl: Make libxl_send_trigger async libxl: Make libxl_set_vcpuonline async libxl: Make libxl_retrieve_domain_configuration async libxl: Make libxl_qemu_monitor_command async libxl: Use ev_qmp for switch_qemu_xen_logdirty libxl: Move "qmp_initializations" to libxl_dm libxl: Replace libxl__qmp_initializations by ev_qmp calls libxl: Deprecate libxl__domain_{unpause,resume} libxl: Re-introduce libxl__domain_resume libxl_domain: Convert libxl_domain_resume to use libxl__domain_resume libxl: Re-introduce libxl__domain_unpause libxl_dm: Update libxl__spawn_stub_dm to use libxl__domain_unpause libxl_domain: Convert libxl_domain_unpause to use libxl__domain_unpause libxl: Inline do_usbdev_add into libxl__device_usbdev_add libxl: Inline do_usbdev_remove into libxl__device_usbdev_remove libxl: Add libxl__ev_qmp to libxl__ao_device libxl: Add device_{config,type} to libxl__ao_device libxl_usb: Make libxl__device_usbctrl_add uses ev_qmp libxl_usb: Make libxl__initiate_device_usbctrl_remove uses ev_qmp libxl_usb: Make libxl__device_usbdev_add uses ev_qmp libxl: Use aodev for libxl__device_usbdev_remove libxl: libxl__initiate_device_usbdev_remove now use ev_qmp libxl: Remove libxl__qmp_run_command_flexarray libxl_pci: Coding style of do_pci_add libxl_pci: Only check if qemu-dm is running in qemu-trad case libxl_pci: Use libxl__ao_device with libxl__device_pci_add libxl_pci: Use ev_qmp in do_pci_add libxl_pci: Use libxl__ao_device with pci_remove libxl_pci: Use ev_qmp for pci_remove libxl: Use ev_qmp for libxl_send_trigger libxl: Use ev_qmp in libxl_set_vcpuonline libxl: Extract qmp_parse_query_cpus libxl: libxl_retrieve_domain_configuration now uses ev_qmp libxl: libxl_qemu_monitor_command now uses ev_qmp tools/libxl/libxl.h | 77 ++- tools/libxl/libxl_colo_restore.c | 4 +- tools/libxl/libxl_colo_save.c | 4 +- tools/libxl/libxl_create.c | 10 - tools/libxl/libxl_device.c | 2 + tools/libxl/libxl_dm.c | 239 +++++++- tools/libxl/libxl_dom_save.c | 41 +- tools/libxl/libxl_dom_suspend.c | 198 ++++++- tools/libxl/libxl_domain.c | 627 ++++++++++++++++---- tools/libxl/libxl_internal.h | 86 ++- tools/libxl/libxl_pci.c | 966 ++++++++++++++++++++++++++----- tools/libxl/libxl_qmp.c | 471 ++------------- tools/libxl/libxl_remus.c | 2 +- tools/libxl/libxl_usb.c | 598 +++++++++++++------ tools/xl/xl_cpupool.c | 2 +- tools/xl/xl_info.c | 3 +- tools/xl/xl_migrate.c | 4 +- tools/xl/xl_misc.c | 6 +- tools/xl/xl_saverestore.c | 5 +- tools/xl/xl_vcpu.c | 2 +- tools/xl/xl_vmcontrol.c | 13 +- 21 files changed, 2427 insertions(+), 933 deletions(-)