public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: Nadav Amit <namit@cs.technion.ac.il>,
	gleb@kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests v2] x86: Test task-switch with cs.rpl != cs.dpl
Date: Tue, 19 Aug 2014 15:37:50 +0200	[thread overview]
Message-ID: <53F3532E.7010708@redhat.com> (raw)
In-Reply-To: <F92DBEAB-6FF6-4667-BB9D-A02793AFB74E@gmail.com>

Il 19/08/2014 15:34, Nadav Amit ha scritto:
> I know, but all the other ‘call' tests did. If there is an error, at
> least it should be consistent. ;-)

Right, let's fix it up:

diff --git a/x86/taskswitch2.c b/x86/taskswitch2.c
index fd9a404..3cfb467 100644
--- a/x86/taskswitch2.c
+++ b/x86/taskswitch2.c
@@ -190,7 +190,7 @@ void test_kernel_mode_int()

 	/* test that calling a task by lcall works */
 	test_count = 0;
-	set_intr_task_gate(0, irq_tss);
+	tss_intr.eip = (u32)irq_tss;
 	printf("Calling task by lcall\n");
 	/* hlt opcode is 0xf4 I use destination IP 0xf4f4f4f4 to catch
 	   incorrect instruction length calculation */
@@ -205,7 +205,7 @@ void test_kernel_mode_int()

 	/* test that calling a task by ljmp works */
 	test_count = 0;
-	set_intr_task_gate(0, jmp_tss);
+	tss_intr.eip = (u32)jmp_tss;
 	printf("Jumping to a task by ljmp\n");
 	asm volatile ("ljmp $" xstr(TSS_INTR) ", $0xf4f4f4f4");
 	printf("Jump back succeeded\n");


Paolo

  reply	other threads:[~2014-08-19 13:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 17:14 Regression problem with commit 5045b46803 Nadav Amit
2014-08-17  6:17 ` Paolo Bonzini
2014-08-17  6:23   ` Nadav Amit
2014-08-17  6:28     ` Paolo Bonzini
2014-08-17  7:19       ` Nadav Amit
2014-08-17  9:35         ` Paolo Bonzini
2014-08-17 19:32           ` [PATCH] KVM: x86: Revert "check CS.DPL against RPL during task switch" Nadav Amit
2014-08-17 19:34             ` [PATCH kvm-unit-tests] x86: Test task-switch with cs.rpl != cs.dpl Nadav Amit
2014-08-19 10:27               ` Paolo Bonzini
2014-08-19 13:04                 ` [PATCH kvm-unit-tests v2] " Nadav Amit
2014-08-19 13:28                   ` Paolo Bonzini
2014-08-19 13:34                     ` Nadav Amit
2014-08-19 13:37                       ` Paolo Bonzini [this message]
2014-08-17 21:09             ` [PATCH] KVM: x86: Revert "check CS.DPL against RPL during task switch" Paolo Bonzini
2014-08-17 21:13               ` Paolo Bonzini
2014-08-17 21:33                 ` Nadav Amit
2014-08-17 21:52                   ` Paolo Bonzini
2014-08-17 21:39               ` Nadav Amit
2014-08-17 21:52                 ` Paolo Bonzini

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=53F3532E.7010708@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=namit@cs.technion.ac.il \
    /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