[Bug 201249] New: Emulation of compatibility mode 32-bit SYSCALL fails with TF flag set on Intel hosts

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=201249

            Bug ID: 201249
           Summary: Emulation of compatibility mode 32-bit SYSCALL fails
                    with TF flag set on Intel hosts
           Product: Virtualization
           Version: unspecified
    Kernel Version: 4.4.0-21-generic or 4.18.9-gentoo
          Hardware: Intel
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: kvm
          Assignee: virtualization_kvm@xxxxxxxxxxxxxxxxxxxx
          Reporter: r.marek@xxxxxxxxxxxx
        Regression: No

Created attachment 278781
  --> https://bugzilla.kernel.org/attachment.cgi?id=278781&action=edit
Reproducer for this issue

The emulation of 32-bit SYSCALL instruction while running in compatibility mode
on Intel hosts breaks if TF flag is set while executing the 32-bit SYSCALL
instruction. The instruction will be never executed and one would get single
step exception again and again. 

The attached reproducer2.c manifests the issue if some 64-bit Linux is run
inside the QEMU with KVM and gdb is used to singlestep through a 32-bit
executable until it gets again and again stuck on SYSCALL instruction.

Steps to reproduce:
 1) compile with gcc -m32 reproducer2.c -o reproducer2 (or alternatively
compile it inside the guest)

2) run kvm + qemu and some Linux distro with a directory kvm-bug which contains
the executable, thehost KVM needs to run on Intel CPU!

 qemu-system-x86_64 -enable-kvm -m 2048 -cdrom
/tmp/ubuntu-18.04.1-desktop-amd64.iso -boot d -drive file=fat:rw:kvm-bug

Wait until it boots, mount the virtual drive and then invoke:

3) gdb ./reproducer2

4) break on main and then "stepi" until SYSCALL is reached, stepi is going to
be stuck on SYSCALL and never executing it.

Singlestepping in gdb through reproducer2 works on real AMD system just fine.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[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