Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp511802imw; Fri, 8 Jul 2022 06:59:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vz/ji6UHELaB2e2ytL9bcmGPs6MyAoBHZ6s256+jR0Qk/5zy5RK8pNZMu1WCHINyp8OBF3 X-Received: by 2002:a05:6402:3297:b0:43a:9233:23b4 with SMTP id f23-20020a056402329700b0043a923323b4mr4895020eda.397.1657288781802; Fri, 08 Jul 2022 06:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657288781; cv=none; d=google.com; s=arc-20160816; b=fjFkzi02TYq3pjkTMaTAPVHwTIPPSuTSVdxKAELdE50eYm3bU/c6DJkV6BeVZHnQm5 w59Sm0dWqhUm7JQ5TZMy2fafBAIY9TwHZIJHajcDDYD6c2bpV4gVH9HY8lez87Wy44Cu h88ZD9nIk+8lSELWOYxUwCFnSAlqxs2jfNQG3GhDjZzh93vrXqNfKSSRiK2SKJuny7hC xlsAPDpNY9RmFJIgt6neZvar7ePiOOAzzU2NmrkTLbiuk6E4DnXkM60I4D7520fSLUje /WBW7AnfRaOgifYqHORA1W0OUooLgz/sszVrNvK8IatjQtyd5hNAlx9wBE25W3clWgi5 EFkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yVefCn2Sr2XDtcSF1e802d6x0OPOMy5L9rDF1Zp3WNI=; b=t6coxQKap4N4SyUnR7OvBnbJJMdpUif9iHIt9UX3gz95RdUXJ6BgfNSgSZwoWc9rkV PZdmStpbiJUKXZbZ3RjBHOFgWTzv9GiFhxoSn+nBHE/UYGadEZvu7EYd+VYSpSzI7wkX mNhSoa2AGN35bNDuB6EH0s81V4bw5DGAs53sG1UKG7GyTAIuOun2hO2u8kH7VL1FRyfG Ib09Rcj/2AtkdeUSOW4iRkYrgH6TaCtypezqmRi65aeGOAu4ZvKmdQu79ZMqEnYX6SFE F+IaJbrsx5D376epgFlPwBbQKBBmkXOlEcorJ58hD8LKLPlIJkHjk/ZU1JQIqW+k6lCv BBPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g5RKiSaL; 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 sh7-20020a1709076e8700b00711da8bb5easi7608813ejc.871.2022.07.08.06.59.10; Fri, 08 Jul 2022 06:59:41 -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=g5RKiSaL; 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 S233022AbiGHNwA (ORCPT + 99 others); Fri, 8 Jul 2022 09:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237408AbiGHNv6 (ORCPT ); Fri, 8 Jul 2022 09:51:58 -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 ESMTP id 05DF91C903 for ; Fri, 8 Jul 2022 06:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657288315; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yVefCn2Sr2XDtcSF1e802d6x0OPOMy5L9rDF1Zp3WNI=; b=g5RKiSaLNTJsuN+HoWqeC8Vy+A9ukQ2LYcJj3XhpeQf8S/Ixs4FynpTytVjGhV/v4cb+wn Pu2JYbs7JlFecnAX83mj0UrrLZLLGPb+08Gli6+P2ieYpcjT/hkGEaP8a7T6RHaAHtz3ys 9Ja8+1KD6ISCP2kiTqYYfPUtMNIWtGc= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-37-oWvo6nq7MbCZdA-mLH1OYg-1; Fri, 08 Jul 2022 09:51:53 -0400 X-MC-Unique: oWvo6nq7MbCZdA-mLH1OYg-1 Received: by mail-qt1-f200.google.com with SMTP id a7-20020ac84347000000b00319bb5d130eso18569797qtn.14 for ; Fri, 08 Jul 2022 06:51:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=yVefCn2Sr2XDtcSF1e802d6x0OPOMy5L9rDF1Zp3WNI=; b=GeLSRGd/QwMbxoO6e9WSGjpbW1hlxDH6OB48ztqcwYidr2aKtbqGiE+Od5VAaBMt0n br+2bXqH47aCrRFGKfBOQZocj5pKQnOzNyAynb48imm1q4KulagxaLiZWuGI/BkQ1zgu wDB4XocpPFLo8UY6eqgYA6KJnWV1DZ8+hQ0Un6NX5i4cSH5fX5OPNTYwzFey8O0nyIyl iiukvpdwIwQgNUKKkv3fyu3QmRoc1kH6gz1UJu9zBukLoWBOuSYaRpOkvdd0xc+N1IWG uix4wSgFmrbnwroAHnzdB6g/2AFI60OQiXsypQpbT8atYDn+Wn0NiNk6rG2u+G+/ht6b Q/Ow== X-Gm-Message-State: AJIora9pKaVpF1Z6H0J9cHmyY7FdhSbeg28qGWABdqltMYYq+SScusgs 1332Fh/r8sJW7DDCpTwTb9pS1zy6lY5JqBbd7ffh/ObeljZDYJdkmVCNCRHbe/3HMLfg61W4nMR Jx+YVB9O1LcsYJ+AwqVRuuisH X-Received: by 2002:a05:6214:20ea:b0:473:421d:d459 with SMTP id 10-20020a05621420ea00b00473421dd459mr1714714qvk.27.1657288313016; Fri, 08 Jul 2022 06:51:53 -0700 (PDT) X-Received: by 2002:a05:6214:20ea:b0:473:421d:d459 with SMTP id 10-20020a05621420ea00b00473421dd459mr1714693qvk.27.1657288312809; Fri, 08 Jul 2022 06:51:52 -0700 (PDT) Received: from sgarzare-redhat (host-79-46-200-206.retail.telecomitalia.it. [79.46.200.206]) by smtp.gmail.com with ESMTPSA id t14-20020a05620a004e00b006a6d20386f6sm31658212qkt.42.2022.07.08.06.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 06:51:50 -0700 (PDT) Date: Fri, 8 Jul 2022 15:51:38 +0200 From: Stefano Garzarella To: Eugenio Perez Martin Cc: netdev , Jason Wang , linux-kernel , virtualization , kvm list , "Michael S. Tsirkin" , Parav Pandit , Christophe JAILLET , Cindy Lu , "Kamde, Tanuj" , Si-Wei Liu , "Uminski, Piotr" , habetsm.xilinx@gmail.com, "Dawar, Gautam" , Pablo Cascon Katchadourian , Zhu Lingshan , Laurent Vivier , Longpeng , Dinan Gunawardena , Martin Petrus Hubertus Habets , Martin Porter , Eli Cohen , ecree.xilinx@gmail.com, Wu Zongyong , Dan Carpenter , Harpreet Singh Anand , Xie Yongji , Zhang Min Subject: Re: [PATCH v6 2/4] vhost-vdpa: introduce SUSPEND backend feature bit Message-ID: <20220708135138.kjdnnxelgll2p3cv@sgarzare-redhat> References: <20220623160738.632852-1-eperezma@redhat.com> <20220623160738.632852-3-eperezma@redhat.com> <20220628134340.5fla7surd34bwnq3@sgarzare-redhat> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_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 Fri, Jul 08, 2022 at 01:38:45PM +0200, Eugenio Perez Martin wrote: >On Tue, Jun 28, 2022 at 3:43 PM Stefano Garzarella wrote: >> >> On Thu, Jun 23, 2022 at 06:07:36PM +0200, Eugenio P?rez wrote: >> >Userland knows if it can suspend the device or not by checking this feature >> >bit. >> > >> >It's only offered if the vdpa driver backend implements the suspend() >> >operation callback, and to offer it or userland to ack it if the backend >> >does not offer that callback is an error. >> >> Should we document in the previous patch that the callback must be >> implemented only if the drive/device support it? >> > >It's marked as optional in the doc, following other optional callbacks >like set_group_asid for example. But I'm ok with documenting this >behavior further. > >> The rest LGTM although I have a doubt whether it is better to move this >> patch after patch 3, or merge it with patch 3, for bisectability since >> we enable the feature here but if the userspace calls ioctl() with >> VHOST_VDPA_SUSPEND we reply back that it is not supported. >> > >I'm fine with moving it, but we will have that behavior with all the >devices anyway. Regarding userspace, we just replace ENOIOCTL with >EOPNOTSUPP. Or I'm missing something? Yep, you're right, this is fine! ;-) Stefano