kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [kvm-unit-tests] realmode: test SAHF instruction
@ 2013-10-31 10:42 Paolo Bonzini
  2013-11-03 15:42 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2013-10-31 10:42 UTC (permalink / raw)
  To: kvm; +Cc: gleb

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [kvm-unit-tests] realmode: test SAHF instruction
  2013-10-31 10:42 [PATCH] [kvm-unit-tests] realmode: test SAHF instruction Paolo Bonzini
@ 2013-11-03 15:42 ` Gleb Natapov
  0 siblings, 0 replies; 2+ messages in thread
From: Gleb Natapov @ 2013-11-03 15:42 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm

On Thu, Oct 31, 2013 at 11:42:25AM +0100, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-03 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 10:42 [PATCH] [kvm-unit-tests] realmode: test SAHF instruction Paolo Bonzini
2013-11-03 15:42 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).