linux-next: manual merge of the kvm tree with the tip tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-- 
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;
  }

Attachment: pgp4I2atNoioc.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux