target/i386: Assert IOPL is 0 for user-only
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 14 May 2021 15:13:00 +0000 (10:13 -0500)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 19 May 2021 17:15:46 +0000 (12:15 -0500)
commit0ab011cca08651349172187d574e2fb1316283ef
tree987b118d17247502e9412c97e442d442d27636bc
parent01b9d8c1b23b6e5af631cb56b86011466b52789a
target/i386: Assert IOPL is 0 for user-only

On real hardware, the linux kernel has the iopl(2) syscall which
can set IOPL to 3, to allow e.g. the xserver to briefly disable
interrupts while programming the graphics card.

However, QEMU cannot and does not implement this syscall, so the
IOPL is never changed from 0.  Which means that all of the checks
vs CPL <= IOPL are false for user-only.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210514151342.384376-9-richard.henderson@linaro.org>
target/i386/tcg/translate.c