Re: [RFC 0/2] GET_EMULATED_CPUID support with "allow-emulation" option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 06, 2014 at 01:16:00PM +0200, Alexander Graf wrote:
> 
> On 06.06.14 04:37, Eduardo Habkost wrote:
> >On Fri, Jun 06, 2014 at 03:21:04AM +0200, Borislav Petkov wrote:
> >>On Fri, Jun 06, 2014 at 12:24:26AM +0200, Alexander Graf wrote:
> >>>But can we drop the EMULATED name somehow? Can we rename [1] the ioctl
> >>>to say GET_UNSUPPORTED_CPUID or something along those lines? The name
> >>>is just a really really bad pick.
> >>What do you mean, a "bad pick" :-P? I added extra care in naming that
> >>functionality what it is - bitfield in CPUID format of *emulated*
> >>features. Unsupported is wrong too - we do support them if we enable
> >>them explicitly. :-)
> >>
> >>How about GET_NOT_REALLY_FAST_BUT_STILL_NOT_FAST_ENOUGH_AS_IN_HW_FAST_CPUID?
> >IMO, "emulated" on the kernel interface is good, because it describe
> >what it is. Deciding which emulated features are "experimental" or "good
> >enough to be enabled implicitly even if emulated" is policy for
> >userspace to decide.
> >
> >"allow-experimental" is being mapped to GET_EMULATED_CPUID initially
> >only because _by default_ the GET_EMULATED_CPUID-only features won't be
> >enabled implicitly unless forced. But if one day we decide that
> >emulation is good enough for a specific feature, we can make
> >kvm_arch_get_supported_cpuid() return it even if it is present only on
> >the GET_EMULATED_CPUID bitmap. Even if that decision depends on a
> >specific implementation of that feature, the kernel can report that
> >using KVM capabilities (to be checked by kvm_arch_get_supported_cpuid(),
> >like we already do for tsc-deadline).
> 
> Ok, works for me. I still don't see the point in having the bitmap at
> all then when we need to carry separate CAPs for individual features'
> "working" status, but if it makes people happy I'm ok with it.

We won't necessarily need it, it is just an alternative we will always
have.

GET_*_CPUID is just an alternative capability system, which allow CPUID
features to be automatically handled by generic QEMU code on many cases
(instead of always requiring QEMU code changes for new features). But we
can always get back to plain old KVM capabilities on more complex cases
if necessary.

I don't expect features to get promoted from GET_EMULATED_CPUID to
GET_SUPPORTED_CPUID very often, because that's policy that can be
handled by userspace (but that doesn't mean kernel developers can't do
it if they think it is a good idea).

-- 
Eduardo
--
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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux