From: "Mars.Cao" <caobingbu@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when debug windows guest driver under QEMU 0.15.50
Date: Wed, 19 Oct 2011 18:24:02 +0800 [thread overview]
Message-ID: <4E9EA542.6000806@gmail.com> (raw)
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?
next reply other threads:[~2011-10-19 10:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 10:24 Mars.Cao [this message]
2011-10-19 10:48 ` [Qemu-devel] [Question]WinDbg runs too slowly or exits unexpectly when debug windows guest driver under QEMU 0.15.50 Avi Kivity
2011-10-20 17:42 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E9EA542.6000806@gmail.com \
--to=caobingbu@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).