public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests 4/4] x86/taskswitch_vm86: Task switches into/out of VM86
Date: Tue, 24 Jan 2012 12:26:53 +0200	[thread overview]
Message-ID: <20120124102653.GP9571@redhat.com> (raw)
In-Reply-To: <4F1E847F.7090908@redhat.com>

On Tue, Jan 24, 2012 at 11:14:23AM +0100, Kevin Wolf wrote:
> 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).
> 
You can add function alloc_vpage_low(). Other tests may find it useful.

> 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.
> 
taskswitch.c should be removed. It tests nothing that taskswitch2.c does
not check as far as I see.

--
			Gleb.

      reply	other threads:[~2012-01-24 10:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 16:07 [PATCH kvm-unit-tests 0/4] VM86 testcase and run_tests.sh Kevin Wolf
2012-01-23 16:07 ` [PATCH kvm-unit-tests 1/4] Add run_tests.sh Kevin Wolf
2012-01-23 16:07 ` [PATCH kvm-unit-tests 2/4] Add taskswitch testcases to unittest.cfg Kevin Wolf
2012-01-23 16:07 ` [PATCH kvm-unit-tests 3/4] Fix i386 build Kevin Wolf
2012-01-24  9:51   ` Takuya Yoshikawa
2012-01-24  9:58     ` Kevin Wolf
2012-01-23 16:07 ` [PATCH kvm-unit-tests 4/4] x86/taskswitch_vm86: Task switches into/out of VM86 Kevin Wolf
2012-01-23 16:10   ` Gleb Natapov
2012-01-23 16:20     ` Kevin Wolf
2012-01-23 16:22       ` Gleb Natapov
2012-01-23 16:32         ` Kevin Wolf
2012-01-23 16:42           ` Gleb Natapov
2012-01-24 10:14             ` Kevin Wolf
2012-01-24 10:26               ` Gleb Natapov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120124102653.GP9571@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox