On Wed, May 16, 2012 at 05:14:35PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the kvm tree got a conflict in > arch/x86/include/asm/kvm_para.h between commit c3709e6734da ("x86, kvm: > KVM paravirt kernels don't check for CPUID being unavailable") from the > tip tree and commit 9b72d3b07dd9 ("KVM guest: make kvm_para_available() > check hypervisor bit reading cpuid leaf") from the kvm tree. > > Just context changes. I fixed it up (see below) and can carry the fix as > necessary. Fix looks good to me. > -- > Cheers, > Stephen Rothwell sfr@xxxxxxxxxxxxxxxx > > diff --cc arch/x86/include/asm/kvm_para.h > index 183922e,a7a7a94..0000000 > --- a/arch/x86/include/asm/kvm_para.h > +++ b/arch/x86/include/asm/kvm_para.h > @@@ -170,17 -178,16 +178,19 @@@ static inline int kvm_para_available(vo > unsigned int eax, ebx, ecx, edx; > char signature[13]; > > + if (boot_cpu_data.cpuid_level < 0) > + return 0; /* So we don't blow up on old processors */ > + > - cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx); > - memcpy(signature + 0, &ebx, 4); > - memcpy(signature + 4, &ecx, 4); > - memcpy(signature + 8, &edx, 4); > - signature[12] = 0; > + if (cpu_has_hypervisor) { > + cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx); > + memcpy(signature + 0, &ebx, 4); > + memcpy(signature + 4, &ecx, 4); > + memcpy(signature + 8, &edx, 4); > + signature[12] = 0; > > - if (strcmp(signature, "KVMKVMKVM") == 0) > - return 1; > + if (strcmp(signature, "KVMKVMKVM") == 0) > + return 1; > + } > > return 0; > } -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html