From patchwork Tue Dec 11 15:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 10724083 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 E7DA113BF for ; Tue, 11 Dec 2018 16:06:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D659727FAC for ; Tue, 11 Dec 2018 16:06:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C84C129A6B; Tue, 11 Dec 2018 16:06:26 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4AE9327FAC for ; Tue, 11 Dec 2018 16:06:25 +0000 (UTC) Received: from localhost ([::1]:39577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWkYC-0002l2-Bc for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Dec 2018 11:06:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWkQA-0004Wa-7E for qemu-devel@nongnu.org; Tue, 11 Dec 2018 10:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWkQ3-0003C1-QM for qemu-devel@nongnu.org; Tue, 11 Dec 2018 10:58:03 -0500 Received: from smtp03.citrix.com ([162.221.156.55]:59990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gWkQ3-000327-B8; Tue, 11 Dec 2018 10:57:59 -0500 X-IronPort-AV: E=Sophos;i="5.56,342,1539648000"; d="scan'208";a="73004610" From: Paul Durrant To: , , Date: Tue, 11 Dec 2018 15:57:24 +0000 Message-ID: <1544543862-9997-1-git-send-email-paul.durrant@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 162.221.156.55 Subject: [Qemu-devel] [PATCH v4 00/18] Xen PV backend 'qdevification' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Stefano Stabellini , Eduardo Habkost , "Michael S. Tsirkin" , Jason Wang , Tim Smith , Stefan Hajnoczi , Greg Kurz , Max Reitz , Paul Durrant , Gerd Hoffmann , Paolo Bonzini , Anthony Perard , =?utf-8?q?Marc-Andr=C3=A9_Lurea?= =?utf-8?q?u?= , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series introduces a new QOM compliant framework for Xen PV backends. This is achieved by first moving the current non-compliant framework aside, before building up a new framework incrementally. This series was prompted by a thread [1] started by Kevin Wolf in response to patches against xen_disk.c posted by Tim Smith. Therefore, alongside the patches introducing the new framework, other patches build up a QOM compliant replacement for 'xen_disk', called 'xen-qdisk'. Patch #16 swaps this new device into place (having establisheda mechanism to auto- instantiate devices that is compliant with existing Xen toolstacks in patch #15) and patch #18 then removes the old xen_disk code. Subsequent series will port other Xen PV backends across to the new framework. The series is also available as a repository branch [2] on xenbits.xen.org. [1] https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg00259.html [2] http://xenbits.xen.org/gitweb/?p=people/pauldu/qemu.git;a=shortlog;h=refs/heads/qom29 Paul Durrant (18): xen: re-name XenDevice to XenLegacyDevice... xen: introduce new 'XenBus' and 'XenDevice' object hierarchy xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom' xen: create xenstore areas for XenDevice-s xen: add xenstore watcher infrastructure xen: add grant table interface for XenDevice-s xen: add event channel interface for XenDevice-s xen: duplicate xen_disk.c as basis of dataplane/xen-block.c xen: remove unnecessary code from dataplane/xen-block.c xen: add header and build dataplane/xen-block.c xen: remove 'XenBlkDev' and 'blkdev' names from dataplane/xen-block xen: remove 'ioreq' struct/varable/field names from dataplane/xen-block.c xen: purge 'blk' and 'ioreq' from function names in dataplane/xen-block.c xen: add implementations of xen-block connect and disconnect functions... xen: add a mechanism to automatically create XenDevice-s... xen: automatically create XenBlockDevice-s MAINTAINERS: add myself as a Xen maintainer xen: remove the legacy 'xen_disk' backend MAINTAINERS | 5 +- hw/9pfs/xen-9p-backend.c | 16 +- hw/block/Makefile.objs | 2 +- hw/block/dataplane/Makefile.objs | 1 + hw/block/dataplane/xen-block.c | 808 ++++++++++++++++++++++++ hw/block/dataplane/xen-block.h | 29 + hw/block/trace-events | 11 + hw/block/xen-block.c | 847 +++++++++++++++++++++++++ hw/block/xen_disk.c | 1011 ----------------------------- hw/char/xen_console.c | 12 +- hw/display/xenfb.c | 25 +- hw/i386/xen/xen-hvm.c | 5 +- hw/i386/xen/xen-mapcache.c | 2 +- hw/i386/xen/xen_platform.c | 2 +- hw/net/xen_nic.c | 14 +- hw/usb/xen-usb.c | 25 +- hw/xen/Makefile.objs | 2 +- hw/xen/trace-events | 26 + hw/xen/xen-backend.c | 69 ++ hw/xen/xen-bus-helper.c | 184 ++++++ hw/xen/xen-bus.c | 1189 +++++++++++++++++++++++++++++++++++ hw/xen/xen-common.c | 2 +- hw/xen/xen-legacy-backend.c | 853 +++++++++++++++++++++++++ hw/xen/xen_backend.c | 845 ------------------------- hw/xen/xen_devconfig.c | 2 +- hw/xen/xen_pt.c | 2 +- hw/xen/xen_pt_config_init.c | 2 +- hw/xen/xen_pt_graphics.c | 2 +- hw/xen/xen_pt_msi.c | 2 +- hw/xen/xen_pvdev.c | 20 +- hw/xenpv/xen_domainbuild.c | 2 +- hw/xenpv/xen_machine_pv.c | 5 +- include/hw/xen/xen-backend.h | 26 + include/hw/xen/xen-block.h | 79 +++ include/hw/xen/xen-bus-helper.h | 45 ++ include/hw/xen/xen-bus.h | 138 ++++ include/hw/xen/xen-legacy-backend.h | 104 +++ include/hw/xen/xen_backend.h | 99 --- include/hw/xen/xen_pvdev.h | 38 +- include/qemu/module.h | 3 + 40 files changed, 4512 insertions(+), 2042 deletions(-) create mode 100644 hw/block/dataplane/xen-block.c create mode 100644 hw/block/dataplane/xen-block.h create mode 100644 hw/block/xen-block.c delete mode 100644 hw/block/xen_disk.c create mode 100644 hw/xen/xen-backend.c create mode 100644 hw/xen/xen-bus-helper.c create mode 100644 hw/xen/xen-bus.c create mode 100644 hw/xen/xen-legacy-backend.c delete mode 100644 hw/xen/xen_backend.c create mode 100644 include/hw/xen/xen-backend.h create mode 100644 include/hw/xen/xen-block.h create mode 100644 include/hw/xen/xen-bus-helper.h create mode 100644 include/hw/xen/xen-bus.h create mode 100644 include/hw/xen/xen-legacy-backend.h delete mode 100644 include/hw/xen/xen_backend.h --- Cc: Anthony Perard Cc: Eduardo Habkost Cc: Gerd Hoffmann Cc: Greg Kurz Cc: Jason Wang Cc: Kevin Wolf Cc: "Marc-André Lureau" Cc: Marcel Apfelbaum Cc: Max Reitz Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Stefan Hajnoczi Cc: Stefano Stabellini Cc: Tim Smith v4: - Add missing boilerplate fix v3: - Various fixes, including unplug v2: - Fix boilerplates of introduced files and leave existing ones alone