Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6375944rwl; Wed, 22 Mar 2023 09:47:10 -0700 (PDT) X-Google-Smtp-Source: AK7set+WPhVOp/P4sNAyoBTsOo2i+M7aDoaTEr6gocYHfAbk1jRMuMRxMLAJSCYBgEpbiLInpTa9 X-Received: by 2002:a17:90b:3b90:b0:23f:9be4:9bb7 with SMTP id pc16-20020a17090b3b9000b0023f9be49bb7mr4473219pjb.9.1679503629823; Wed, 22 Mar 2023 09:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679503629; cv=none; d=google.com; s=arc-20160816; b=DbFiiQF0iDl86r4x0nvmvVI2iwnngiGxfBfj3WEknlDZw0kqMkpF8a4YAiT0VXLc4W OEMlZwBQSpZx315Pz2kURs+sUxtnEM2lU5WpT8uPCTcyUEQTeDGcC3eTXZ/uJ7Ax+7bm vPEyfMvF5UOIbYcADaJk2jOWL664WAJrrRxoeunDWQB6WQRP4Vfcf+4Yk0ZivDeS4Iou ZMa7Kak+PTPAULYCY85U24ULwhFiTh2K49MlyN7U3LiYl8I54g3YSY6AJV81x6pThhqy qJIQWfStJbKhS69z0Xkg2YsHxwaiv3zDuGPemaVXoFsICm8IBhgJjxzcXBONlk5N89yC AvpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:organization:in-reply-to:subject:cc:to:from :dkim-signature; bh=cC9A56nYy1+m5j88UXEHoA+LJcmsoLgXsOwYg6hVvpA=; b=k6193sYqRkcEHcZHODEwhVw+08GNO4fCemm9yee8oT9yM2uK2ebzkMDepMQGNLxLgm /e7+zWXnpVFbrREH6IJeTGib2TPw262FRgFOi94+QUQa4DEemsOxeeZ2EpSieKa/J9u+ +54z7/GO/GD+59EUWQdFsOniDVTebyVvXZP8xhu57ecq6oLN3Yc4kk3ANwaJYaLugT4X 7/5XN7SOoUZ/9tsvxGxToo2emnKLp2JeKSz6GaclrC1uhTiH7NEaIHiRcvspot7rCBkA aPKzpqaxRYfE0aNZ9TYM7XUt0LNpvdYOy//8XCS6cqDkv4eUA3yz6j7VQPiKLVgOY4yC +RdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ifPGVzli; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nu9-20020a17090b1b0900b0023fc0a96e42si8717041pjb.181.2023.03.22.09.46.58; Wed, 22 Mar 2023 09:47:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ifPGVzli; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230413AbjCVQnV (ORCPT + 99 others); Wed, 22 Mar 2023 12:43:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbjCVQnO (ORCPT ); Wed, 22 Mar 2023 12:43:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2309C62FCE for ; Wed, 22 Mar 2023 09:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679503345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cC9A56nYy1+m5j88UXEHoA+LJcmsoLgXsOwYg6hVvpA=; b=ifPGVzlip0YKEZkqFCD9cPSfxWpiEXR0xNNtkQDCA2SfaQJwc/g6J9h7R/r8M9kfzVkeZD Cq3Ad9gcf7pxxf+W22AfH4zqlsrdqiNJI+gx9VgEq8jqXE5QCN3X9gBVGAcYty4WEiyotH Mdwl+0dE/NnuglA7oacoORrQ4bLdrHQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-5HfkHJV8NauG4Jivpvuunw-1; Wed, 22 Mar 2023 12:42:22 -0400 X-MC-Unique: 5HfkHJV8NauG4Jivpvuunw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 56DB02823822; Wed, 22 Mar 2023 16:42:21 +0000 (UTC) Received: from localhost (dhcp-192-239.str.redhat.com [10.33.192.239]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CD47492C13; Wed, 22 Mar 2023 16:42:20 +0000 (UTC) From: Cornelia Huck To: "Michael S. Tsirkin" , Viktor Prutyanov Cc: jasowang@redhat.com, pasic@linux.ibm.com, farman@linux.ibm.com, linux-s390@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, yan@daynix.com Subject: Re: [PATCH v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support In-Reply-To: <20230322123121-mutt-send-email-mst@kernel.org> Organization: Red Hat GmbH References: <20230322141031.2211141-1-viktor@daynix.com> <20230322123121-mutt-send-email-mst@kernel.org> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Date: Wed, 22 Mar 2023 17:42:20 +0100 Message-ID: <87mt44hh5f.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Wed, Mar 22 2023, "Michael S. Tsirkin" wrote: > On Wed, Mar 22, 2023 at 05:10:31PM +0300, Viktor Prutyanov wrote: >> According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature >> indicates that the driver passes extra data along with the queue >> notifications. >> >> In a split queue case, the extra data is 16-bit available index. In a >> packed queue case, the extra data is 1-bit wrap counter and 15-bit >> available index. >> >> Add support for this feature for MMIO, channel I/O and modern PCI >> transports. >> >> Signed-off-by: Viktor Prutyanov >> --- >> v4: remove VP_NOTIFY macro and legacy PCI support, add >> virtio_ccw_kvm_notify_with_data to virtio_ccw >> v3: support feature in virtio_ccw, remove VM_NOTIFY, use avail_idx_shadow, >> remove byte swap, rename to vring_notification_data >> v2: reject the feature in virtio_ccw, replace __le32 with u32 >> >> Tested with disabled VIRTIO_F_NOTIFICATION_DATA on qemu-system-s390x >> (virtio-blk-ccw), qemu-system-riscv64 (virtio-blk-device, >> virtio-rng-device), qemu-system-x86_64 (virtio-blk-pci, virtio-net-pci) >> to make sure nothing is broken. >> Tested with enabled VIRTIO_F_NOTIFICATION_DATA on 64-bit RISC-V Linux >> and my hardware implementation of virtio-rng. > > what did you test? virtio pci? mmio? guessing not ccw... > > Cornelia could you hack up something to quickly test ccw? Hm, I'm not entirely sure how notification data is supposed to be used in real life -- Viktor, what is your virtio-rng implementation doing; can this be hacked into all transports? (Also, if the other ccw folks have something handy, please speak up :)