From fcabd353d9bd13a06f008d7be4d689a22ed59da0 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 22 Feb 2024 00:56:28 +0100 Subject: [PATCH] Check IOPL on 286 task segments. --- src/cpu/386_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpu/386_common.c b/src/cpu/386_common.c index 847408ba8..0abf8e936 100644 --- a/src/cpu/386_common.c +++ b/src/cpu/386_common.c @@ -1605,8 +1605,12 @@ checkio(uint32_t port, int mask) { uint32_t t; - if (!(tr.access & 0x08)) + if (!(tr.access & 0x08)) { + if ((CPL) > (IOPL)) + return 1; + return 0; + } cpl_override = 1; t = readmemw(tr.base, 0x66);