[libvirt] [PATCH v4 5/8] libxl: add support for CPUID features policy

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Mon Feb 26 23:25:16 UTC 2018


On Mon, Feb 26, 2018 at 04:08:44PM -0700, Jim Fehlig wrote:
> On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote:
> > +const char *
> > +xenTranslateCPUFeature(const char *feature_name, bool from_libxl)
> > +{
> > +    static const char *translation_table[][2] = {
> > +        /* libvirt name, libxl name */
> > +        { "cx16", "cmpxchg16" },
> > +        { "cid", "cntxid" },
> > +        { "ds_cpl", "dscpl" },
> > +        { "pclmuldq", "pclmulqdq" },
> > +        { "pni", "sse3" },
> > +        { "ht", "htt" },
> > +        { "pn", "psn" },
> > +        { "clflush", "clfsh" },
> > +        { "sep", "sysenter" },
> > +        { "cx8", "cmpxchg8" },
> > +        { "nodeid_msr", "nodeid" },
> > +        { "cr8legacy", "altmovcr8" },
> > +        { "lahf_lm", "lahfsahf" },
> > +        { "cmp_legacy", "cmplegacy" },
> > +        { "fxsr_opt", "ffxsr" },
> > +        { "pdpe1gb", "page1gb" },
> > +    };
> 
> In the case of ibrsb and stibp added in xen commit 0d703a701cc and spec-ctrl
> added in libvirt commit 8b605530e80, have we already encountered the
> drawback of this approach discussed in V3?

Great... I'll add those names to the list...
Anyway I think this is still better approach than the alternative.
Unless someone want to extend the CPU API with single bit lookup...

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180227/26368b1f/attachment-0001.sig>


More information about the libvir-list mailing list