From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 175A92A6C for ; Wed, 4 Jan 2017 07:12:09 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 03 Jan 2017 22:12:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="49076306" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga005.jf.intel.com with ESMTP; 03 Jan 2017 22:12:08 -0800 Date: Wed, 4 Jan 2017 14:13:54 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, ferruh.yigit@intel.com, cunming.liang@intel.com Message-ID: <20170104061354.GI21228@yliu-dev.sh.intel.com> References: <1483502366-140154-1-git-send-email-jianfeng.tan@intel.com> <1483502366-140154-6-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483502366-140154-6-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 5/7] net/virtio_user: add vhost kernel support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 06:12:10 -0000 On Wed, Jan 04, 2017 at 03:59:24AM +0000, Jianfeng Tan wrote: > +static int > +vhost_kernel_ioctl(struct virtio_user_dev *dev, > + enum vhost_user_request req, > + void *arg) > +{ > + int i, ret = -1; > + uint64_t req_kernel; > + struct vhost_memory_kernel *vm = NULL; > + > + PMD_DRV_LOG(INFO, "%s", vhost_msg_strings[req]); > + > + req_kernel = vhost_req_user_to_kernel[req]; > + > + if (req_kernel == VHOST_SET_MEM_TABLE) { > + vm = prepare_vhost_memory_kernel(); > + if (!vm) > + return -1; > + arg = (void *)vm; > + } > + > + /* Does not work when VIRTIO_F_IOMMU_PLATFORM now, why? */ > + if (req_kernel == VHOST_SET_FEATURES) > + *(uint64_t *)arg &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); You missed my comments in last version? --yliu