This adds a CPUID entry for the paravirtualization feature bitmap. We can do this unconditionally because the guest requires that both the feature CPUID entry and the signature CPUID entry exists to enable paravirtualization.
This means that guest will never enable paravirtualization if either userspace or kernelspace doesn't support paravirtualization. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 491c32c..1c93388 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -1103,12 +1103,18 @@ static void do_cpuid_ent(struct kvm_cpuid_entry *e, uint32_t function, int kvm_qemu_init_env(CPUState *cenv) { struct kvm_cpuid_entry cpuid_ent[100]; + struct kvm_cpuid_entry *pv_features; int cpuid_nent = 0; CPUState copy; uint32_t i, limit; copy = *cenv; + pv_features = &cpuid_ent[cpuid_nent++]; + memset(pv_features, 0, sizeof(*pv_features)); + pv_features->function = 0x40000003; + pv_features->eax = (1 << KVM_PARA_FEATURE_NOP_IO_DELAY); + copy.regs[R_EAX] = 0; qemu_kvm_cpuid_on_env(©); limit = copy.regs[R_EAX]; diff --git a/user/kvmctl.h b/user/kvmctl.h index ff0bca6..16b4e28 100644 --- a/user/kvmctl.h +++ b/user/kvmctl.h @@ -10,6 +10,7 @@ #endif #include <linux/kvm.h> +#include <linux/kvm_para.h> #include <stdint.h> #include <signal.h> ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel