Commit 07d01c9c authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Michael S. Tsirkin
Browse files

smbios: Don't report unknown CPU speed (fix SVVP regression)



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: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 744c6d47
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 */