On 24.12.2008, at 11:38, Avi Kivity wrote:

Alexander Graf wrote:
By default target-i386/helper.c does not include config.h, so
no code in there knows if we're enabling KVM or not.
This breaks the nested activation, as that's depending on the
config options.

Of course, with this patch applied the CPUID KVM checks are
applied twice, as now kvm_enabled() does not default to true
for the cpuid helper functions. Maybe it's a good idea to
remove the qemu-kvm-x86.c cpuid code?

This patch fixes compilation broken thanks to my nested SVM
patches.

@@ -30,6 +30,7 @@
#include "qemu-common.h"
#include "kvm.h"
+#include "config.h"
#include "qemu-kvm.h"


Isn't this a problem with upstream qemu as well?

Nevertheless, if you only apply the second chunk with the #else #define kvm_nested 0 we should be fine off. The only place where kvm_enabled() is called in helper.c is the cpuid check and that's a logic AND, meaning the SVM bit wouldn't get stripped if kvm_enabled() isn't set. We'd do that check in the second KVM CPUID parsing again later on anyways.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to