[PATCH kvm-unit-tests 07/12] realmode: test lahf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 x86/realmode.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/x86/realmode.c b/x86/realmode.c
index 98a25c2..a2cc8a9 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1335,6 +1335,15 @@ static void test_sgdt_sidt(void)
     report("sidt", 0, x == y);
 }
 
+static void test_lahf(void)
+{
+    MK_INSN(lahf, "pushfw; mov %al, (%esp); popfw; lahf");
+
+    inregs.eax = 0xc7;
+    exec_in_big_real_mode(&insn_lahf);
+    report("lahf", R_AX, (outregs.eax >> 8) == inregs.eax);
+}
+
 void realmode_start(void)
 {
 	test_null();
@@ -1371,6 +1380,7 @@ void realmode_start(void)
 	test_cpuid();
 	test_ss_base_for_esp_ebp();
 	test_sgdt_sidt();
+	test_lahf();
 
 	exit(0);
 }
-- 
1.7.11

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux