Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp388661pxb; Wed, 24 Feb 2021 05:07:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzh47fT9LpY6MVxfidZkCFKnLoed6c+q4yKVYb2ElNmlv65cnxm0XzSqeD0YgIZhxTneL1K X-Received: by 2002:a05:6402:d1:: with SMTP id i17mr33024755edu.85.1614172061897; Wed, 24 Feb 2021 05:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614172061; cv=none; d=google.com; s=arc-20160816; b=U2GzOhv3fIyxxWSEHNbuhFQb2LB+FhYu3awx9rC5xWl6PVYr6OduiVBTRe9fqmqzMo U0uHlaDIKDdLbeA4dnz6ZOve+R/b/lHWJwOdQVWPp9m3veBgKM4+It/AQ+x9xUKy/vdd bARXzskfzXJs9rTXAhIjraOVgJgcQgrgNA81eokrViMI0V4oyL502f6oNimodgrK3H9F U6l37NTBecxm+rsyledH/A3m+ihxvjcz0Bx6qAj/IOUDEOqSS1yNgH00wJYunHqMoVlP cbynF3awSTqVE7WkjRStUgg1YwA+PMFJDXdgZ5R4+BksIQZmC/AS7WxiQHxngsUad222 8hbQ== 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=7aDdkz1NoI966nz5oxyifwdANt/93ivruZ7xE/ouurI=; b=cFpIU8YlfDEvEYkGEguHw9Yw50BZ4CCYn+ohSsun7G83SA5WnKAMRgIXRUf08cDCl+ bYEj67w9KVUDBIVPRoTKXaltGTUlfQYu8OUufjPOEStAyOsiWyE0/+WzEZUq+m08EBop V4e7KZjMx3V5yu05UVY+1RgEGjpVP1VdgLEMz72YBv3hl6jGoPLGmPaCdPFD46cy4N/j kPwmUPDTIqarGbdo9kgGZN0Yy9QsyQaOPc1h/tVCN6tE8enK5arGl89bl5ymH2VkcHjq rBefPHsu9L7pXFuRpsIZIzygdVJ0nUEEu5b+F3K78av2/l1VVEdAG2tFaflAhrk6U92c wP/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WT4D8b1f; 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 qn10si1222415ejb.682.2021.02.24.05.07.16; Wed, 24 Feb 2021 05:07:41 -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=WT4D8b1f; 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 S234654AbhBXJdK (ORCPT + 99 others); Wed, 24 Feb 2021 04:33:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26316 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234633AbhBXJcV (ORCPT ); Wed, 24 Feb 2021 04:32:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614159054; 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=7aDdkz1NoI966nz5oxyifwdANt/93ivruZ7xE/ouurI=; b=WT4D8b1fVU56E134D5BVfM5bw7+0bxJW7Pw85J7Za2H0IPqQaKZcZBrBjGkg8wIV15+wtu IqD3TC7VtxhodIQSXvJN/6ypUJYYLqxn5WSIvopHvQ4B3Qqj1ByaN5MoAywYqij6kWjMaq buRkNxMoLpmQKwMgtPjxyFRX1L646hg= 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-25-OesmgzzbMM6P57rwNLKp_A-1; Wed, 24 Feb 2021 04:30:50 -0500 X-MC-Unique: OesmgzzbMM6P57rwNLKp_A-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 0BFF480364D; Wed, 24 Feb 2021 09:30:49 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-12-28.pek2.redhat.com [10.72.12.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id EADDD6064B; Wed, 24 Feb 2021 09:30:38 +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: <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> <0559fd8c-ff44-cb7a-8a74-71976dd2ee33@redhat.com> <20210224014232-mutt-send-email-mst@kernel.org> <20210224021222-mutt-send-email-mst@kernel.org> <20210224034240-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: Date: Wed, 24 Feb 2021 17:30:37 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210224034240-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.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/24 4:43 下午, Michael S. Tsirkin wrote: > On Wed, Feb 24, 2021 at 04:26:43PM +0800, Jason Wang wrote: >> Basically on first guest access QEMU would tell kernel whether >> guest is using the legacy or the modern interface. >> E.g. virtio_pci_config_read/virtio_pci_config_write will call ioctl(ENABLE_LEGACY, 1) >> while virtio_pci_common_read will call ioctl(ENABLE_LEGACY, 0) >> >> >> But this trick work only for PCI I think? >> >> Thanks > ccw has a revision it can check. mmio does not have transitional devices > at all. Ok, then we can do the workaround in the qemu, isn't it? Thanks