Bail out when VCPU_CREATE fails
commitef1ac550e43e366bb54565b359f007b8a72d3967
authorAlexander Graf <agraf@suse.de>
Mon, 22 Mar 2010 10:49:13 +0000 (22 11:49 +0100)
committerAvi Kivity <avi@redhat.com>
Wed, 24 Mar 2010 09:30:56 +0000 (24 11:30 +0200)
tree68b48e0bb78652ea1265eb3c19777368ec831aa5
parentaa4df1344cab5055537ffcc90de996cda46da279
Bail out when VCPU_CREATE fails

When we fail to create a VCPU we have no way to tell our callers that something
failed. So the caller happily uses a completely broken state.

This code should become deprecated in the process of converting qemu-kvm to
qemu anyways, so let's not care about remdeling it but just bailing out when
something breaks. Also give the user a hint on why the VCPU_CREATE might have
failed.

This fixes a segmentation fault with -smp > VCPU_MAX in the host kernel.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Avi Kivity <avi@redhat.com>
qemu-kvm.c