Received: from eggs.gnu.org ([208.118.235.92]:55804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4rLj-0000Qy-Q2 for qemu-devel@nongnu.org; Tue, 06 Mar 2012 05:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4rLf-0003D1-RF for qemu-devel@nongnu.org; Tue, 06 Mar 2012 05:10:31 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:60011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4rLf-0003C3-5v for qemu-devel@nongnu.org; Tue, 06 Mar 2012 05:10:27 -0500 Date: Tue, 6 Mar 2012 18:10:16 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20120306101016.GA66053@cs.nctu.edu.tw> References: <20120304123140.GA1760@liwp@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120304123140.GA1760@liwp@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] questions about pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: WanPeng Li Cc: qemu-devel > I read pci code in qemu about i440fx, pci.c and so on. I think if guest > os whose mainboard is based on x86, it will use IO instructions to > access PCI configuration space.If not use passthrough, qemu should > emulate these operations.I find a function called kvm_handle_io who wil= l ^^^^^^^^^^^^^ Looks suspicious. Prefix kvm mean passthrough, I guess. > emulate ioport write/read, I have traced this function, but I haven't f= ound it has > any relationship with pci read/write configuration space functions like > i440fx_write_config and piix3_write_config.So how does it emulate pci > configuration space access when not use passthrough? `grep -r i440fx_write_config *` show you that you should take a look on hw/piix_pci.c. Besides, setting breakpoint at i440fx_write_config also sh= ow you how it get called. HTH, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj