Re: [kvm-unit-tests PATCH 2/2] x86: Mark RDPID asm volatile to avoid dropping instructions

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

 



On Mon, Mar 6, 2023 at 4:56 PM David Matlack <dmatlack@xxxxxxxxxx> wrote:
>
> Mark the asm statement that generates the RDPID instruction volatile.
> The compiler within its rights to drop subsequent RDPID asm statements
> (after the first) since the inputs never change.
>
> This fixes the tsc test on hardware that supports rdpid when built with
> the latest Clang compiler.
>
> Fixes: 10631a5bebd8 ("x86: tsc: add rdpid test")
> Reported-by: Greg Thelen <gthelen@xxxxxxxxxx>
> Suggested-by: Greg Thelen <gthelen@xxxxxxxxxx>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>




[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