Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1213185imu; Fri, 7 Dec 2018 16:57:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/UswA5qC3XMBVr76T462vLgbyTVm08ewGq8VKEtRVw3KtFgJpRol22J6SXOCK1KDPGDuG6B X-Received: by 2002:a62:da5a:: with SMTP id w26mr4315748pfl.106.1544230647562; Fri, 07 Dec 2018 16:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544230647; cv=none; d=google.com; s=arc-20160816; b=Vpl8+zxwVx293/XZ73oi6FE1pnSAt9nAWc/UtK1qQs3OCwAeWUN658FNWbv95h97Ow nfoCvsytrOWbUhZdKKW+ESG7tyyAkicGX3ghRz58y2a6Yni8FS5/NZ8S7n2udKwDKtCQ KQft0Ho/dIJEuCFQceEMC/HMQE46SQA8N16xJnpq7in+u61/kNazCsyznx6LyZjYSOqF h7ceywGvipNuv3yl1BWOWVC7UKmok58/5CTdQFOGbQc8SYje8Q6doCubYCN0DFN+A7kv MNvirKtMre55w/OO7HB2m6wafGBLk7bqi9zcJZlotbMqWaxv4GiURGLrijzKdxqCfqVV CfZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature; bh=J+lVoOHuj8szMg+MYqI8zrVm2AoYn6Sxi8Y9P2ILo8k=; b=F3m2JayY80qAIe/Q04aw5bsRz+Ou45El2Age7OmSAhOlyAfFdf+uXCD+Zu7hDrqxLM sf6xsDTmlemYnWq1t5ckOJ+OKSCT7wlbys1dxg2P1WhX1ihUX1gLhw82bL518nZLESU0 52Z8QwCc79aFsf3U0YFnlI05I8J7etHH6yefYI+X/jN/WxX+9F9gGrLZGxVewlk/VGZT LfXX5ANQEoPa+xejosAhoaa5ENb69AqUqvAMd+tTFOL7i4gwyJqZllAgPJIrClKTTe5Z HDqtaDYxtoZ4Xdhl034kCM4EdJoqvnzIqjW68y9Ih606huz16eUrCr1+7A+KbVvNjNRC 4uPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=FVqmMQvc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k64si4011651pge.7.2018.12.07.16.57.11; Fri, 07 Dec 2018 16:57:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=FVqmMQvc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726110AbeLHA4U (ORCPT + 99 others); Fri, 7 Dec 2018 19:56:20 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:52382 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeLHA4T (ORCPT ); Fri, 7 Dec 2018 19:56:19 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB80tQIa170767; Sat, 8 Dec 2018 00:56:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=J+lVoOHuj8szMg+MYqI8zrVm2AoYn6Sxi8Y9P2ILo8k=; b=FVqmMQvcooIXYbzOxPQ0e2tZZTInCvN4LIlTIgMO3+c1c/Qw1VwRCEWuengBdoMSwUe1 Uux5MyHbDakpJumdykYdphknG7fthaRo8bDyjWwf2lz3mfy7Bcs9yvbmt+rFMf5ywKrO Re0XJj2qY4aEfher0/gaBefTv7GZc9R4pLLaJ4j/Qpw/2/VnNgQ7QKtl2lkfOtrGtvfQ 6J96pqsZIAf5cMURB9s5emTzIgplriDdRWBSDp0Yp+Qf+eXOt8cUvv2R5Wzl5+0VrVci RIlrQbYGtQw1dlPzihrXE8JzpENGZf67E5x2nQTdK/uBxuWo8dsxwIA1ObssvJF6HUgY dQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2p83fdr119-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 08 Dec 2018 00:56:14 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wB80uEFb004218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 8 Dec 2018 00:56:14 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB80uEdo028001; Sat, 8 Dec 2018 00:56:14 GMT Received: from [10.191.0.52] (/10.191.0.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Dec 2018 16:56:13 -0800 Subject: Re: [PATCH 1/1] virtio: remove deprecated VIRTIO_PCI_CONFIG() To: "Michael S. Tsirkin" References: <1544168081-13205-1-git-send-email-dongli.zhang@oracle.com> <20181207125951-mutt-send-email-mst@kernel.org> Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, jasowang@redhat.com From: Dongli Zhang Message-ID: Date: Sat, 8 Dec 2018 08:56:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20181207125951-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9100 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812080006 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/08/2018 02:01 AM, Michael S. Tsirkin wrote: > On Fri, Dec 07, 2018 at 03:34:41PM +0800, Dongli Zhang wrote: >> VIRTIO_PCI_CONFIG() is deprecated. Use VIRTIO_PCI_CONFIG_OFF() instead. >> >> Signed-off-by: Dongli Zhang >> --- >> drivers/virtio/virtio_pci_legacy.c | 6 ++++-- >> include/uapi/linux/virtio_pci.h | 2 -- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c >> index de062fb..eff9ddc 100644 >> --- a/drivers/virtio/virtio_pci_legacy.c >> +++ b/drivers/virtio/virtio_pci_legacy.c >> @@ -52,7 +52,8 @@ static void vp_get(struct virtio_device *vdev, unsigned offset, >> { >> struct virtio_pci_device *vp_dev = to_vp_device(vdev); >> void __iomem *ioaddr = vp_dev->ioaddr + >> - VIRTIO_PCI_CONFIG(vp_dev) + offset; >> + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + >> + offset; >> u8 *ptr = buf; >> int i; >> >> @@ -67,7 +68,8 @@ static void vp_set(struct virtio_device *vdev, unsigned offset, >> { >> struct virtio_pci_device *vp_dev = to_vp_device(vdev); >> void __iomem *ioaddr = vp_dev->ioaddr + >> - VIRTIO_PCI_CONFIG(vp_dev) + offset; >> + VIRTIO_PCI_CONFIG_OFF(vp_dev->msix_enabled) + >> + offset; >> const u8 *ptr = buf; >> int i; >> > > I agree that VIRTIO_PCI_CONFIG_OFF is a better interface. So above looks > fine. > >> diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h >> index 90007a1..2070232 100644 >> --- a/include/uapi/linux/virtio_pci.h >> +++ b/include/uapi/linux/virtio_pci.h >> @@ -78,8 +78,6 @@ >> /* The remaining space is defined by each driver as the per-driver >> * configuration space */ >> #define VIRTIO_PCI_CONFIG_OFF(msix_enabled) ((msix_enabled) ? 24 : 20) >> -/* Deprecated: please use VIRTIO_PCI_CONFIG_OFF instead */ >> -#define VIRTIO_PCI_CONFIG(dev) VIRTIO_PCI_CONFIG_OFF((dev)->msix_enabled) >> >> /* Virtio ABI version, this must match exactly */ >> #define VIRTIO_PCI_ABI_VERSION 0 > > This might break some userspace builds, I don't see why we should bother > removing it. Any reason? Apologies. I thought about some compatibility issue for building third-party kernel module at userspace, but did not realize it will break other userspace software builds. I will keep the definition of VIRTIO_PCI_CONFIG() and resend again. Thank you very much! Dongli Zhang > > >> -- >> 2.7.4