On Mon, Jan 15, 2018 at 02:59:22PM +0100, David Woodhouse wrote:
> #define IF_FEATURE(ftr) if (static_cpu_has(ftr)) arch_static_assert,
>
> IF_FEATURE(key) {
> stuff();
> }
>
> There might not be a sane way to do that though. And it's OK to have to
> manually annotate the call sites
On Mon, 2018-01-15 at 14:45 +0100, Peter Zijlstra wrote:
> On Fri, Jan 12, 2018 at 10:09:08AM +, David Woodhouse wrote:
> > static_cpu_has() + asm-goto is NOT SUFFICIENT.
> >
> > It's still *possible* for a missed optimisation in GCC to still leave
> > us with a conditional branch around the w
On Fri, Jan 12, 2018 at 10:09:08AM +, David Woodhouse wrote:
> static_cpu_has() + asm-goto is NOT SUFFICIENT.
>
> It's still *possible* for a missed optimisation in GCC to still leave
> us with a conditional branch around the wrmsr, letting the CPU
> speculate around it too.
OK, so GCC would
On Fri, 2018-01-12 at 10:51 +0100, Peter Zijlstra wrote:
> On Thu, Jan 11, 2018 at 05:58:11PM -0800, Dave Hansen wrote:
> > On 01/11/2018 05:32 PM, Ashok Raj wrote:
> > > +static void save_guest_spec_ctrl(struct vcpu_vmx *vmx)
> > > +{
> > > + if (boot_cpu_has(X86_FEATURE_SPEC_CTRL)) {
> > > +
On Thu, Jan 11, 2018 at 05:58:11PM -0800, Dave Hansen wrote:
> On 01/11/2018 05:32 PM, Ashok Raj wrote:
> > +static void save_guest_spec_ctrl(struct vcpu_vmx *vmx)
> > +{
> > + if (boot_cpu_has(X86_FEATURE_SPEC_CTRL)) {
> > + vmx->spec_ctrl = spec_ctrl_get();
> > + spec_ctrl_r
On Thu, Jan 11, 2018 at 05:58:11PM -0800, Dave Hansen wrote:
> On 01/11/2018 05:32 PM, Ashok Raj wrote:
> > +static void save_guest_spec_ctrl(struct vcpu_vmx *vmx)
> > +{
> > + if (boot_cpu_has(X86_FEATURE_SPEC_CTRL)) {
> > + vmx->spec_ctrl = spec_ctrl_get();
> > + spec_ctrl_r
On 01/11/2018 05:32 PM, Ashok Raj wrote:
> +static void save_guest_spec_ctrl(struct vcpu_vmx *vmx)
> +{
> + if (boot_cpu_has(X86_FEATURE_SPEC_CTRL)) {
> + vmx->spec_ctrl = spec_ctrl_get();
> + spec_ctrl_restriction_on();
> + } else
> + rmb();
> +}
Does t
7 matches
Mail list logo