Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4996263iob; Mon, 9 May 2022 06:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLtPtIsSXZNbHmSHghyzYu3EAlzL7oJlEw7h0EQWMIxZT0AUTC1+7Rp99jZ7eT8mOX8yTE X-Received: by 2002:a05:6a00:14cf:b0:510:5549:ad8a with SMTP id w15-20020a056a0014cf00b005105549ad8amr16144654pfu.24.1652103245130; Mon, 09 May 2022 06:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652103245; cv=none; d=google.com; s=arc-20160816; b=dSFj6Gi277HPPLDbEpHYkIkqC0ScZxqg2k5HA4Wcz/1n1tw+QgURUtBx8fwEomS1ck tkYaUf1n3bGjtgpo6I2Genkl5nmho/mo7FzrITlLuPqtZrpcfPRh6LHh4DOfZcW8B1O3 dEsh48qcwKQx2Fye66Gd7B32vEKjRsljdFSo8w8mSiGuYBULDtAE6yeXOMuDIn5Y2KuD h1T4NPa5VmQ1BFqMugucdrXhH2rhufWu/7/AB5EsskJYjKSKHKQikBetONZ2IUtywGsN 5IM6BF+bcJQ9b9DssTGRBUAmdgL9iB2fn6TsOmLUITXYcuZyF5QU/F6G0BB3jBieWyOy vBFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1K2obVx3YG8QEPrenU4QI5guJQ8Phbo/6yP70JTaawU=; b=Hc66SsKZmQOkg6wGj7NEwq1elYpKYKhf/+rlyIsMm9gBG+C9jzGQz091lHh0Y1uZlw o8oCQ+lXjyNuS6TCyTvJ7PiZwWzTSbCvjyyGyDyM50rBf+UzKH4Yp/QxKS5NR/gO4F1j POx4qSsCqsLqmhLg/TslKFAaVSRIv/Dbl7ZEgW4BHQDd1JYqFTaAl8WAUeZ0PLO5v6vn 3a3OLgXBQdBPrffpvev7lwekPcOAl5P8w6LfcZR4UALyGeujvvgXzFT+GOhDUd/VQhDe Bqkj1qrFo28GuGr1l1h9POBOTcTqF9/kfTCu/4E1s/PBRvCLRWH54gnMQSfuiQ2p/rVl wXaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ctuOdHCy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u36-20020a056a0009a400b0050ddae37a02si20367918pfg.253.2022.05.09.06.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:34:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ctuOdHCy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE3F13915E; Mon, 9 May 2022 06:25:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235766AbiEIN1w (ORCPT + 99 others); Mon, 9 May 2022 09:27:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235895AbiEIN1l (ORCPT ); Mon, 9 May 2022 09:27:41 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 384E31E251A; Mon, 9 May 2022 06:23:28 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id bu29so23828707lfb.0; Mon, 09 May 2022 06:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=1K2obVx3YG8QEPrenU4QI5guJQ8Phbo/6yP70JTaawU=; b=ctuOdHCyg4DfJDMuVyrfXjafqsIBGrPq9u27BiBAquJftMSjYFJ55Dztcsr8bNMn0w oeM//L+QbMc5cqR/YL4ZYXu9SspJYNvQLipuO/dxUV/COK7qJD4YPieEuwN+Da6gnICg tiL5ifQOF61sLM7j5k+TfKf3keD2QE9+mfbjkcLau1uokLQ0TJXXWGRj10hWZc6mNTCY ZiPlrCXkxh/d8AP+hVzj144bdbLZ6gunWEeo3XTOHdZMf+1T4Dk4fDvhUDM82hKq6q3x a24gfPwl0eQuynyAnF+v9tUB7WbmPEsnBDi3opOHoOjQkJbqyH8fYmRySBDQ1lHi3t+I lY6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=1K2obVx3YG8QEPrenU4QI5guJQ8Phbo/6yP70JTaawU=; b=mIkc0TZp+d1LwPecfcRJtDyH8BAqmNXPw1gYvuKs2yAX+y/qu14tJVn5mKfiCdAUiD J1PqhiIjZpmt4I41YmLtpvg+xbziJgzNGHXGMiOFa6DvXp7/eZptbtwLH2IAhvwlPCxS NabvguI5sndh9CnuM7+Nbt5RqzIBU1d3G0QPTQgzq002Of+D7T6HGgaawOrPEptXXb3P eUYjlsTq3r2LFbCvBBF+mq0oXHqqNcckY+cE/SOi0e0PXu5RldMDfIevfXgKBHyWePHP 0sgqvfjsdEogwf9f3gIvaQlDCS3kpPAdvafbIWiQQWGKMr+zn7KSbobrxskZHZW/vLap 5kFg== X-Gm-Message-State: AOAM530ONvoAN48p67Wf1oX/vzg/HnhHcWEtfhjcp+b/GIzlzZTrFcLh BlXgCeuNzxRrgAUVOGngXGI= X-Received: by 2002:ac2:4c49:0:b0:473:ca4f:9345 with SMTP id o9-20020ac24c49000000b00473ca4f9345mr12622420lfk.203.1652102606387; Mon, 09 May 2022 06:23:26 -0700 (PDT) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id h5-20020a056512338500b0047255d2111csm1941442lfg.75.2022.05.09.06.23.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 May 2022 06:23:25 -0700 (PDT) Subject: Re: [PATCH v3 00/21] xen: simplify frontend side ring setup To: Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-block@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 Cc: Boris Ostrovsky , Stefano Stabellini , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Jens Axboe , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "James E.J. Bottomley" , "Martin K. Petersen" , Greg Kroah-Hartman , Oleksandr Andrushchenko , David Airlie , Daniel Vetter , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , Bjorn Helgaas References: <20220505081640.17425-1-jgross@suse.com> From: Oleksandr Message-ID: <409fb110-646a-2973-aff3-c97fdfb9bfbc@gmail.com> Date: Mon, 9 May 2022 16:23:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20220505081640.17425-1-jgross@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.05.22 11:16, Juergen Gross wrote: Hello Juergen. > 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. > > Changes in V3: > - new patches 1 and 2, comments addressed > > Changes in V2: > - new patch 9 and related changes in patches 10-18 > > Juergen Gross (21): > xen: update grant_table.h > xen/grant-table: never put a reserved grant on the free list > 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: update ring.h > 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() For the patches that touch PV display (#07, #16), PV sound (#08, #20) and shared buffer framework used by both frontends (#10): Reviewed-by: Oleksandr Tyshchenko Also I didn't see any issues with these frontends while testing on Arm64 based board. So, you can also add: [Arm64 only] Tested-by: Oleksandr Tyshchenko Thanks! > > drivers/block/xen-blkfront.c | 57 +++---- > 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 | 43 ++---- > drivers/net/xen-netfront.c | 85 ++++------- > drivers/pci/xen-pcifront.c | 19 +-- > drivers/scsi/xen-scsifront.c | 31 +--- > drivers/usb/host/xen-hcd.c | 65 ++------ > drivers/xen/gntdev-dmabuf.c | 13 +- > drivers/xen/grant-table.c | 12 +- > drivers/xen/xen-front-pgdir-shbuf.c | 18 +-- > drivers/xen/xenbus/xenbus_client.c | 82 +++++++--- > include/xen/grant_table.h | 2 - > include/xen/interface/grant_table.h | 161 ++++++++++++-------- > include/xen/interface/io/ring.h | 19 ++- > include/xen/xenbus.h | 4 +- > sound/xen/xen_snd_front_evtchnl.c | 44 ++---- > sound/xen/xen_snd_front_evtchnl.h | 9 -- > 18 files changed, 287 insertions(+), 404 deletions(-) > -- Regards, Oleksandr Tyshchenko