Skip to content

Commit 3af56fc

Browse files
Ewan HaiMichael Tokarev
authored andcommitted
target/i386: Fix model number of Zhaoxin YongFeng vCPU template
The model number was mistakenly set to 0x0b (11) in commit ff04bc1. The correct value is 0x5b. This mistake occurred because the extended model bits in cpuid[eax=0x1].eax were overlooked, and only the base model was used. Using the wrong model number can affect guest behavior. One known issue is that vPMU (which relies on the model number) may fail to operate correctly. This patch corrects the model field by introducing a new vCPU version. Fixes: ff04bc1 ("target/i386: Introduce Zhaoxin Yongfeng CPU model") Signed-off-by: Ewan Hai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> (cherry picked from commit 280712b) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 7c949c5 commit 3af56fc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

target/i386/cpu.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5621,6 +5621,18 @@ static const X86CPUDefinition builtin_x86_defs[] = {
56215621
.features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING,
56225622
.xlevel = 0x80000008,
56235623
.model_id = "Zhaoxin YongFeng Processor",
5624+
.versions = (X86CPUVersionDefinition[]) {
5625+
{ .version = 1 },
5626+
{
5627+
.version = 2,
5628+
.note = "with the correct model number",
5629+
.props = (PropValue[]) {
5630+
{ "model", "0x5b" },
5631+
{ /* end of list */ }
5632+
}
5633+
},
5634+
{ /* end of list */ }
5635+
}
56245636
},
56255637
};
56265638

0 commit comments

Comments
 (0)