From: pradeep <psuriset@linux.vnet.ibm.com>
To: kvm-devel <kvm@vger.kernel.org>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] qemu aborts if i add a already registered device from qemu monitor ..
Date: Tue, 19 Oct 2010 15:27:37 +0530 [thread overview]
Message-ID: <20101019152737.234e2e51@skywalker> (raw)
Hi
I tried to add a device to guest from upstream qemu monitor using
"device_add".
Unknowingly i try to add already registered devices from qemu
monitor, my qemu monitor is aborted. I don't see a reason to kill
monitor. I think abort() is a bit rough. we need a better way to handle
it. If a user try to add a already registered device, qemu should
convey this to user saying that, this device already registered and an
error message should be fine than aborting qemu.
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strcmp(block->idstr, new_block->idstr)) {
fprintf(stderr, "RAMBlock \"%s\" already registered,
abort!\n",
new_block->idstr);
abort();
}
If i return some other value in above code, instead of abort(), I
would need change the code for every device, which i dont want to.
Is there a way to check, if device is already enrolled or not in the very beginning of "device_add"
call.
Thanks
Pradeep
next reply other threads:[~2010-10-19 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 9:57 pradeep [this message]
2010-10-19 12:11 ` [Qemu-devel] qemu aborts if i add a already registered device from qemu monitor Luiz Capitulino
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=20101019152737.234e2e51@skywalker \
--to=psuriset@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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).