From: Wei Wang <wei.wang2@amd.com>
To: stefano.stabellini@eu.citrix.com, anthony.perard@citrix.com
Cc: Wei Wang <wei.wang2@amd.com>,
xen-devel@lists.xensource.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix xen pci passthrough
Date: Tue, 10 Jul 2012 13:43:26 +0200 [thread overview]
Message-ID: <1341920606-11942-1-git-send-email-wei.wang2@amd.com> (raw)
Hi, I find a passthrough issue in qemu when pci device has multiple mmio
regions. In this case, the last few bytes of qmp response string are trimmed
and then passthru fails with following output.
*** glibc detected *** xl: realloc(): invalid pointer: 0x0000000002163f90 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x74c06)[0x7f62970e4c06]
/lib64/libc.so.6(+0x77d25)[0x7f62970e7d25]
/lib/libxenlight.so.2.0(+0x28d02)[0x7f6297a78d02]
/lib/libxenlight.so.2.0(+0x2eccf)[0x7f6297a7eccf]
/lib/libxenlight.so.2.0(+0x2f2f6)[0x7f6297a7f2f6]
/lib/libxenlight.so.2.0(+0x2fe18)[0x7f6297a7fe18]
/lib/libxenlight.so.2.0(+0x20027)[0x7f6297a70027]
/lib/libxenlight.so.2.0(+0x212a6)[0x7f6297a712a6]
/lib/libxenlight.so.2.0(+0x19e82)[0x7f6297a69e82]
/lib/libxenlight.so.2.0(+0x1c288)[0x7f6297a6c288]
/lib/libxenlight.so.2.0(+0x1c2a8)[0x7f6297a6c2a8]
/lib/libxenlight.so.2.0(+0x2657e)[0x7f6297a7657e]
/lib/libxenlight.so.2.0(+0x34076)[0x7f6297a84076]
/lib/libxenlight.so.2.0(libxl__fork_selfpipe_woken+0x92)[0x7f6297a84394]
/lib/libxenlight.so.2.0(+0x3254a)[0x7f6297a8254a]
/lib/libxenlight.so.2.0(+0x3276d)[0x7f6297a8276d]
/lib/libxenlight.so.2.0(+0x33944)[0x7f6297a83944]
/lib/libxenlight.so.2.0(+0x1c0a8)[0x7f6297a6c0a8]
/lib/libxenlight.so.2.0(libxl_domain_create_new+0x14)[0x7f6297a6c14f]
xl[0x40c1f2]
xl[0x40fc94]
xl[0x406c21]
/lib64/libc.so.6(__libc_start_main+0xed)[0x7f629709123d]
xl[0x406439]
Attached patch can fix this issue.
Thanks,
Wei
Signed-off-by: Wei Wang <wei.wang2@amd.com>
---
monitor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index f6107ba..9f30f5f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -165,7 +165,7 @@ struct Monitor {
int reset_seen;
int flags;
int suspend_cnt;
- uint8_t outbuf[1024];
+ uint8_t outbuf[2048];
int outbuf_index;
ReadLineState *rs;
MonitorControl *mc;
--
1.7.4
next reply other threads:[~2012-07-10 11:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 11:43 Wei Wang [this message]
2012-07-10 13:05 ` [Qemu-devel] [PATCH] Fix xen pci passthrough Anthony PERARD
2012-07-10 13:35 ` Wei Wang
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=1341920606-11942-1-git-send-email-wei.wang2@amd.com \
--to=wei.wang2@amd.com \
--cc=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).