Right, this is better. An even better fix would be to clear CS.RPL before the popf.

Regards,

Fabrice.

Samuel Thibault wrote:
Hi,

The patch that qemu applies to bochs bios is a bit bugged:

 pci_pro_fail:
   pop edi
   pop esi
-  sti
   popf
   stc
+  and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
   retf

The and operation clears carry... So that pci functions always leave
carry clear, and hence tell operating systems that they always work...
This should rather be:

 pci_pro_fail:
   pop edi
   pop esi
-  sti
   popf
+  and dword ptr[esp+4],0xfffffffc ;; reset CS.RPL for kqemu
   stc
   retf

Samuel


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel





_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to