From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] [kvm-unit-tests] realmode: test SAHF instruction Date: Sun, 3 Nov 2013 17:42:07 +0200 Message-ID: <20131103154207.GD7513@redhat.com> References: <1383216145-11024-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28192 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753491Ab3KCPmJ (ORCPT ); Sun, 3 Nov 2013 10:42:09 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA3Fg9Ut008710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 3 Nov 2013 10:42:09 -0500 Content-Disposition: inline In-Reply-To: <1383216145-11024-1-git-send-email-pbonzini@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Oct 31, 2013 at 11:42:25AM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Applied, thanks. > --- > x86/realmode.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/x86/realmode.c b/x86/realmode.c > index 3546771..b9cb634 100644 > --- a/x86/realmode.c > +++ b/x86/realmode.c > @@ -1409,6 +1409,15 @@ static void test_sgdt_sidt(void) > report("sidt", 0, x == y); > } > > +static void test_sahf(void) > +{ > + MK_INSN(sahf, "sahf; pushfw; mov (%esp), %al; popfw"); > + > + inregs.eax = 0xfd00; > + exec_in_big_real_mode(&insn_sahf); > + report("sahf", R_AX, outregs.eax == (inregs.eax | 0xd7)); > +} > + > static void test_lahf(void) > { > MK_INSN(lahf, "pushfw; mov %al, (%esp); popfw; lahf"); > @@ -1554,6 +1563,7 @@ void realmode_start(void) > test_ss_base_for_esp_ebp(); > test_sgdt_sidt(); > test_lahf(); > + test_sahf(); > test_movzx_movsx(); > test_bswap(); > test_aad(); > -- > 1.8.3.1 -- Gleb.