Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp220945iog; Tue, 28 Jun 2022 21:14:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYSXjAl9KsLl3PhbrDK4+2lpa+zkNObpqM14YSgJEPxatZqYodcOxGV+TxupL95BzSd5Ku X-Received: by 2002:a17:902:e852:b0:16a:67d7:c427 with SMTP id t18-20020a170902e85200b0016a67d7c427mr7130661plg.154.1656476061271; Tue, 28 Jun 2022 21:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656476061; cv=none; d=google.com; s=arc-20160816; b=NaD0hmV8fs4KTEepmTEOqDnwjIjgipZnCLCYj/+0q/C7K1gmXLW3VkogEiKKEO0SeD pLnWer9+lyOn/oQxcCMvd6EXobH5B4tugHoc5hXa9duodbim+Wl7cFnvbiLHc8jlKQin 8gws8j2pDUx7zsF0q3PeQYK4NNk90Bas18AlI7CzXt7RZZSXbHU3tkPZPF4bkY7RBt1B THSslU8hQGfuHXCNwbcT74dmAwVeSHUiinJXsYOk6wvIw4Dot4s+BiLEWZ0zqQKf3myo dYPWZoa7A3FXEuwUq7TLzIm7oUGguRZN9WBE/mLvPwsbMLnN33+OOhJuWPoXIzqb/HB0 DYOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bg6heNJXq50eL6WsFIMxRV6MiBd1t5LqWZMr8mmOcec=; b=kxXZ+zi2wJ8wy5dXFXTHg+dtOu9Dd0QW7oyppqcIo75lWNcIL/sBNCeIegwRt+aJs0 jvsnAbZjsBR/4g6nMCOsXOSA/y6+C2ysM8Vp1gmH8b8CvQxX8Eyzkh85nTvo7rs+HduK BnvZHH0IP8nc4jGIqexA1b5NZZrSO2BRisb4YfdDUoWwXNZvhjCdaSY9JQvx1Q3vpLYt Opk09/IofMB4c3E/bpwpXVittLuq0urAhV2/i9FNb9Bb0O2LBRlwVkJoWWrlyPSs43oZ i4un1fVBQVKtyzxXCEEofCJ5FschCIZECNfTuoGJRa3670X1CuR16YyQsf7NqsZz/N4o 4JUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TCpZHVJ3; 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 k21-20020a17090aaa1500b001e8664a6013si1766110pjq.185.2022.06.28.21.14.08; Tue, 28 Jun 2022 21:14:21 -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=TCpZHVJ3; 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 S229804AbiF2EKv (ORCPT + 99 others); Wed, 29 Jun 2022 00:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbiF2EKu (ORCPT ); Wed, 29 Jun 2022 00:10:50 -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 5F11E3631A for ; Tue, 28 Jun 2022 21:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656475847; 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=bg6heNJXq50eL6WsFIMxRV6MiBd1t5LqWZMr8mmOcec=; b=TCpZHVJ3ivj+IeKzkj7z6dLwyDYdKVZlzNdadB+WYozqswSUtzFHJ/F03HwVh2G70l776L noCUqHaTWHPev4GirHSFxeyMO100ViHkNuYZ+9hla9Vj9iIhavilwu8uqBXYylNPCQGtyQ O1i2RdeHqyDhaa5ykdvvzn033UfCVl8= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-sgAEGjAlMMORqk1g9Nzraw-1; Wed, 29 Jun 2022 00:10:45 -0400 X-MC-Unique: sgAEGjAlMMORqk1g9Nzraw-1 Received: by mail-lf1-f70.google.com with SMTP id o7-20020a056512230700b004810a865709so4832209lfu.3 for ; Tue, 28 Jun 2022 21:10:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bg6heNJXq50eL6WsFIMxRV6MiBd1t5LqWZMr8mmOcec=; b=kvf5LqQJzgD+F4I/XhphJv5kcGB8OAQUTLAITNUv60L5z9ZYApv32nEh4m4RgNNdzP xWPo32lyhOCXxZl2S5thIRQloap4tChlzAJSSVjftrVHcEvBFUGpEtes1s8RvXHZeGo8 8c6qvgagePwXDKxucDsG5RSH9NPzXCcYZz5Q/C4kW9fEDXoHJLezHGzpLKAuFgfrr2N8 xKpsF+YRGyjjqpnca5yqGmmesE7G8ZNsa/gO2mEk4Rdk+W5siq27IaMavHIT/SIYW6D+ +8Rvudp5PXgF/daDUXbfLeruI2V+76vEuBG0vyN9krNKnHTsHp55GKKwslP/Y6jDsOce 6JGg== X-Gm-Message-State: AJIora9/Qdq+wgAQQIOqjUlSSuNcE0KLizTcyMYwIqxwiQhjvpP4usJ3 yieJYfr/gQWUlDNu/O5ClbYpt//3wxM0oFiI8tN6t9YkZvRXURght/o6zyU8odXu7nXN+p+Joa+ s1Gdd0RutVVHng5k2zwzNWOvkc2+7lJS+7KH7sR5C X-Received: by 2002:a05:651c:1610:b0:25a:75fa:f9cc with SMTP id f16-20020a05651c161000b0025a75faf9ccmr615145ljq.243.1656475843851; Tue, 28 Jun 2022 21:10:43 -0700 (PDT) X-Received: by 2002:a05:651c:1610:b0:25a:75fa:f9cc with SMTP id f16-20020a05651c161000b0025a75faf9ccmr615131ljq.243.1656475843670; Tue, 28 Jun 2022 21:10:43 -0700 (PDT) MIME-Version: 1.0 References: <20220623160738.632852-1-eperezma@redhat.com> <20220623160738.632852-2-eperezma@redhat.com> In-Reply-To: <20220623160738.632852-2-eperezma@redhat.com> From: Jason Wang Date: Wed, 29 Jun 2022 12:10:32 +0800 Message-ID: Subject: Re: [PATCH v6 1/4] vdpa: Add suspend operation To: =?UTF-8?Q?Eugenio_P=C3=A9rez?= Cc: netdev , linux-kernel , virtualization , kvm , "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 , Stefano Garzarella , Dan Carpenter , Harpreet Singh Anand , Xie Yongji , Zhang Min Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.2 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, Jun 24, 2022 at 12:07 AM Eugenio P=C3=A9rez w= rote: > > This operation is optional: It it's not implemented, backend feature bit > will not be exposed. A question, do we allow suspending a device without DRIVER_OK? Thanks > > Signed-off-by: Eugenio P=C3=A9rez > --- > include/linux/vdpa.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 7b4a13d3bd91..d282f464d2f1 100644 > --- a/include/linux/vdpa.h > +++ b/include/linux/vdpa.h > @@ -218,6 +218,9 @@ struct vdpa_map_file { > * @reset: Reset device > * @vdev: vdpa device > * Returns integer: success (0) or error (< = 0) > + * @suspend: Suspend or resume the device (optional) > + * @vdev: vdpa device > + * Returns integer: success (0) or error (< = 0) > * @get_config_size: Get the size of the configuration space i= ncludes > * fields that are conditional on feature bi= ts. > * @vdev: vdpa device > @@ -319,6 +322,7 @@ struct vdpa_config_ops { > u8 (*get_status)(struct vdpa_device *vdev); > void (*set_status)(struct vdpa_device *vdev, u8 status); > int (*reset)(struct vdpa_device *vdev); > + int (*suspend)(struct vdpa_device *vdev); > size_t (*get_config_size)(struct vdpa_device *vdev); > void (*get_config)(struct vdpa_device *vdev, unsigned int offset, > void *buf, unsigned int len); > -- > 2.31.1 >