Re: [PATCH 6/6] selftests: kvm: Add test to exercise userspace MSR list

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

 



I released v2 of this series to incorporate Alex's changes with the
generic instruction emulator into it.  I'll incorporate this feedback
into v3.

On Mon, Aug 10, 2020 at 10:24 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
>
> On Fri, Aug 7, 2020 at 4:28 PM Alexander Graf <graf@xxxxxxxxxx> wrote:
> >
> >
> >
> > On 04.08.20 06:20, Aaron Lewis wrote:
>
> > > +       __asm__ __volatile__("rdmsr_start: rdmsr; rdmsr_end:" :
> > > +                       "=a"(a), "=d"(d) : "c"(msr) : "memory");
> >
> > I personally would find
> >
> > asm volatile("rdmsr_start:");
> > r = rdmsr(msr);
> > asm volatile("rdmsr_end:");
> >
> > more readable. Same for wrmsr.
>
> I don't think the suggested approach is guaranteed to work, because "r
> = rdmsr(msr)" isn't always going to be a single instruction. The
> compiler may do some register shuffling before and/or after the rdmsr
> instruction itself, and I believe Aaron wants the labels immediately
> before and after the rdmsr instruction.



[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