On Wed, Apr 17, 2013 at 01:04:34PM +0200, Borislav Petkov wrote: > On Tue, Apr 16, 2013 at 08:42:36PM +0300, Gleb Natapov wrote: > > > Right, and this is what we have, AFAICT. And if userspace does that what > > > you exemplify above, you get exactly that - a feature bit not set in > > > CPUID but KVM reporting it set means, it is emulated. There's no room > > > for other interpretations here. Which probably means also not optimal > > > because it is not done in hw. > > > > > This is not true for all emulated CPUID bits. X2APIC is emulated and it > > is preferable for a guest to use it for example. > > Right, and on boxes without X2APIC support you will not find > CPUID(1).ECX[21] set. kvm will tell you it is supported, though, which > means, kvm emulates it. > Yes, but it is "good" emulation. You want to have it for performance even if host does not have x2apic. x2apic is emulated no matter if host cpu has it or not. movbe is different, you want to emulate it only if your guest requires it. > > > Or, do you want to have a way to say with KVM_GET_SUPPORTED_CPUID that > > > "the features I'm reporting to you are those - a subset of them are not > > > optimally supported because I'm emulating them." > > > > > > Am I close? > > > > > Yes, you are. I am considering such interface. Adding new specialized > > interfaces is last resort though. I am open to other ideas. > > Hmm, ok, so basically we want qemu to query the host CPUID and see which > features are *really* supported, then do KVM_GET_SUPPORTED_CPUID and see > which are emulated. > > How's that? Too simple? As I said this will filter x2apic on machines which host cpu does not support it. This is not what we want. > > I probably am missing something as a novice qemu user. > > -- > Regards/Gruss, > Boris. > > Sent from a fat crate under my desk. Formatting is fine. > -- -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html