Bugs item #2151771, was opened at 2008-10-07 17:17
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2151771&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libkvm
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Duilio J. Protti (dprotti)
Assigned to: Nobody/Anonymous (nobody)
Summary: libkvm API documentation error - kvm_create()

Initial Comment:
Documentation for kvm_create() in libkvm/libkvm.h file states (taken from 
version 76):

/*!
 * \brief Create new virtual machine
 *
 * This creates a new virtual machine, maps physical RAM to it, and creates a
 * virtual CPU for it.\n
 * \n
... */

However, the statement "and creates a virtual CPU for it" is false, at least 
since version 65 of KVM, were vcpu 0 creation was removed from kvm_create():

--- kvm-64/libkvm/libkvm.c      2008-03-26 09:49:35.000000000 -0300
+++ kvm-65/libkvm/libkvm.c      2008-04-04 18:22:20.000000000 -0300
@@ -388,9 +388,6 @@
        if (r < 0)
                return r;
        kvm_create_irqchip(kvm);
-       r = kvm_create_vcpu(kvm, 0);
-       if (r < 0)
-               return r;
 
        return 0;
 }

In versions newer than 64 vcpu 0 has to be explicitely created with 
kvm_create_vcpu(), otherwise kvm_run() will fail with a "Bad file descriptor" 
error.

This error was found with the help of Pablo Passera. Thanks Pablo!

Regards,
Duilio Protti.


----------------------------------------------------------------------

>Comment By: Jes Sorensen (jessorensen)
Date: 2010-08-19 13:00

Message:
Hi,

libkvm is gone, so this is no longer applicable. Thanks for reporting it
though and sorry that we didn't get back to you sooner.

Cheers,
Jes


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2151771&group_id=180599
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to