From patchwork Thu Feb 10 08:46:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 12741566 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D562C433EF for ; Thu, 10 Feb 2022 08:47:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237921AbiBJIrP (ORCPT ); Thu, 10 Feb 2022 03:47:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237870AbiBJIrJ (ORCPT ); Thu, 10 Feb 2022 03:47:09 -0500 Received: from out0-146.mail.aliyun.com (out0-146.mail.aliyun.com [140.205.0.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70D881E7 for ; Thu, 10 Feb 2022 00:47:10 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R591e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047190;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---.MntXQXa_1644482825; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.MntXQXa_1644482825) by smtp.aliyun-inc.com(127.0.0.1); Thu, 10 Feb 2022 16:47:05 +0800 From: "Hou Wenlong" To: kvm@vger.kernel.org Cc: "Sean Christopherson" , "Hou Wenlong" , "Paolo Bonzini" Subject: [kvm-unit-tests PATCH v3 2/3] x86/emulator: Rename test_ljmp() as test_far_jmp() Date: Thu, 10 Feb 2022 16:46:34 +0800 Message-Id: <8d712b48c0b5c2f0e4c3a0126321a083d850591e.1644481282.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Signed-off-by: Hou Wenlong --- x86/emulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);