diff mbox series

[kvm-unit-tests,v3,2/3] x86/emulator: Rename test_ljmp() as test_far_jmp()

Message ID 8d712b48c0b5c2f0e4c3a0126321a083d850591e.1644481282.git.houwenlong.hwl@antgroup.com (mailing list archive)
State New, archived
Headers show
Series x86/emulator: Add some tests for loading segment descriptor in emulator | expand

Commit Message

Hou Wenlong Feb. 10, 2022, 8:46 a.m. UTC
Rename test_ljmp() as test_far_jmp() to better match the SDM. Also
change the output of test to explain what it is doing.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
---
 x86/emulator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sean Christopherson Feb. 10, 2022, 4:39 p.m. UTC | #1
On Thu, Feb 10, 2022, Hou Wenlong wrote:
> Rename test_ljmp() as test_far_jmp() to better match the SDM. Also
> change the output of test to explain what it is doing.
> 
> Suggested-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
> ---

Reviewed-and-tested-by: Sean Christopherson <seanjc@google.com>
diff mbox series

Patch

diff --git a/x86/emulator.c b/x86/emulator.c
index c56b32be8baa..45972c2fe940 100644
--- a/x86/emulator.c
+++ b/x86/emulator.c
@@ -358,7 +358,7 @@  static void test_pop(void *mem)
 	       "enter");
 }
 
-static void test_ljmp(void *mem)
+static void test_far_jmp(void *mem)
 {
     unsigned char *m = mem;
     volatile int res = 1;
@@ -368,7 +368,7 @@  static void test_ljmp(void *mem)
     asm volatile ("rex64 ljmp *%0"::"m"(*m));
     res = 0;
 jmpf:
-    report(res, "ljmp");
+    report(res, "far jmp, via emulated MMIO");
 }
 
 static void test_incdecnotneg(void *mem)
@@ -1295,7 +1295,7 @@  int main(void)
 
 	test_smsw(mem);
 	test_lmsw();
-	test_ljmp(mem);
+	test_far_jmp(mem);
 	test_far_ret(mem);
 	test_stringio();
 	test_incdecnotneg(mem);