On Sat, Jun 25, 2022 at 04:21:54AM -0700, Mike Larkin wrote: > On Fri, Jun 24, 2022 at 07:19:47PM +1000, Jonathan Gray wrote: > > +void > > +amd_cpu_cacheinfo(struct cpu_info *ci) > > +{ > > + u_int eax, ebx, ecx, edx; > > + > > + /* used by vmm */ > > + > > If this is the only user of these fields, we can just have vmm(4) issue CPUID > on > each guest CPUID for these features. I think I was just trying to save some > cycles. > > I'll send out a diff to remove these fields unless you want to tackle it.
sounds good to me > > The diff here is ok mlarkin in any case. thanks, committed > > > > + if (ci->ci_pnfeatset >= 0x80000005) { > > + CPUID(0x80000005, eax, ebx, ecx, edx); > > + ci->ci_amdcacheinfo[0] = eax; > > + ci->ci_amdcacheinfo[1] = ebx; > > + ci->ci_amdcacheinfo[2] = ecx; > > + ci->ci_amdcacheinfo[3] = edx; > > + } > > + > > + if (ci->ci_pnfeatset >= 0x80000006) { > > + CPUID(0x80000006, eax, ebx, ecx, edx); > > + ci->ci_extcacheinfo[0] = eax; > > + ci->ci_extcacheinfo[1] = ebx; > > + ci->ci_extcacheinfo[2] = ecx; > > + ci->ci_extcacheinfo[3] = edx; > > + } > > +}