From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E91F88DA1 for ; Tue, 19 Jan 2016 02:51:34 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 18 Jan 2016 17:51:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,315,1449561600"; d="scan'208";a="635775019" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 18 Jan 2016 17:51:35 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 18 Jan 2016 17:51:33 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 18 Jan 2016 17:51:33 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.231]) with mapi id 14.03.0248.002; Tue, 19 Jan 2016 09:51:31 +0800 From: "Xie, Huawei" To: Yuanhan Liu Thread-Topic: [PATCH v4 7/8] virtio: add 1.0 support Thread-Index: AdFSEsO9024IClH9QuSR9YlAzWxVyw== Date: Tue, 19 Jan 2016 01:51:30 +0000 Message-ID: References: <1452581944-24838-1-git-send-email-yuanhan.liu@linux.intel.com> <1452832571-6156-1-git-send-email-yuanhan.liu@linux.intel.com> <1452832571-6156-8-git-send-email-yuanhan.liu@linux.intel.com> <20160119013659.GF19531@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.4.160] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 01:51:35 -0000 On 1/19/2016 9:34 AM, Yuanhan Liu wrote:=0A= > On Mon, Jan 18, 2016 at 05:07:51PM +0000, Xie, Huawei wrote:=0A= >> .On 1/15/2016 12:34 PM, Yuanhan Liu wrote:=0A= >>> Modern (v1.0) virtio pci device defines several pci capabilities.=0A= >>> Each cap has a configure structure corresponding to it, and the=0A= >>> cap.bar and cap.offset fields tell us where to find it.=0A= >>>=0A= >> [snip]=0A= >>> +=0A= >>> +static inline void=0A= >>> +io_write64_twopart(uint64_t val, uint32_t *lo, uint32_t *hi)=0A= >>> +{=0A= >>> + io_write32((uint32_t)val, lo);=0A= >>> + io_write32(val >> 32, hi);=0A= >> Firstly your second iowrite32 doesn't do the conversion.=0A= > Because it's not necessary. The first one is for retrieving the low 32=0A= > bits.=0A= =0A= I don't mean the shift operation, but the conversion from 64bit to 32bit.= =0A= Same applied to below.=0A= =0A= >=0A= >> The conversion is duplicated.=0A= > What do you mean by "duplicated".=0A= >=0A= > --yliu=0A= >=0A= =0A=