lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403101194-23707-6-git-send-email-namit@cs.technion.ac.il>
Date:	Wed, 18 Jun 2014 17:19:54 +0300
From:	Nadav Amit <namit@...technion.ac.il>
To:	pbonzini@...hat.com
Cc:	gleb@...nel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, Nadav Amit <namit@...technion.ac.il>
Subject: [PATCH kvm-unit-tests 5/5] x86: Test monitor and mwait on real-mode

monitor and mwait are now considered to behave as nop.  New patch enables
monitor and mwait in realmode as well.  This test checks whether they are
handled as nop in realmode as well.

Signed-off-by: Nadav Amit <namit@...technion.ac.il>
---
 x86/realmode.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/x86/realmode.c b/x86/realmode.c
index 10c3e03..0a62b5d 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1671,6 +1671,16 @@ void test_xadd(void)
 	report("xadd", R_AX, outregs.eax == inregs.eax * 2);
 }
 
+void test_monitor_mwait(void)
+{
+	MK_INSN(monitor, "monitor\n\t"
+			 "mwait\n\t");
+	inregs.ecx = 0;
+	inregs.eax = 0;
+	exec_in_big_real_mode(&insn_monitor);
+	report("monitor", 0, 1);
+}
+ 
 
 void realmode_start(void)
 {
@@ -1721,6 +1731,7 @@ void realmode_start(void)
 	test_smsw();
 	test_nopl();
 	test_xadd();
+	test_monitor_mwait();
 	test_perf_loop();
 	test_perf_mov();
 	test_perf_arith();
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ