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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 4A2CFC433E0 for ; Wed, 24 Feb 2021 09:33:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0563D64EBB for ; Wed, 24 Feb 2021 09:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234662AbhBXJdP (ORCPT ); Wed, 24 Feb 2021 04:33:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45725 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234618AbhBXJcU (ORCPT ); Wed, 24 Feb 2021 04:32:20 -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: netdev@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