The CPL checks introduced in build 6212 need to only be made in protected mode, fixes the Daewoo CB52X-SI.

This commit is contained in:
OBattler
2024-12-03 17:48:07 +01:00
parent 028d5da6da
commit cc8cfb7b3f
2 changed files with 3 additions and 3 deletions

View File

@@ -2611,7 +2611,7 @@ cpu_ven_reset(void)
void
cpu_RDMSR(void)
{
if (CPL)
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1))
x86gpf(NULL, 0);
else switch (cpu_s->cpu_type) {
case CPU_IBM386SLC:
@@ -3468,7 +3468,7 @@ cpu_WRMSR(void)
cpu_log("WRMSR %08X %08X%08X\n", ECX, EDX, EAX);
if (CPL)
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1))
x86gpf(NULL, 0);
else switch (cpu_s->cpu_type) {
case CPU_IBM386SLC:

View File

@@ -878,7 +878,7 @@ opINVD(uint32_t fetchdat)
static int
opWBINVD(uint32_t fetchdat)
{
if (CPL) {
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}