On Wed, Nov 20, 2019 at 2:17 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > On 20/11/19 23:16, Jim Mattson wrote: > > On Wed, Nov 20, 2019 at 10:43 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > >> > >> On 20/11/19 19:13, Jim Mattson wrote: > >>> On Mon, Nov 18, 2019 at 9:29 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > >>>> > >>>> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > >>> > >>> I had to add tsx-ctrl to x86/unittests.cfg: > >>> > >>> +[tsx-ctrl] > >>> +file = tsx-ctrl.flat > >>> +extra_params = -cpu host > >>> +groups = tsx-ctrl > >>> + > >>> > >>> With qemu 4.1, I get: > >>> > >>> timeout -k 1s --foreground 90s /root/kvm-unit-tests/deps/qemu.sh > >>> -nodefaults -device pc-testdev -device > >>> isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device > >>> pci-testdev -machine accel=kvm -kernel x86/tsx-ctrl.flat -smp 1 -cpu > >>> host # -initrd /tmp/tmp.7wOLppNO4W > >>> enabling apic > >>> SKIP: TSX_CTRL not available > >>> > >>> Maybe qemu is masking off ARCH_CAP_TSX_CTRL_MSR? I haven't investigated. > >> > >> Yes, you need "-cpu host,migratable=off" if you don't have the > >> corresponding QEMU patches (which I've only sent today, but just > >> allowing unmigratable features in extra_params will be okay for you to > >> test). > > > > Okay, that works! > > > > enabling apic > > PASS: TSX_CTRL should be 0 > > PASS: Transactions do not abort > > PASS: TSX_CTRL hides RTM > > PASS: TSX_CTRL hides HLE > > PASS: TSX_CTRL=0 unhides RTM > > PASS: TSX_CTRL causes transactions to abort > > PASS: TSX_CTRL=0 causes transactions to succeed > > SUMMARY: 7 tests > > Great, should I merge the patches in 5.5 with your Tested-by annotation? Please do.