svn commit: r276452 - in projects/paravirt/sys/x86: include x86
Bryan Venteicher
bryanv at FreeBSD.org
Wed Dec 31 06:53:48 UTC 2014
Author: bryanv
Date: Wed Dec 31 06:53:46 2014
New Revision: 276452
URL: https://svnweb.freebsd.org/changeset/base/276452
Log:
Include the signature in the hypervisor info structure
Modified:
projects/paravirt/sys/x86/include/hypervisor.h
projects/paravirt/sys/x86/x86/kvm.c
projects/paravirt/sys/x86/x86/vmware.c
Modified: projects/paravirt/sys/x86/include/hypervisor.h
==============================================================================
--- projects/paravirt/sys/x86/include/hypervisor.h Wed Dec 31 06:50:44 2014 (r276451)
+++ projects/paravirt/sys/x86/include/hypervisor.h Wed Dec 31 06:53:46 2014 (r276452)
@@ -33,6 +33,7 @@ typedef int hypervisor_info_identify_t(v
struct hypervisor_info {
const char *hvi_name;
+ const char *hvi_signature;
enum VM_GUEST hvi_type;
hypervisor_info_identify_t *hvi_identify;
};
Modified: projects/paravirt/sys/x86/x86/kvm.c
==============================================================================
--- projects/paravirt/sys/x86/x86/kvm.c Wed Dec 31 06:50:44 2014 (r276451)
+++ projects/paravirt/sys/x86/x86/kvm.c Wed Dec 31 06:53:46 2014 (r276452)
@@ -38,6 +38,7 @@ static uint32_t kvm_cpuid_identify(void
const struct hypervisor_info kvm_hypervisor_info = {
.hvi_name = "KVM",
+ .hvi_signature = "KVMKVMKVM\0\0",
.hvi_type = VM_GUEST_KVM,
.hvi_identify = kvm_identify,
};
@@ -50,8 +51,8 @@ kvm_cpuid_identify(void)
{
if (kvm_cpuid_base == -1) {
- hypervisor_cpuid_base("KVMKVMKVM\0\0", 0, &kvm_cpuid_base,
- &kvm_cpuid_high);
+ hypervisor_cpuid_base(kvm_hypervisor_info.hvi_signature,
+ 0, &kvm_cpuid_base, &kvm_cpuid_high);
}
return (kvm_cpuid_base);
Modified: projects/paravirt/sys/x86/x86/vmware.c
==============================================================================
--- projects/paravirt/sys/x86/x86/vmware.c Wed Dec 31 06:50:44 2014 (r276451)
+++ projects/paravirt/sys/x86/x86/vmware.c Wed Dec 31 06:53:46 2014 (r276452)
@@ -39,6 +39,7 @@ static uint32_t vmware_cpuid_identify(v
const struct hypervisor_info vmware_hypervisor_info = {
.hvi_name = "VMware",
+ .hvi_signature = "VMwareVMware",
.hvi_type = VM_GUEST_VMWARE,
.hvi_identify = vmware_identify,
};
@@ -51,8 +52,8 @@ vmware_cpuid_identify(void)
{
if (vmware_cpuid_base == -1) {
- hypervisor_cpuid_base("VMwareVMware", 0, &vmware_cpuid_base,
- &vmware_cpuid_high);
+ hypervisor_cpuid_base(vmware_hypervisor_info.hvi_signature,
+ 0, &vmware_cpuid_base, &vmware_cpuid_high);
}
return (vmware_cpuid_base);
More information about the svn-src-projects
mailing list