From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [PATCH kvm-unit-tests 4/4] x86/taskswitch_vm86: Task switches into/out of VM86 Date: Tue, 24 Jan 2012 11:14:23 +0100 Message-ID: <4F1E847F.7090908@redhat.com> References: <1327334833-31650-1-git-send-email-kwolf@redhat.com> <1327334833-31650-5-git-send-email-kwolf@redhat.com> <20120123161017.GA12119@redhat.com> <4F1D88C6.2000208@redhat.com> <20120123162222.GB12119@redhat.com> <4F1D8BBB.1010907@redhat.com> <20120123164215.GC12119@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16210 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755436Ab2AXKK7 (ORCPT ); Tue, 24 Jan 2012 05:10:59 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0OAAxng015917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 24 Jan 2012 05:10:59 -0500 In-Reply-To: <20120123164215.GC12119@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 23.01.2012 17:42, schrieb Gleb Natapov: > On Mon, Jan 23, 2012 at 05:32:59PM +0100, Kevin Wolf wrote: >> Am 23.01.2012 17:22, schrieb Gleb Natapov: >>> On Mon, Jan 23, 2012 at 05:20:22PM +0100, Kevin Wolf wrote: >>>> Am 23.01.2012 17:10, schrieb Gleb Natapov: >>>>> On Mon, Jan 23, 2012 at 05:07:13PM +0100, Kevin Wolf wrote: >>>>>> This adds a test case that jumps into VM86 by iret-ing to a TSS and back >>>>>> to Protected Mode using a task gate in the IDT. >>>>>> >>>>> Can you add the test case to taskswitch2.c? >>>> >>> Running one test to check all aspects of taskswitch emulation. >> >> (We all know that top-posting is disliked, but middle-posting looks even >> crazier!) >> > Inserting replies Very true! > at random places is a new cool thing! > >> Does having one test provide any value in and of itself? It's just an >> implementation detail of the test suite. When testing the KVM patches I >> ran all three test cases with './run_tests.sh -g task', which is >> hopefully easy enough. >> > I think it does. I do not have to use external script to combine tests > on the same topic or even remember that such script exists. We do not > create separate tests to test each instruction emulation either. And I > usually run qemu not on the same machine I compile it on, so I need > special tricks to make those test script work. Of course if putting this > code into existing test file is hard separate test is OK, but is this > really the case here? I haven't really checked whether they interfere. I guess I would have to move the GDT indexes for my manually created TSSes and I would have to hope that nobody else needs the memory I'm overwriting with the real mode code (there doesn't seem to be memory management for < 1 MB). Should taskswitch.c and taskswitch2.c be merged as well then? Or is there a reason why they must stay separate? One file or three files makes sense to me for three tests, but two not so much. Kevin