From patchwork Wed Apr 20 15:09:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 565237 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9290FC433F5 for ; Fri, 22 Apr 2022 13:52:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D054617D6; Fri, 22 Apr 2022 15:51:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D054617D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650635554; bh=G6ea1fpw5gRoog8FtrJZPvIqxrg1pc80ET+fXnmHV2s=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=pjgxLToUo6n9O6xiDg453rm3DCEqPM16venz66ox7B1BwfzqEbIWj09Nzhbm6hV2g dD/1eNtRJylC586m37PIQzyh2itp/zD4eL05/BiDvlp4vXWl8EoG09F0zw75LO0GL9 uj9D4Qu30Kb6RZ28zOL0eESTCAuz7j1EGfqNe4wI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id ADB74F80862; Fri, 22 Apr 2022 15:32:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C24E2F800F8; Wed, 20 Apr 2022 17:10:05 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 08BA9F800F8 for ; Wed, 20 Apr 2022 17:09:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 08BA9F800F8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="s7o4aJsX" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5B4A1210E4; Wed, 20 Apr 2022 15:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650467398; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=E9Za1fy7SJZVuU3gsJHYcUnfUQspR3rknfU8bXQql9Y=; b=s7o4aJsXllglxjEicM+le/pE5Q4+nZsQh1+qkc+l1wMXB8I5KM8EXHpK9vVJQBopp4olwE /0eL2tvJFzr8/5F+QMy5ysfmCp4A5ramqeRsMJKSZCtFDWgeFHKh6l0oEFDWWCNJk0EhzP yXIHNy0QuiJkmeTPgRibcNpvjDS2yuo= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 96AE513AD5; Wed, 20 Apr 2022 15:09:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QAKAI0UiYGJILQAAMHmgww (envelope-from ); Wed, 20 Apr 2022 15:09:57 +0000 From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-integrity@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 00/18] xen: simplify frontend side ring setup Date: Wed, 20 Apr 2022 17:09:24 +0200 Message-Id: <20220420150942.31235-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 22 Apr 2022 15:31:41 +0200 Cc: Juergen Gross , Jens Axboe , alsa-devel@alsa-project.org, Stefano Stabellini , "Martin K. Petersen" , Oleksandr Andrushchenko , David Airlie , Greg Kroah-Hartman , "James E.J. Bottomley" , Takashi Iwai , Jason Gunthorpe , Jarkko Sakkinen , Daniel Vetter , Bjorn Helgaas , Jakub Kicinski , Boris Ostrovsky , Paolo Abeni , "David S. Miller" , Peter Huewe , =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Many Xen PV frontends share similar code for setting up a ring page (allocating and granting access for the backend) and for tearing it down. Create new service functions doing all needed steps in one go. This requires all frontends to use a common value for an invalid grant reference in order to make the functions idempotent. Juergen Gross (18): xen/blkfront: switch blkfront to use INVALID_GRANT_REF xen/netfront: switch netfront to use INVALID_GRANT_REF xen/scsifront: remove unused GRANT_INVALID_REF definition xen/usb: switch xen-hcd to use INVALID_GRANT_REF xen/drm: switch xen_drm_front to use INVALID_GRANT_REF xen/sound: switch xen_snd_front to use INVALID_GRANT_REF xen/dmabuf: switch gntdev-dmabuf to use INVALID_GRANT_REF xen/shbuf: switch xen-front-pgdir-shbuf to use INVALID_GRANT_REF xen/xenbus: add xenbus_setup_ring() service function xen/blkfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/netfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/tpmfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/drmfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/pcifront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/scsifront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/usbfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/sndfront: use xenbus_setup_ring() and xenbus_teardown_ring() xen/xenbus: eliminate xenbus_grant_ring() drivers/block/xen-blkfront.c | 54 ++++---------- drivers/char/tpm/xen-tpmfront.c | 18 +---- drivers/gpu/drm/xen/xen_drm_front.h | 9 --- drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 40 +++------- drivers/net/xen-netfront.c | 77 ++++++-------------- drivers/pci/xen-pcifront.c | 19 +---- drivers/scsi/xen-scsifront.c | 30 ++------ drivers/usb/host/xen-hcd.c | 59 ++++----------- drivers/xen/gntdev-dmabuf.c | 13 +--- drivers/xen/xen-front-pgdir-shbuf.c | 17 +---- drivers/xen/xenbus/xenbus_client.c | 81 ++++++++++++++++----- include/xen/xenbus.h | 4 +- sound/xen/xen_snd_front_evtchnl.c | 41 +++-------- sound/xen/xen_snd_front_evtchnl.h | 9 --- 14 files changed, 156 insertions(+), 315 deletions(-)