From patchwork Wed Aug 25 07:06:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 131181 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 o7P78NBe006866 for ; Wed, 25 Aug 2010 07:08:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752289Ab0HYHIV (ORCPT ); Wed, 25 Aug 2010 03:08:21 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:51695 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751338Ab0HYHIU (ORCPT ); Wed, 25 Aug 2010 03:08:20 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 18C7C17012D; Wed, 25 Aug 2010 15:08:19 +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 o7P7507j001565; Wed, 25 Aug 2010 15:05:00 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id F374914C026; Wed, 25 Aug 2010 15:09:29 +0800 (CST) Message-ID: <4C74C0FE.6070103@cn.fujitsu.com> Date: Wed, 25 Aug 2010 15:06:38 +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 CC: Marcelo Tosatti , kvm@vger.kernel.org Subject: [PATCHv2] Add realmode test for CALL FAR IMM instruction References: <4C74B3ED.9060105@cn.fujitsu.com> <4C74B526.1040205@cn.fujitsu.com> <4C74BD47.5030101@redhat.com> In-Reply-To: <4C74BD47.5030101@redhat.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 07:08:23 +0000 (UTC) diff --git a/x86/realmode.c b/x86/realmode.c index a833829..d171a56 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -437,6 +437,7 @@ void test_call(void) "ret\n\t" "2:\t"); MK_INSN(call_far1, "lcallw *(%ebx)\n\t"); + MK_INSN(call_far2, "lcallw $0, $retf\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 +454,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); }