smbios: Don't report unknown CPU speed (fix SVVP regression)
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 7 Jan 2015 17:36:34 +0000 (15:36 -0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 27 Jan 2015 12:46:17 +0000 (14:46 +0200)
SVVP requires processor speed on Type 4 structures to not be unknown.
This was fixed in SeaBIOS 0.5.0 (in 2009), but the bug was reintroduced
in QEMU 2.1.

Revert to old behavior and report CPU speed as 2000 MHz instead of
unknown.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/smbios.c

index ae7032addae3e2eb10b0c6dd0d8d82313074cd0b..12d213769d9894d2237cea6ed018dfee0995e95e 100644 (file)
@@ -618,8 +618,9 @@ static void smbios_build_type_4_table(unsigned instance)
     SMBIOS_TABLE_SET_STR(4, processor_version_str, type4.version);
     t->voltage = 0;
     t->external_clock = cpu_to_le16(0); /* Unknown */
-    t->max_speed = cpu_to_le16(0); /* Unknown */
-    t->current_speed = cpu_to_le16(0); /* Unknown */
+    /* SVVP requires max_speed and current_speed to not be unknown. */
+    t->max_speed = cpu_to_le16(2000); /* 2000 MHz */
+    t->current_speed = cpu_to_le16(2000); /* 2000 MHz */
     t->status = 0x41; /* Socket populated, CPU enabled */
     t->processor_upgrade = 0x01; /* Other */
     t->l1_cache_handle = cpu_to_le16(0xFFFF); /* N/A */