From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [patch 0/3] task switch fixes Date: Sat, 19 Jul 2008 19:08:06 -0300 Message-ID: <20080719220806.152409866@localhost.localdomain> Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([66.187.233.31]:56839 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbYGSWKH (ORCPT ); Sat, 19 Jul 2008 18:10:07 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Some more fixes for the task switch emulation. > I think the problem is in seg_desct_to_kvm_desct() (besides the extra > T's). It copies the limit from the descriptor directly to the kvm_segment > structure. You're right. After fixing that 2003 Server task switches successfully to an EIP that contains junk, a few UD's are injected and then a GP, which BSOD's asking for a reboot. All task switch state is valid, can't find anything that would generate any exception. And even if it did, #GP and #TS are handled with a BSOD. Xen has this special case for when the TSS's first 104 bytes cross a page boundary (docs mention this should be avoided since processor uses the physical addresses as base), but not the case with 2003. XP sets CR3 with invalid bits. Xen simply resets the guest in that case, KVM could do the same. --