Re: [PATCH] target/i386: Update cc_op for SAHF

Christian Quante <[email protected]> Sat, 1 Aug 2026 15:36:20 +0200
Newsgroups org.nongnu.qemu-devel
Message-ID <[email protected]>
Am 09.06.26 um 02:28 schrieb Richard Henderson:
> Removing the call to gen_compute_eflags meant we no longer
> updated cc_op after computing EFLAGS.
>
I ran into this regression with real guests: since the change in v11.0
the PC DOS 7 installer aborts while copying its first file, and Windows
3.1 setup fails the same way (I reported it as #3959, which was closed
as a duplicate of #3537).

Tested this patch on top of current master (e1705a25af, v11.1.0-rc2).
Both runs used the same script, the same firmware and a freshly created
500 MB disk image: boot the German PC DOS 7 CD, run SETUP to the end,
then inspect the resulting image from the host with mtools and finally
boot the machine from that image.

   master unpatched:    SETUP stops with "INSTALLATIONSFEHLER ... Die
                        aufgelistete Datei wurde nicht kopiert. Fehler
                        beim Schreiben --> CHKDSK.COM" [installation
                        error ... the listed file was not copied; error
                        writing CHKDSK.COM].  The image holds three
                        files -- IBMBIO.COM, IBMDOS.COM, COMMAND.COM --
                        and no \DOS directory.  (It does boot into a
                        bare DOS, since those three were written before
                        the installer gave up.)

   master + this patch: SETUP runs to completion and reboots the machine
                        by itself.  The image holds 157 entries, among
                        them \DOS\CHKDSK.COM -- the file the unpatched
                        run fails on.  Booting that image comes up as a
                        fully installed system: CONFIG.SYS and
                        AUTOEXEC.BAT are processed, the drivers load,
                        and VER reports "PC DOS Version 7.00 Revision 1".

Given the Cc: qemu-stable, it would be good to see this in 11.1.

Tested-by: Christian Quante <[email protected]>