From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGTK4-0001nV-Dv for qemu-devel@nongnu.org; Wed, 19 Oct 2011 06:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGTK3-0005Nt-57 for qemu-devel@nongnu.org; Wed, 19 Oct 2011 06:24:32 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:41709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGTK2-0005Nj-UZ for qemu-devel@nongnu.org; Wed, 19 Oct 2011 06:24:31 -0400 Received: by ywp17 with SMTP id 17so1864503ywp.4 for ; Wed, 19 Oct 2011 03:24:29 -0700 (PDT) Message-ID: <4E9EA542.6000806@gmail.com> Date: Wed, 19 Oct 2011 18:24:02 +0800 From: "Mars.Cao" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when debug windows guest driver under QEMU 0.15.50 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org WinDbg runs too slowly or exits unexpectedly when debug windows guest driver under QEMU 0.15. I installed 2 windows (WinXP SP3)VMs on my host (RHEL6.1). The basic debug method is : 1.Setup the Windows driver Kit in host /usr/local/bin/qemu-system-x86_64 -drive file=winxpsp3.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2 -net tap,ifname=tap0,script=no,downscript=no -net nic,model=virtio,macaddr=52:54:00:d6:be:bb -m 1024 --enable-kvm -serial tcp:127.0.0.1:4445,server,nowait -cdrom WDK.iso power off. 2.Run the guest and edit the boot.ini of the guest windows /usr/local/bin/qemu-system-x86_64 -drive file=winxp-guest.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2 -net tap,ifname=tap1,script=no,downscript=no -net nic,model=virtio,macaddr=52:54:00:d6:be:ee -m 1024 --enable-kvm edit boot.ini and duplicate the default boot option add the line "/debug /debugport=COM1 /baudrate=115200" 3.Run host and WinDbg /usr/local/bin/qemu-system-x86_64 -drive file=winxpsp3.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2 -net tap,ifname=tap0,script=no,downscript=no -net nic,model=virtio,macaddr=52:54:00:d6:be:bb -m 1024 --enable-kvm -serial tcp:127.0.0.1:4445,server,nowait Run the host VM,and then run WinDbg then "Ctrl+k" kernel debug to connect the guest for debugging through COM1. 4.Run the guest to debug Restart the guest,select the windows debug option in the boot menu. /usr/local/bin/qemu-system-x86_64 -drive file=winxp-guest.img,if=virtio,format=qcow2,cache=none,aio=threads -smp 2 -net tap,ifname=tap1,script=no,downscript=no -net nic,model=virtio,macaddr=52:54:00:d6:be:ee -m 1024 --enable-kvm -serial tcp:127.0.0.1:4445 There are several problems when debugging: 1).The Windows VM boot slow (more than 20 seconds)and does not run smoothly. I use the qemu-kvm (version 0.12.1) which pre-installed in the RedHat RHEL6.1 with same option and same image file, the VM boots and runs much more better than using QEMU-0.15.0. [root@oc2115466153 images]# /usr/local/bin/qemu-system-x86_64 --version QEMU emulator version 0.15.50, Copyright (c) 2003-2008 Fabrice Bellard [root@oc2115466153 images]# /usr/libexec/qemu-kvm --version QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c) 2003-2008 Fabrice Bellard 2).The process of WinDbg on the host VM connecting to the guest occupy so much time. It spend at least 10 minutes to connect the guest VM when debugging the windows kernel by WinDbg. 3).When WinDbg connecting to the guest VM(not connected yet),WinDbg exit unexpected sometimes, and sometimes can not connect to the guest. And the probability of the problem is high. I have no idea what is wrong? The COM rate is too slow,the QEMU is not used correctly or some bugs in QEMU? Can anyone give me some tips?