[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/7] tcg/i386: add support for IBT
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 5/7] tcg/i386: add support for IBT |
Date: |
Wed, 13 Mar 2019 18:05:16 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
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~
Re: [Qemu-devel] [RFC PATCH for-4.1 0/7] CET support, no-reply, 2019/03/13