Skip to contentSkip to conversation

new kqemu win98 hack affects FreeBSD

Qemu-devel Juergen Lock 2 participants 2 messages Aug 8, 2005

lore
Share & tools
lore
#0 lore raw

Hi!

I got a report that kqemu doesnt speed up FreeBSD guests anymore,
and found out that the win98 hack stops kqemu from being used. If i disable it and add this to cpu-exec.c,

Index: cpu-exec.c
@@ -232,6 +232,13 @@

 #ifdef USE_KQEMU
             if (kqemu_is_ok(env) && env->interrupt_request == 0) {
                 int ret;

+#if 1
+ static uint32_t lastldtlimit = 0;
+ if (env->ldt.limit != lastldtlimit) {
+ lastldtlimit = env->ldt.limit;
+ printf("new ldt limit 0x%x\n", (int)lastldtlimit);
+ }
+#endif

                 env->eflags = env->eflags | cc_table[CC_OP].compute_all() | (DF & DF_MASK);
                 ret = kqemu_cpu_exec(env);
                 /* put eflags in CPU temporary format */

then a short run with FreeSBIE gives this:

new ldt limit 0xffff
new ldt limit 0xfff
new ldt limit 0x1fff
new ldt limit 0xfff
new ldt limit 0x1fff
new ldt limit 0xfff
new ldt limit 0x1fff
new ldt limit 0x87
new ldt limit 0x1fff
new ldt limit 0x87
new ldt limit 0x1fff
new ldt limit 0xfff
new ldt limit 0x2fff
new ldt limit 0x87
new ldt limit 0xfff
new ldt limit 0x87
new ldt limit 0xfff
new ldt limit 0x87
new ldt limit 0xfff

So maybe we need a new switch -win98-hack... :)

Juergen

#1 lore raw
Quoted 2 lines

So maybe we need a new switch -win98-hack... :)

It's spelt -no-kqemu :-)

Paul