On 3/7/23 06:30, Laurent Vivier wrote:
Richard,
do you think it's correct?
It's correct enough, until target/i386 is fixed to not require the GDT/LDT to be
incorrectly mapped in the (ring 3) user address space.
You may wish to fix a few nits when applying:
}
+static void target_cpu_free(void *obj)
Missing line before function.
+#if defined(TARGET_I386) || defined(TARGET_X86_64)
+ new_env->gdt.base = target_mmap(0, sizeof(uint64_t) * TARGET_GDT_ENTRIES,
+ PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+ memcpy((void*)g2h_untagged(new_env->gdt.base), (void*)g2h_untagged(env->gdt.base),
sizeof(uint64_t) * TARGET_GDT_ENTRIES);
Unnecessary casts, overlong line.
r~