From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEgLT-0001U0-E1 for qemu-devel@nongnu.org; Fri, 04 May 2018 15:26:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEgLP-0006hL-12 for qemu-devel@nongnu.org; Fri, 04 May 2018 15:26:19 -0400 From: Paul Durrant Date: Fri, 4 May 2018 20:25:59 +0100 Message-ID: <1525461967-32174-1-git-send-email-paul.durrant@citrix.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 0/8] xen_disk: legacy code removal and cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xen-devel@lists.xenproject.org, qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Paul Durrant , Anthony Perard , Gerd Hoffmann , Greg Kurz , Jason Wang , Kevin Wolf , Max Reitz , Paolo Bonzini , Stefano Stabellini The grant copy operation was added to libxengnttab in Xen 4.8.0 (released nearly 18 months ago) but the xen_disk PV backend QEMU is still carrying a significant amount of code purely to remain compatible with older versions of Xen. As can be inferred from the diff stats below, removing this support for older versions of Xen from QEMU reduces the size of the xen_disk source by around 320 lines (~25%). This versionseries maintains compatibility with older Xen, and OS not supporting the grant copy operation, by adding an emulation of it into the xen_backend code. Thus xen_disk can be simplified without regressing support for any environment. This series also performs general cleanup of the code by introducing and consistently using helper functions for calling into libxenttab. Paul Durrant (8): xen_backend: add grant table helpers xen_disk: remove open-coded use of libxengnttab xen: remove other open-coded use of libxengnttab xen_backend: add an emulation of grant copy xen_disk: remove use of grant map/unmap xen_backend: make the xen_feature_grant_copy flag private xen_disk: use a single entry iovec xen_disk: be consistent with use of xendev and blkdev->xendev hw/9pfs/xen-9p-backend.c | 32 ++- hw/block/xen_disk.c | 614 +++++++------------------------------------ hw/char/xen_console.c | 9 +- hw/net/xen_nic.c | 34 ++- hw/usb/xen-usb.c | 37 ++- hw/xen/xen_backend.c | 178 ++++++++++++- include/hw/xen/xen_backend.h | 34 ++- 7 files changed, 351 insertions(+), 587 deletions(-) --- Cc: Anthony Perard Cc: Gerd Hoffmann Cc: Greg Kurz Cc: Jason Wang Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bonzini Cc: Stefano Stabellini -- 2.1.4