From patchwork Wed Aug 25 06:16:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 131141 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7P6Hqt8029036 for ; Wed, 25 Aug 2010 06:17:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057Ab0HYGRu (ORCPT ); Wed, 25 Aug 2010 02:17:50 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:51748 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751380Ab0HYGRu (ORCPT ); Wed, 25 Aug 2010 02:17:50 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id A81CB17014C; Wed, 25 Aug 2010 14:17:47 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o7P6EShs030889; Wed, 25 Aug 2010 14:14:28 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id E123914C026; Wed, 25 Aug 2010 14:18:57 +0800 (CST) Message-ID: <4C74B526.1040205@cn.fujitsu.com> Date: Wed, 25 Aug 2010 14:16:06 +0800 From: Wei Yongjun User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100528 Thunderbird/3.0.5 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm@vger.kernel.org Subject: [PATCH] Add realmode test for CALL FAR IMM instruction References: <4C74B3ED.9060105@cn.fujitsu.com> In-Reply-To: <4C74B3ED.9060105@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 25 Aug 2010 06:17:53 +0000 (UTC) diff --git a/x86/realmode.c b/x86/realmode.c index a833829..2e12680 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -437,6 +437,9 @@ void test_call(void) "ret\n\t" "2:\t"); MK_INSN(call_far1, "lcallw *(%ebx)\n\t"); + MK_INSN(call_far2, ".byte 0x9a\n\t" + ".word retf\n\t" + ".word 0x00\n\t"); MK_INSN(ret_imm, "sub $10, %sp; jmp 2f; 1: retw $10; 2: callw 1b"); exec_in_big_real_mode(&insn_call1); @@ -453,6 +456,9 @@ void test_call(void) exec_in_big_real_mode(&insn_call_far1); report("call far 1", 0, 1); + exec_in_big_real_mode(&insn_call_far2); + report("call far 2", 0, 1); + exec_in_big_real_mode(&insn_ret_imm); report("ret imm 1", 0, 1); }