Currently all content from qemu-kvm's kvm_arch_init_vcpu(). Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- qemu-kvm-x86.c | 2 +- target-i386/kvm.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index f5c76bc..853d50e 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1129,7 +1129,7 @@ static void kvm_trim_features(uint32_t *features, uint32_t supported) } } -int kvm_arch_init_vcpu(CPUState *env) +static int _kvm_arch_init_vcpu(CPUState *env) { struct kvm_cpuid_entry2 cpuid_ent[100]; #ifdef KVM_CPUID_SIGNATURE diff --git a/target-i386/kvm.c b/target-i386/kvm.c index ac9e17b..8db6d54 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -163,10 +163,13 @@ static int get_para_features(CPUState *env) } #endif -#ifdef KVM_UPSTREAM +static int _kvm_arch_init_vcpu(CPUState *env); int kvm_arch_init_vcpu(CPUState *env) { + int r; +#ifdef KVM_UPSTREAM + struct { struct kvm_cpuid2 cpuid; struct kvm_cpuid_entry2 entries[100]; @@ -178,6 +181,15 @@ int kvm_arch_init_vcpu(CPUState *env) uint32_t signature[3]; #endif +#endif + + r = _kvm_arch_init_vcpu(env); + if (r < 0) { + return r; + } + +#ifdef KVM_UPSTREAM + env->mp_state = KVM_MP_STATE_RUNNABLE; env->cpuid_features &= kvm_arch_get_supported_cpuid(env, 1, R_EDX); @@ -273,9 +285,10 @@ int kvm_arch_init_vcpu(CPUState *env) cpuid_data.cpuid.nent = cpuid_i; return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); +#endif + return 0; } -#endif void kvm_arch_reset_vcpu(CPUState *env) { env->exception_injected = -1; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html