From patchwork Thu Aug 5 12:43:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Gamal X-Patchwork-Id: 117293 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 o75Chale020045 for ; Thu, 5 Aug 2010 12:43:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759056Ab0HEMne (ORCPT ); Thu, 5 Aug 2010 08:43:34 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:53503 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756651Ab0HEMnd (ORCPT ); Thu, 5 Aug 2010 08:43:33 -0400 Received: by wyb39 with SMTP id 39so6597022wyb.19 for ; Thu, 05 Aug 2010 05:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=y5QSaHT/aym8IK5QwZfwzE9velXjduaE9LHXQNZDgBY=; b=lsGqmL3D2s9FsZXnz8S1xoN4SuVH7YpWs9kv6NQHRgwecfwInN6qd97oMkX4IJLkyl G0ATKWHcDscU3EB8skityPPYh7i3I12VPyX7DL+JzAs3rNblrF52iFPAHho7sdJK2WgP k75L8AvzmO9eMTvUFxnilUUMraIbyATranqb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=rBJx5BeU2myLwNAreDKdJaXPwYIayMPsymEnA7y9ECWizLpZMj+ahDcCisrVRYAghD ps/LzPcWM3LWhyxuwB2xJfnKfe///2UbHkq79VP7NX6lBQvYCYtGT1ka2klzlluzm05h jqbuKM9ThnjWPneH3bmXFAovLq5rOTfBtz8W0= Received: by 10.227.148.18 with SMTP id n18mr8827246wbv.207.1281012212437; Thu, 05 Aug 2010 05:43:32 -0700 (PDT) Received: from localhost.localdomain ([188.52.64.23]) by mx.google.com with ESMTPS id p82sm90324weq.27.2010.08.05.05.43.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Aug 2010 05:43:32 -0700 (PDT) From: Mohammed Gamal To: avi@redhat.com Cc: mtosatti@redhat.com, kvm@vger.kernel.org, Mohammed Gamal Subject: [PATCH] test: Add realmode test for stc instruction Date: Thu, 5 Aug 2010 15:43:22 +0300 Message-Id: <1281012202-22063-1-git-send-email-m.gamal005@gmail.com> X-Mailer: git-send-email 1.7.0.4 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]); Thu, 05 Aug 2010 12:43:36 +0000 (UTC) diff --git a/x86/realmode.c b/x86/realmode.c index 7534da5..ead5021 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -462,6 +462,7 @@ void test_eflags_insn(void) { struct regs inregs = { 0 }, outregs; MK_INSN(clc, "clc"); + MK_INSN(stc, "stc"); MK_INSN(cli, "cli"); MK_INSN(sti, "sti"); MK_INSN(cld, "cld"); @@ -476,6 +477,14 @@ void test_eflags_insn(void) print_serial("clc test: PASS\n"); exec_in_big_real_mode(&inregs, &outregs, + insn_stc, + insn_stc_end - insn_stc); + if (!(outregs.eflags & 1)) + print_serial("stc test: FAIL\n"); + else + print_serial("stc test: PASS\n"); + + exec_in_big_real_mode(&inregs, &outregs, insn_cli, insn_cli_end - insn_cli); if (outregs.eflags & (1 << 9))