On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: [...] > > > Do you have some recommandations regarding the other fields of the edx > > > register ? > > > > Probably it will be a good idea to let each CPU model have their own > > defaults for the cache information. > > Do you mean querying the host CPUID registers and forwarding the values to the > guest ?
No, I mean that it would make sense to have "-cpu 486" expose a different cache topology from "-cpu Haswell" by default. But a "forward host cache information to guest" mode may be useful, too, and it could be the default mode for "-cpu host". > > > > > > What would be an acceptable user interface to set this ? > > > > Things I can remember from the top of my head: > > > > * It would be interesting to redo this patch, before doing anything else: > > > > https://github.com/ehabkost/qemu-hacks/commit/10b675fa1269a65a553586545fdbcd95ace79d65 > > * We need to keep compatibility on existing machine-types (not change > > the cache size); > > * If some information is reported on multiple CPUID leaves, we need to > > keep them consistent with each other (see the FIXME comments on the > > URL above); > I could write a patch to fix broken CPUID leaves. > > But how would it work regarding compatibility ? Is it right to just fix the > leaves or does the machine type rule apply here ? Yes, if you change anything guest-visible, you need to keep compatibility on older machine-types. -- Eduardo