Il 21/01/2014 16:51, Andreas Färber ha scritto:
> We already do that for other bits (e.g. XSAVE/OSXSAVE),
Please point me to the commit, a search for xsave did not come up with a
commit changing such a thing - either it did not go through my queue or
it slipped me through: Bugs are no excuse to produce more bugs.
I meant that "-cpu SandyBridge" with TCG produces a CPU that doesn't
have XSAVE.
> and in fact it
> is the same that we do for KVM: the KVM_GET_SUPPORTED_CPUID result is
> used to trim the generic feature bits.
Our model definitions are the place to put stuff that real CPUs have.
Either the CPU has it or it doesn't. If it does, then this patch is
fully correct and it's TCG's job to mask things out. If we're adding
artificial flags to the generic model definitions just to make KVM
faster, then it is wrong - we have a choice of post_initialize and
realize hooks for that.
It would make TCG faster as well, and there would be no reason really to
avoid the "artificial" x2apic on TCG, if TCG implemented x2apic at all.
Paolo