From patchwork Thu Jul 30 04:41:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bandan Das X-Patchwork-Id: 6898221 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4AAA9F380 for ; Thu, 30 Jul 2015 04:41:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E865F205B6 for ; Thu, 30 Jul 2015 04:41:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8F29A205B5 for ; Thu, 30 Jul 2015 04:41:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750954AbbG3ElI (ORCPT ); Thu, 30 Jul 2015 00:41:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41932 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbbG3ElG (ORCPT ); Thu, 30 Jul 2015 00:41:06 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id E70C336AA30; Thu, 30 Jul 2015 04:41:05 +0000 (UTC) Received: from aqua (ovpn-113-30.phx2.redhat.com [10.3.113.30]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6U4f4Q9023239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 30 Jul 2015 00:41:04 -0400 From: Bandan Das To: Shih-Wei Li , Paolo Bonzini Cc: Christoffer Dall , kvm@vger.kernel.org, Christoffer Dall Subject: Re: kvm-unit-test failed to complete References: <20150729183016.GA28293@cbox> Date: Thu, 30 Jul 2015 00:41:04 -0400 In-Reply-To: (Shih-Wei Li's message of "Wed, 29 Jul 2015 21:04:51 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Shih-Wei Li writes: > On Wed, Jul 29, 2015 at 2:38 PM, Shih-Wei Li wrote: >> On Wed, Jul 29, 2015 at 2:30 PM, Christoffer Dall wrote: >>> Hi Shih-Wei, >>> >>> [Something weird happened when sending these e-mails, you sent two where >>> one seems to be a slight modification of the other?] >> >> yes, the previous one just got rejected by the mailing list. sorry >> about the spam. >> >>> >>> On Wed, Jul 29, 2015 at 02:18:23PM -0400, Shih-Wei Li wrote: >>>> Hi all, >>>> >>>> This is Shih-Wei, I'm Christoffer's colleague at Columbia University. >>>> We have experienced some problems in running kvm-unit-tests in our >>>> environment. >>>> Here's what we did: >>>> ./configure >>>> make >>>> ./run_test.sh >>>> >>>> run_test.sh halted in some specific test items and couldn't finish the >>>> run. I managed to get it finish running after removing the following >>>> items: >>>> x86/apic.c: >>>> -> removed: >>>> test_sti_nmi(); >>>> test_multiple_nmi(); >>> >>> I'm wondering if there's a dependency on the version of QEMU? Have you >>> tried with the most recent upstream QEMU? >> >> I haven't, but I will try. We are using qemu 2.2.50 now. > > Here's the update. I just used the upstream QEMU to run kvm-unit-test, > but it still failed to finish the same test items I mentioned earlier. (Just a cursory look) It seems this commit introduced it - commit 402d4596789335f540a0697955f6dcf43e2bb796 Author: Paolo Bonzini Date: Thu Jul 23 09:16:45 2015 +0200 x86: load 64-bit segments into the segment registers kvm-unit-tests was keeping DS/ES/FS/GS loaded with the segment descriptors provided by the multiboot boot loader (which are 32-bit), and instead loading SS with 0. The vmx.flat test failed because KVM did not like doing writes into such an SS. Load again the segment registers after entering 64-bit mode, for both the BSP and the APs. Signed-off-by: Paolo Bonzini Paolo, what is the purpose of initializing %gs and %fs ? It seems if I comment out "mov %ax, %gs", the test works. handle_irq() does seem to trigger but the handler doesn't seem to get called if %gs is initialized. Weird. > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/x86/cstart64.S b/x86/cstart64.S index 8d0d95d..8d5ee2d 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -213,7 +213,11 @@ idt_descr: load_tss: lidtq idt_descr - mov $0, %eax + mov $0x10, %eax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs mov %ax, %ss mov $(APIC_DEFAULT_PHYS_BASE + APIC_ID), %eax mov (%rax), %eax