From patchwork Fri Feb 25 09:49:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 12759997 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 4DD7FC433EF for ; Fri, 25 Feb 2022 09:49:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239251AbiBYJuX (ORCPT ); Fri, 25 Feb 2022 04:50:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236996AbiBYJuW (ORCPT ); Fri, 25 Feb 2022 04:50:22 -0500 Received: from out0-142.mail.aliyun.com (out0-142.mail.aliyun.com [140.205.0.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 812BD24FA2C for ; Fri, 25 Feb 2022 01:49:50 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R331e4;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_---.Mvv.A6N_1645782587; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.Mvv.A6N_1645782587) by smtp.aliyun-inc.com(127.0.0.1); Fri, 25 Feb 2022 17:49:48 +0800 From: "Hou Wenlong" To: kvm@vger.kernel.org Cc: "Paolo Bonzini" , "Sean Christopherson" , "Hou Wenlong" Subject: [kvm-unit-tests PATCH v4 2/3] x86/emulator: Rename test_ljmp() as test_far_jmp() Date: Fri, 25 Feb 2022 17:49:26 +0800 Message-Id: <6b975c25ce066a9c344b1fedca3bc4826b1878c3.1645672780.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 Reviewed-and-tested-by: Sean Christopherson --- x86/emulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/emulator.c b/x86/emulator.c index c62dcedac991..7925ad48c36d 100644 --- a/x86/emulator.c +++ b/x86/emulator.c @@ -359,7 +359,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; @@ -369,7 +369,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) @@ -1296,7 +1296,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);