qemu-system-x86_64 run win7 qcow2 got an exception

Host environment

  • Operating system: Centos 8

  • OS/kernel version: Linux localhost.localdomain 4.18.0-408.el8.x86_64 #1 SMP Mon Jul 18 17:42:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

  • Architecture: x86

  • QEMU flavor: qemu-system-x86_64

  • QEMU version: commit id : ac149498

  • QEMU command line:

    ./qemu-system-x86_64 -machine pc -m 2048 -smp 1 -vnc :1 -boot d -drive file=/tmp/win7.qcow2,index=2,format=qcow2,media=disk   
    

Description of problem

when qemu-system-X86-64 run the win7 qcow2, qemu got an exception

** ERROR:../target/i386/tcg/sysemu/excp_helper.c:517:raise_stage2: code should not be reached Aborted (核心已转储)

FIX

fix.diff