[PATCH kvm-unit-tests v2 1/3] realmode: restore DF at exit from exec_in_big_real_mode

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

 



Some tests fail if DF=1.  Restore it directly after executing the test,
do not do it "magically" in print_serial.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/realmode.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/x86/realmode.c b/x86/realmode.c
index 35ace08..71c8a7d 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -26,7 +26,7 @@ static void print_serial(const char *buf)
 {
 	unsigned long len = strlen(buf);
 
-	asm volatile ("cld; addr32/rep/outsb" : "+S"(buf), "+c"(len) : "d"(0xf1));
+	asm volatile ("addr32/rep/outsb" : "+S"(buf), "+c"(len) : "d"(0xf1));
 }
 
 static void exit(int code)
@@ -109,6 +109,8 @@ static void exec_in_big_real_mode(struct insn_desc *insn)
 		"pushfl \n\t"
 		"popl %[save]+36 \n\t"
 
+		/* Restore DF for the harness code */
+		"cld\n\t"
 		"xor %[tmp], %[tmp] \n\t"
 		"mov %[tmp], %%gs \n\t"
 		: [tmp]"=&r"(tmp), [save]"+m"(save)
-- 
1.8.1.4


--
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