Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4416526pxb; Tue, 2 Mar 2021 14:57:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJydJhejgbgAWXae73zYPnmnx+UZ2W/nWx7YDYnkaNN2uRYUu4cjJ0N7V5nS6iJwRnAXrkQH X-Received: by 2002:aa7:d687:: with SMTP id d7mr12266827edr.118.1614725850616; Tue, 02 Mar 2021 14:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614725850; cv=none; d=google.com; s=arc-20160816; b=TVNCP99Ic5lHMSfW8JSLD/d47KcpVC1Zfo5BGmJ2tV7C3MeORp4Xx32jZB4CSU+Wub zAHKGGN0aTt9q4Xif12yfeJ04ey46XwKuj35d9SLtIbDTB3oEdPKZkIDstbg5IW0sr+E 3Qgi0lka8WIbmJX+o5FrqhacThdwQyCqQ6SkftauAIOCqw53xoBk/+eXgbSawY0HYz0K dh9+7PZzoZm7N+z69/IB0uwgdFfqwGvGEhcihY2nPW13itCSr8hUbA3FA2VLygp4o/HI KBLZ4dKnBlZEBuEh6r4oojdkzzkfv4NZnp0P5v8Cy9k5EM+TUyGqCHS15vUYO/ybqFHh fizA== 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=iGoIdvlUz0nc9AN8ZEH5WnSE27CeiPYPvS6gyByubs0=; b=N4pvSvEw1bNNkDheBJG3lQ+Zst66L58JN6E1fHNFt/4JoSjq549A1x4ctarQ//cqUY Lz3G2wseSai88aU2EFnYaZRo402WCJp19ZNIy7+gKtip9k+ZsrR4668DTkpQ9BMgOqaZ ahIoJ6ei41wVXOejALyiOgaZkZoo8PxupJqfnqI5MduivjJwgfXeVoowysmM35FLwaeL fJOPH/Dtjo/b0kiulRq6YrK56h8RT6U9AhxZoW4Cggs4ruepIyc+y0oU6SLIvVJiMOu/ MPU+4IVQ45g23zow2VXYHm0aJefi7zvBWZ6Irxn8kkNqO8OAf9wrs/UEC8D2Ln4b0f5/ ivTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvYVhp2S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si14447152eje.365.2021.03.02.14.56.52; Tue, 02 Mar 2021 14:57:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvYVhp2S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230143AbhCBLPB (ORCPT + 99 others); Tue, 2 Mar 2021 06:15:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32036 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1838499AbhCBKza (ORCPT ); Tue, 2 Mar 2021 05:55:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614682443; 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=iGoIdvlUz0nc9AN8ZEH5WnSE27CeiPYPvS6gyByubs0=; b=LvYVhp2SG4F52XxIhQf6m0Ch+VA+VZ4MDb3/GYcEz+G7ewNDd46rNLSEum8Ke3UBUq6+zu UHY31qu9xSI9DWcRCrGEIL8bI3YEVXpW/SXHZHRDe3zyBncKMrvdA2ew1XGNBeysJ1SYtE bVkQEnzxnpvla3mpwh2678w3J1zYD8Q= 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-540-V1K4Oah_PzeYFrWjqcNxZQ-1; Tue, 02 Mar 2021 05:53:59 -0500 X-MC-Unique: V1K4Oah_PzeYFrWjqcNxZQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A3A6801976; Tue, 2 Mar 2021 10:53:58 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-13-124.pek2.redhat.com [10.72.13.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 473455D9D3; Tue, 2 Mar 2021 10:53:52 +0000 (UTC) Subject: Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero To: "Michael S. Tsirkin" Cc: Si-Wei Liu , elic@nvidia.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org References: <605e7d2d-4f27-9688-17a8-d57191752ee7@redhat.com> <20210222023040-mutt-send-email-mst@kernel.org> <22fe5923-635b-59f0-7643-2fd5876937c2@oracle.com> <20210223082536-mutt-send-email-mst@kernel.org> <3ff5fd23-1db0-2f95-4cf9-711ef403fb62@oracle.com> <20210224000057-mutt-send-email-mst@kernel.org> <52836a63-4e00-ff58-50fb-9f450ce968d7@oracle.com> <20210228163031-mutt-send-email-mst@kernel.org> <2cb51a6d-afa0-7cd1-d6f2-6b153186eaca@redhat.com> <20210302043419-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <178f8ea7-cebd-0e81-3dc7-10a058d22c07@redhat.com> Date: Tue, 2 Mar 2021 18:53:50 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210302043419-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/2 5:47 下午, Michael S. Tsirkin wrote: > On Mon, Mar 01, 2021 at 11:56:50AM +0800, Jason Wang wrote: >> On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote: >>> On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: >>>>> Detecting it isn't enough though, we will need a new ioctl to notify >>>>> the kernel that it's a legacy guest. Ugh :( >>>> Well, although I think adding an ioctl is doable, may I know what the use >>>> case there will be for kernel to leverage such info directly? Is there a >>>> case QEMU can't do with dedicate ioctls later if there's indeed >>>> differentiation (legacy v.s. modern) needed? >>> BTW a good API could be >>> >>> #define VHOST_SET_ENDIAN _IOW(VHOST_VIRTIO, ?, int) >>> #define VHOST_GET_ENDIAN _IOW(VHOST_VIRTIO, ?, int) >>> >>> we did it per vring but maybe that was a mistake ... >> >> Actually, I wonder whether it's good time to just not support legacy driver >> for vDPA. Consider: >> >> 1) It's definition is no-normative >> 2) A lot of budren of codes >> >> So qemu can still present the legacy device since the config space or other >> stuffs that is presented by vhost-vDPA is not expected to be accessed by >> guest directly. Qemu can do the endian conversion when necessary in this >> case? >> >> Thanks >> > Overall I would be fine with this approach but we need to avoid breaking > working userspace, qemu releases with vdpa support are out there and > seem to work for people. Any changes need to take that into account > and document compatibility concerns. Agree, let me check. > I note that any hardware > implementation is already broken for legacy except on platforms with > strong ordering which might be helpful in reducing the scope. Yes. Thanks > >