On 11/18/19 4:11 PM, Andreas Kinzler wrote: > On 15.11.2019 18:13, George Dunlap wrote: >> On 11/15/19 5:06 PM, Andreas Kinzler wrote: >>> Hello All, >>> >>> I compared the CPUID listings from Ryzen 2700X (attached as tar.xz) to >>> 3700X and found only very few differences. I added >>> >>> cpuid = [ "0x80000008:ecx=xxxxxxxxxxxxxxxx0100xxxxxxxxxxxx" ] >>> >>> to xl.cfg and then Windows runs great with 16 vCPUs. Cinebench R15 score >>> is >2050 which is more or less the bare metal value. >> Awesome. Any idea what those bits do? > > From the AMD APM (https://www.amd.com/system/files/TechDocs/24594.pdf): > > APIC ID size. The number of bits in the initial APIC20[ApicId] value > that indicate core ID within a processor. A zero value indicates that > legacy methods must be used to derive the maximum number of cores. The > size of this field determines the maximum number of cores (MNC) that the > processor could theoretically support, not the actual number of cores > that are actually implemented or enabled on the processor, as indicated > by CPUID Fn8000_0008_ECX[NC]. > if (ApicIdCoreIdSize[3:0] == 0){ > // Used by legacy dual-core/single-core processors > MNC = CPUID Fn8000_0008_ECX[NC] + 1; > } else { > // use ApicIdCoreIdSize[3:0] field > MNC = (2 ^ ApicIdCoreIdSize[3:0]); > } > > The value programmed in 2700X is 4, on 3700X it is 7. See my dump in > https://lists.xenproject.org/archives/html/xen-devel/2019-09/msg02189.html
Where were these values collected -- on a PV dom0? Or from within the guest? As Jan pointed out, what actually happens here is that the domain builder actually bumps this number by 1 for HVM guests by default. So if the real value is 4, then the guest will see 5; if the real value is 7, the guest will see 8. Andy says that the modifications from the manual cpuid settings happen *after* this adjustment; so that by setting it to 0100, you change it to 4. Could you try this with `0111` instead? That should set it to its actual hardware value (although the other "adjustments" won't be modified). Given the current practical limitations with numbers of vcpus, I'd be tempted to say we could always just limit this value to 7. If after a migration, a Linux guest sees this move from 8 to 7, I suspect it will cope just fine. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel