Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] kvm-unit-test: revert use of RDSEED and RDRAND
@ 2017-12-07  4:36 Matt Weber
  2017-12-14  8:44 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Weber @ 2017-12-07  4:36 UTC (permalink / raw)
  To: buildroot

Removing this commit in buildroot as it causes
build failures when the host binutils isn't
at least 2.23 (2.22.x introduced RDSEED).

The host toolchain is used for x86_64 target
builds where we need to do a 32bit build.

Fixes:
http://autobuild.buildroot.net/results/c39/c3987a3cbd2960b0ff50f872636bdfd8d1a9c820/

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 ...002-Revert-x86-vmx-test-RDRAND-and-RDSEED.patch | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 package/kvm-unit-tests/0002-Revert-x86-vmx-test-RDRAND-and-RDSEED.patch

diff --git a/package/kvm-unit-tests/0002-Revert-x86-vmx-test-RDRAND-and-RDSEED.patch b/package/kvm-unit-tests/0002-Revert-x86-vmx-test-RDRAND-and-RDSEED.patch
new file mode 100644
index 0000000000..1d3fb1ca6a
--- /dev/null
+++ b/package/kvm-unit-tests/0002-Revert-x86-vmx-test-RDRAND-and-RDSEED.patch
@@ -0,0 +1,66 @@
+From ff6ee5c5345e5a55827d657d8d862237338b6edb Mon Sep 17 00:00:00 2001
+From: Matt Weber <matthew.weber@rockwellcollins.com>
+Date: Wed, 6 Dec 2017 22:30:04 -0600
+Subject: [PATCH] Revert "x86: vmx: test RDRAND and RDSEED"
+
+Removing this commit in buildroot as it causes
+build failures when the host binutils isn't
+at least 2.23 (2.22.x introduced RDSEED).
+The host toolchain is used for x86_64 target
+builds where we need to do a 32bit build.
+
+Fixes:
+http://autobuild.buildroot.net/results/c39/c3987a3cbd2960b0ff50f872636bdfd8d1a9c820/
+
+This reverts commit a88205d14320d2f681a6c220f1d08711b9ce3885.
+---
+ x86/vmx.h       | 1 -
+ x86/vmx_tests.c | 6 ------
+ 2 files changed, 7 deletions(-)
+
+diff --git a/x86/vmx.h b/x86/vmx.h
+index f0b8776..7a1937e 100644
+--- a/x86/vmx.h
++++ b/x86/vmx.h
+@@ -396,7 +396,6 @@ enum Ctrl1 {
+ 	CPU_URG			= 1ul << 7,
+ 	CPU_VINTD		= 1ul << 9,
+ 	CPU_RDRAND		= 1ul << 11,
+-	CPU_RDSEED		= 1ul << 16,
+ 	CPU_PML                 = 1ul << 17,
+ };
+ 
+diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
+index e8c97f2..3619e0c 100644
+--- a/x86/vmx_tests.c
++++ b/x86/vmx_tests.c
+@@ -772,8 +772,6 @@ asm(
+ 	"insn_sldt: sldt %ax;ret\n\t"
+ 	"insn_lldt: xor %eax, %eax; lldt %ax;ret\n\t"
+ 	"insn_str: str %ax;ret\n\t"
+-	"insn_rdrand: rdrand %rax;ret\n\t"
+-	"insn_rdseed: rdseed %rax;ret\n\t"
+ );
+ extern void insn_hlt();
+ extern void insn_invlpg();
+@@ -798,8 +796,6 @@ extern void insn_lldt();
+ extern void insn_str();
+ extern void insn_cpuid();
+ extern void insn_invd();
+-extern void insn_rdrand();
+-extern void insn_rdseed();
+ 
+ u32 cur_insn;
+ u64 cr3;
+@@ -855,8 +851,6 @@ static struct insn_table insn_table[] = {
+ 	{"DESC_TABLE (LLDT)", CPU_DESC_TABLE, insn_lldt, INSN_CPU1, 47, 0, 0, 0},
+ 	{"DESC_TABLE (STR)", CPU_DESC_TABLE, insn_str, INSN_CPU1, 47, 0, 0, 0},
+ 	/* LTR causes a #GP if done with a busy selector, so it is not tested.  */
+-	{"RDRAND", CPU_RDRAND, insn_rdrand, INSN_CPU1, VMX_RDRAND, 0, 0, 0},
+-	{"RDSEED", CPU_RDSEED, insn_rdseed, INSN_CPU1, VMX_RDSEED, 0, 0, 0},
+ 	// Instructions always trap
+ 	{"CPUID", 0, insn_cpuid, INSN_ALWAYS_TRAP, 10, 0, 0, 0},
+ 	{"INVD", 0, insn_invd, INSN_ALWAYS_TRAP, 13, 0, 0, 0},
+-- 
+2.14.2
+
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-09 16:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07  4:36 [Buildroot] [PATCH] kvm-unit-test: revert use of RDSEED and RDRAND Matt Weber
2017-12-14  8:44 ` Thomas Petazzoni
2017-12-15 20:41   ` Matthew Weber
2017-12-15 20:41     ` [Buildroot] FW: " Kees van Unen
2017-12-18  7:49     ` [Buildroot] " Thomas Petazzoni
2018-01-03 22:27       ` Thomas Petazzoni
2018-01-03 22:42         ` Matthew Weber
2018-01-04  8:36           ` Thomas Petazzoni
2018-01-09 16:09             ` Matthew Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox