On 3/13/19 5:40 AM, Paolo Bonzini wrote:
> +static void tcg_out_endbr(TCGContext *s)
> +{
> +#if defined __CET__ && (__CET__ & 1)
> +#ifdef __x86_64__
> +    tcg_out32(s, 0xfa1e0ff3);
> +#else
> +    tcg_out32(s, 0xfb1e0ff3);
> +#endif
> +#endif
> +}

Normally we'd use a runtime test for the feature.

Just because we compiled with CET does not mean we're running on CET-enabled
hardware, since IIRC this is a nop otherwise.  I assume there's a cpuid/xgetbv
bit that indicates when IBT is present and/or active?


r~

Reply via email to