From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by dpdk.org (Postfix) with ESMTP id 64064595B for ; Thu, 13 Nov 2014 07:17:52 +0100 (CET) Received: from 172.24.2.119 (EHLO SZXEML454-HUB.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AXA87025; Thu, 13 Nov 2014 14:27:46 +0800 (CST) Received: from [127.0.0.1] (10.177.19.115) by SZXEML454-HUB.china.huawei.com (10.82.67.197) with Microsoft SMTP Server id 14.3.158.1; Thu, 13 Nov 2014 14:27:34 +0800 Message-ID: <54644F5E.8080407@huawei.com> Date: Thu, 13 Nov 2014 14:27:42 +0800 From: Linhaifeng User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: "Xie, Huawei" , "'Tetsuya Mukawa'" , "dev@dpdk.org" References: In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.115] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.54644F62.0192, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a05de08dea6b4b9923aacf9f77a26e78 Subject: Re: [dpdk-dev] vhost-user technical isssues 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: Thu, 13 Nov 2014 06:17:53 -0000 On 2014/11/12 5:37, Xie, Huawei wrote: > Hi Tetsuya: > There are two major technical issues in my mind for vhost-user implementation. > > 1) memory region map > Vhost-user passes us file fd and offset for each memory region. Unfortunately the mmap offset is "very" wrong. I discovered this issue long time ago, and also found > that I couldn't mmap the huge page file even with correct offset(need double check). > Just now I find that people reported this issue on Nov 3. > [Qemu-devel] [PULL 27/29] vhost-user: fix mmap offset calculation > Anyway, I turned to the same idea used in our DPDK vhost-cuse: only use the fd for region(0) to map the whole file. > I think we should use this way temporarily to support qemu-2.1 as it has that bug. > the size of region 0 is not same as the file size. may be you should mmap the other region. region 0: gpa = 0x0 size = 655360 ua = 0x2aaaaac00000 offset = 0 region 1:// use this region to mmap.BTW how to avoid mmap twice when there are two devices? gpa = 0xC0000 size = 2146697216 ua = 0x2aaaaacc0000 offset = 786432 > 2) what message is the indicator for vhost start/release? > Previously for vhost-cuse, it has SET_BACKEND message. > What we should do for vhost-user? > SET_VRING_KICK for start? > What about for release? > Unlike the kernel virtio, the DPDK virtio in guest could be restarted. > > Thoughts? > > -huawei > > -- Regards, Haifeng