From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8125EC55199 for ; Sun, 26 Apr 2020 07:39:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 623702071E for ; Sun, 26 Apr 2020 07:39:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ctu0ANVf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbgDZHjB (ORCPT ); Sun, 26 Apr 2020 03:39:01 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52663 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726282AbgDZHjA (ORCPT ); Sun, 26 Apr 2020 03:39:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587886738; 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=Vop1t3sjK9amtXfGYvpa+yLGCJ32ZxdBV2IWmBKObrI=; b=Ctu0ANVfJq59rA7cSGUn8iXYfL5IlDpdJSZcliIfiUctoVK0utI3jQtINa4EQRXvOkMW/8 ChucMRziEgNEwVQ8tcaTgiMXmueKr4ox+47bK2gYchD6jutKot4HHZ6eM6eKjJgxEi65DB 1uZaSolo6ND/J0MLfYcob5lKRbq5Bbs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-gqr-8FTQPiaXw8kYIrJ86A-1; Sun, 26 Apr 2020 03:38:52 -0400 X-MC-Unique: gqr-8FTQPiaXw8kYIrJ86A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E2D6872FE0; Sun, 26 Apr 2020 07:38:50 +0000 (UTC) Received: from [10.72.13.103] (ovpn-13-103.pek2.redhat.com [10.72.13.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FAA960300; Sun, 26 Apr 2020 07:38:43 +0000 (UTC) Subject: Re: [PATCH V2 1/2] vdpa: Support config interrupt in vhost_vdpa To: Zhu Lingshan , Zhu Lingshan , mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: lulu@redhat.com, dan.daly@intel.com, cunming.liang@intel.com References: <1587881384-2133-1-git-send-email-lingshan.zhu@intel.com> <1587881384-2133-2-git-send-email-lingshan.zhu@intel.com> <055fb826-895d-881b-719c-228d0cc9a7bf@redhat.com> From: Jason Wang Message-ID: Date: Sun, 26 Apr 2020 15:38:42 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/26 =E4=B8=8B=E5=8D=883:24, Zhu Lingshan wrote: > > > On 4/26/2020 3:03 PM, Jason Wang wrote: >> >> On 2020/4/26 =E4=B8=8B=E5=8D=882:58, Jason Wang wrote: >>>> >>>> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h >>>> index 1813821..8663139 100644 >>>> --- a/drivers/vhost/vhost.h >>>> +++ b/drivers/vhost/vhost.h >>>> @@ -18,6 +18,8 @@ >>>> =C2=A0 typedef void (*vhost_work_fn_t)(struct vhost_work *work); >>>> =C2=A0 =C2=A0 #define VHOST_WORK_QUEUED 1 >>>> +#define VHOST_FILE_UNBIND -1 >>> >>> >>> I think it's better to document this in uapi.=20 >> >> >> I meant e.g in vhost_vring_file, we had a comment of unbinding: >> >> struct vhost_vring_file { >> =C2=A0=C2=A0=C2=A0 unsigned int index; >> =C2=A0=C2=A0=C2=A0 int fd; /* Pass -1 to unbind from file. */ >> >> }; > I think it is better to use an int fd than vhost_vring_file, to avoid t= he confusions, > so if we add#define VHOST_FILE_UNBIND -1 in the uapi header, can it doc= ument itself? > Thanks I think so. Thanks >> >> Thanks >>