Avi Kivity schrieb: > Joerg Roedel wrote: >> From: Markus Rechberger <[EMAIL PROTECTED]> >> From: Joerg Roedel <[EMAIL PROTECTED]> >> >> This patch fixes the initialization of the segment registers which >> solves the triple fault and keyboard controller reset problems in >> kvm/qemu guests as well as the slow grub menu interaction. The patch >> should also work on Intel VMX now. >> >> diff -upr kvm-12/qemu/target-i386/helper2.c >> kvm-12-reboot-fixed/qemu/target-i386/helper2.c >> --- kvm-12/qemu/target-i386/helper2.c 2006-12-31 14:31:38.000000000 >> +0100 >> +++ kvm-12-reboot-fixed/qemu/target-i386/helper2.c 2007-01-23 >> 20:24:42.265987000 +0100 >> @@ -151,6 +151,9 @@ CPUX86State *cpu_x86_init(void) >> void cpu_reset(CPUX86State *env) >> { >> int i; >> + unsigned int flags = DESC_P_MASK | >> + DESC_S_MASK | >> + (2 << DESC_TYPE_SHIFT); >> >> memset(env, 0, offsetof(CPUX86State, breakpoints)); >> >> @@ -173,9 +176,9 @@ void cpu_reset(CPUX86State *env) >> env->tr.flags = DESC_P_MASK; >> >> cpu_x86_load_seg_cache(env, R_CS, 0xf000, 0xffff0000, 0xffff, 0); >> - cpu_x86_load_seg_cache(env, R_DS, 0, 0, 0xffff, 0); >> - cpu_x86_load_seg_cache(env, R_ES, 0, 0, 0xffff, 0); >> - cpu_x86_load_seg_cache(env, R_SS, 0, 0, 0xffff, 0); >> + cpu_x86_load_seg_cache(env, R_DS, 0, 0, 0xffff, flags); >> + cpu_x86_load_seg_cache(env, R_ES, 0, 0, 0xffff, flags); >> + cpu_x86_load_seg_cache(env, R_SS, 0, 0, 0xffff, flags); >> cpu_x86_load_seg_cache(env, R_FS, 0, 0, 0xffff, 0); >> cpu_x86_load_seg_cache(env, R_GS, 0, 0, 0xffff, 0); >> > > This changes core qemu code, which may make merging our code back to > qemu more difficult. It also means we need to test with -no-kvm. > > Can you try making load_regs() in qemu-kvm.c detect the case of flags == > 0 (perhaps only if cr0.pg == 0) and changing it only then? It should > have the same effect. > > > Hello Avi!
I tried this patch yesterday whilst installing Windows 2003 with kvm svn and when the installer requested a reboot I just got this in the console: unhandled vm exit: 0x80000021 rax 0000000000000000 rbx 0000000000000000 rcx 0000000000000000 rdx 0000000000000600 rsi 0000000000000000 rdi 0000000000000000 rsp 0000000000000000 rbp 0000000000000000 r8 0d7905c600010000 r9 b7f506e0b7f4fff4 r10 bf9d7c3008049138 r11 b7f50898b7f42e42 r12 00000001b7bbf020 r13 0000000000000001 r14 000000920804a0a2 r15 0812335c00000000 rip 000000000000fff0 rflags 00023002 My host is a Fujitsu-Siemens S7110 with Intel Core 2 Duo with Ubuntu Feisty kernel 2.6.20 and the svn revision was 4368. Daniel Hecken ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel