On 01/07/2021 16:00, Olaf Hering wrote: > Am Thu, 1 Jul 2021 12:19:24 +0100 > schrieb Andrew Cooper <andrew.coop...@citrix.com>: > >> Where is the 51 leaves coming in? > I suspect the bug is this line, and the magic "0x1c" value: > > p->extd.max_leaf = min(p->extd.max_leaf, 0x1cu); > > In my testing basic remains at 13, while extd is truncated from 0x80000008 to > 28. > I think it should be truncated to CPUID_GUEST_NR_EXTD_INTEL?
That logic is definitely incorrect, but using a different constant isn't right. I think it has been copied from elsewhere else and incorrectly simplified. I'll see about trying to fix it... ~Andrew