Re: [PATCH v2 1/4] x86/speculation: Use IBRS if available before calling into firmware

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

 



On Wed, Feb 14, 2018 at 3:29 PM, David Woodhouse <dwmw@xxxxxxxxxxxx> wrote:

> +#define alternative_msr_write(_msr, _val, _feature)            \
> +       asm volatile(ALTERNATIVE("",                            \
> +                                "movl %[msr], %%ecx\n\t"       \
> +                                "movl %[val], %%eax\n\t"       \
> +                                "movl $0, %%edx\n\t"           \
> +                                "wrmsr",                       \
> +                                _feature)                      \
> +                    : : [msr] "i" (_msr), [val] "i" (_val)     \
> +                    : "eax", "ecx", "edx", "memory")
> +

It's not needed now, but this would be more generally useful if the
high 32 bits of the MSR value could also be specified.



[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