From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33544 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORRRy-0006ia-39 for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:01:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORRRw-0004q8-Pf for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:01:13 -0400 Received: from exprod7og102.obsmtp.com ([64.18.2.157]:42209) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORRRw-0004pQ-Df for qemu-devel@nongnu.org; Wed, 23 Jun 2010 11:01:12 -0400 From: Anjali Kulkarni Date: Wed, 23 Jun 2010 07:59:57 -0700 Message-ID: In-Reply-To: <2040770930109842083709389832619> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [Qemu-devel] Question about mmap from user space and accessing emulated device bar0 contents List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Cc: Anjali Kulkarni Hi, I am not sure if this is the right forum for my questions - I am using Qemu+KVM on centOS to run my freebsd based virtual OS. The Qemu emulates one of my nics - yukon -II 88E8022 chip. Now, my yukon driver exists in kernel as well as user space(and I will use the one which I want based on some configs). The kernel driver is able to read the bar0 from PCI config and also read contents correctly. The user space driver gets the bar= 0 correctly, and mmaps it into it's process space, but when it reads contents of bar0, it gets all 0s. This same code when written on a real device works= . Is it due to the fact Qemu is running my freebsd based OS in userland, so does mmap require some tweaks? Are there any documents which I could regarding how the Qemu/KVM traps the read write to bar0 so that it can emulate the device reads/writes? If this is not the right forum, can you point me to the right one? Thanks Anjali