lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[intel-tdx:guest 2/4] arch/x86/kernel/tdx-tests.c:85: Error: bad register name `%rax'
tree:   https://github.com/intel/tdx.git guest
head: 99ee592fd433c9c999684d873636c3764019dd08
commit: 857f6deb3a90f4d3a0ad94433929d017f31e2efd [2/4] x86/tdx-tests: Add a port of a kvm unit test
config: i386-buildonly-randconfig-r006-20211207 (https://download.01.org/0day-ci/archive/20211208/202112081039.hxR5noCJ-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/857f6deb3a90f4d3a0ad94433929d017f31e2efd
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest
git checkout 857f6deb3a90f4d3a0ad94433929d017f31e2efd
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

arch/x86/kernel/tdx-tests.c:66:12: warning: no previous prototype for 'kvm_unit_test_debug_init' [-Wmissing-prototypes]
66 | int __init kvm_unit_test_debug_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/tdx-tests.c: Assembler messages:
>> arch/x86/kernel/tdx-tests.c:85: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:86: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:87: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:88: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:89: Error: bad register name `%rax'
>> arch/x86/kernel/tdx-tests.c:90: Error: bad register name `%rip)'
arch/x86/kernel/tdx-tests.c:111: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:112: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:113: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:114: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:115: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:116: Error: bad register name `%rip)'
arch/x86/kernel/tdx-tests.c:118: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:133: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:134: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:135: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:136: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:137: Error: bad register name `%rax'
arch/x86/kernel/tdx-tests.c:138: Error: bad register name `%rip)'


vim +85 arch/x86/kernel/tdx-tests.c

65
66 int __init kvm_unit_test_debug_init(void)
67 {
68 unsigned long start;
69
70 register_die_notifier(&kvm_unit_test_debug_notifier);
71
72 /*
73 * cpuid and rdmsr (among others) trigger VM exits and are then
74 * emulated. Test that single stepping works on emulated instructions.
75 *
76 * With TDX, there are 2 possibilities: instruction is either emulated
77 * by the TDX module or the #VE handler. In the former case, it's the
78 * job of the TDX module to raise #DB.
79 */
80 n = 0;
81
82 set_debugreg(0, 6);
83 /* First, test #VE emulated instructions: CPUID 0x5 and RDMSR 0x8b */
84 asm volatile(
> 85 "pushf\n\t"
86 "pop %%rax\n\t"
87 "and $~(1<<8),%%rax\n\t"
88 "push %%rax\n\t"
89 "or $(1<<8),%%rax\n\t"
> 90 "push %%rax\n\t"

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2021-12-08 03:56    [W:0.021 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site