History log of /external/qemu/target-i386/kvm-gs-restore.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a9fd5a1492276fe429eab8527fc425cee5c62ed8 26-Dec-2011 Jiang Yunhong <yunhong.jiang@intel.com> Fix signal handling for GS_RESTORE hack

Currently we hack QEMU's signal handler because of the GS_BASE MSR KVM bug.
The reason of the hack is, when signal happens during KVM_RUN ioctl, the
GS_BASE is broken, we have to restore the correct gs before run the signal
handler.
However, currently we take signal even when signal is set as SIG_DFL/SIG_IGN,
or the signal is set with SIG_SIGINFO. Currently "kill -13" to emulator causes
emulator crash.

This patch fixed it as:
1) If the signal handler is set as SIG_DFL or SIG_IGN, we don't take the signal
2) If the signal handler is set with SIG_SIGINFO, we will use sa_sigaction
3) Cover all potential signals

One thing left is, if the signal handler is setup dynamically, this method may
still have issue because currently the signal handlers are taken statically
when first KVM_RUN ioctl. Luckily this does not happen now.

Change-Id: Icfbe43db665a11f2b6eaf9593075b3e643783ee7
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
/external/qemu/target-i386/kvm-gs-restore.c
bb0140b925cb2adce03ebc0885067ea3bfd19a20 28-May-2011 Jun Nakajima <jun.nakajima@intel.com> x86: Workaorund for the KVM GS_BASE MSR save/restore issue.

In some versions of the kvm module in Ubuntu, the host's GS_BASE MSR is not save/restored correctly
when running guests on 64-bit hosts if the qemu/emulator is 32-bit.
This patch implements a workaround in the emulator code.

Change-Id: If3ebe3cb49f377c5d0547c75f6ac3a3ceacdc375
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
/external/qemu/target-i386/kvm-gs-restore.c