[PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze

Paolo Bonzini posted 10 patches 2 weeks, 5 days ago
Only 1 patches received!
meson.build                          | 29 ++++++++++-----
include/qemu/version.h               | 20 ++++++++++
target/i386/tcg/decode-new.h         |  9 +++--
bsd-user/main.c                      |  2 +-
linux-user/main.c                    |  2 +-
monitor/qmp-cmds-control.c           |  2 +-
qemu-img.c                           |  2 +-
qemu-io.c                            |  2 +-
qemu-nbd.c                           |  2 +-
qga/main.c                           |  2 +-
scsi/qemu-pr-helper.c                |  2 +-
storage-daemon/qemu-storage-daemon.c |  2 +-
system/vl.c                          |  2 +-
target/i386/tcg/int_helper.c         |  4 +-
target/i386/tcg/translate.c          | 21 +++--------
tests/tcg/i386/test-idiv-overflow.c  | 70 +++++++++++++++++++++++++++++++++++
tools/i386/qemu-vmsr-helper.c        |  3 +-
tools/qemu-vnc/qemu-vnc.c            |  2 +-
util/module.c                        |  2 +-
target/i386/tcg/decode-new.c.inc     | 72 ++++++++++++++++++------------------
target/i386/tcg/emit.c.inc           | 30 ++++++++++-----
AGENTS.md                            | 10 +++++
scripts/qemu-version.h.in            |  1 +
scripts/qemu-version.sh              | 25 -------------
tests/tcg/i386/meson.build           |  1 +
tests/tcg/x86_64/meson.build         |  1 +
ui/cocoa.m                           |  2 +-
27 files changed, 206 insertions(+), 116 deletions(-)
create mode 100644 include/qemu/version.h
create mode 100644 tests/tcg/i386/test-idiv-overflow.c
create mode 100644 scripts/qemu-version.h.in
delete mode 100755 scripts/qemu-version.sh
[PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Paolo Bonzini 2 weeks, 5 days ago
The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:

  Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:

  meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)

----------------------------------------------------------------
* target/i386/tcg: bugfixes and cleanups
* AGENTS.md: add final instructions
* meson: rewrite scripts/qemu-version.sh directly in meson.build

----------------------------------------------------------------

v1->v2: also adjust ui/cocoa.m

Alex Bennée (1):
      target/i386: terminate a tcg block on gen_RDMSR

Jiang Yuxuan (1):
      target/i386: raise #DE for INT_MIN / -1 in IDIV helpers

Paolo Bonzini (8):
      target/i386/tcg: change popl_esp_hack to an X86InsnSpecial
      target/i386/tcg: inline gen_leave
      target/i386/tcg: reject VEX.NP for MMX instructions
      target/i386/tcg: remove X and Y operand types
      target/i386/tcg: remove F operand type
      AGENTS.md: add final instructions
      include: introduce qemu/version.h
      meson: rewrite scripts/qemu-version.sh directly in meson.build

 meson.build                          | 29 ++++++++++-----
 include/qemu/version.h               | 20 ++++++++++
 target/i386/tcg/decode-new.h         |  9 +++--
 bsd-user/main.c                      |  2 +-
 linux-user/main.c                    |  2 +-
 monitor/qmp-cmds-control.c           |  2 +-
 qemu-img.c                           |  2 +-
 qemu-io.c                            |  2 +-
 qemu-nbd.c                           |  2 +-
 qga/main.c                           |  2 +-
 scsi/qemu-pr-helper.c                |  2 +-
 storage-daemon/qemu-storage-daemon.c |  2 +-
 system/vl.c                          |  2 +-
 target/i386/tcg/int_helper.c         |  4 +-
 target/i386/tcg/translate.c          | 21 +++--------
 tests/tcg/i386/test-idiv-overflow.c  | 70 +++++++++++++++++++++++++++++++++++
 tools/i386/qemu-vmsr-helper.c        |  3 +-
 tools/qemu-vnc/qemu-vnc.c            |  2 +-
 util/module.c                        |  2 +-
 target/i386/tcg/decode-new.c.inc     | 72 ++++++++++++++++++------------------
 target/i386/tcg/emit.c.inc           | 30 ++++++++++-----
 AGENTS.md                            | 10 +++++
 scripts/qemu-version.h.in            |  1 +
 scripts/qemu-version.sh              | 25 -------------
 tests/tcg/i386/meson.build           |  1 +
 tests/tcg/x86_64/meson.build         |  1 +
 ui/cocoa.m                           |  2 +-
 27 files changed, 206 insertions(+), 116 deletions(-)
 create mode 100644 include/qemu/version.h
 create mode 100644 tests/tcg/i386/test-idiv-overflow.c
 create mode 100644 scripts/qemu-version.h.in
 delete mode 100755 scripts/qemu-version.sh
-- 
2.56.0


Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Peter Maydell 2 weeks, 3 days ago
On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
>
>   Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
>
>   meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
>
> ----------------------------------------------------------------
> * target/i386/tcg: bugfixes and cleanups
> * AGENTS.md: add final instructions
> * meson: rewrite scripts/qemu-version.sh directly in meson.build
>
> ----------------------------------------------------------------

The qemu-version.h changes here seem to have broken incremental builds:

In file included from ../../monitor/qmp-cmds-control.c:28:
/home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
qemu-version.h: No such file or directory
   11 | #include "qemu-version.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

This happens even though the incremental rebuild decided it had
to re-run configure.

Blowing away the build tree and doing a complete rebuild avoids the
error, but it would be nice for incremental builds to work.

thanks
-- PMM
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Pierrick Bouvier 2 weeks, 3 days ago
On 11/5/2026 2:27 AM, Peter Maydell wrote:
> On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
>>
>>   Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>>
>> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
>>
>>   meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
>>
>> ----------------------------------------------------------------
>> * target/i386/tcg: bugfixes and cleanups
>> * AGENTS.md: add final instructions
>> * meson: rewrite scripts/qemu-version.sh directly in meson.build
>>
>> ----------------------------------------------------------------
> 
> The qemu-version.h changes here seem to have broken incremental builds:
> 
> In file included from ../../monitor/qmp-cmds-control.c:28:
> /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
> qemu-version.h: No such file or directory
>    11 | #include "qemu-version.h"
>       |          ^~~~~~~~~~~~~~~~
> compilation terminated.
> 
> This happens even though the incremental rebuild decided it had
> to re-run configure.
> 
> Blowing away the build tree and doing a complete rebuild avoids the
> error, but it would be nice for incremental builds to work.
>

It works fine on my side, with both ninja and make. qemu-version.h is
correctly regenerated as the first target being executed.

Can you reproduce this with a clean build folder?

> thanks
> -- PMM
>
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Yonggang Luo 2 weeks, 3 days ago
On Fri, Nov 6, 2026 at 3:53 AM Pierrick Bouvier
<pierrick.bouvier@oss.qualcomm.com> wrote:
>
> On 11/5/2026 2:27 AM, Peter Maydell wrote:
> > On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >>
> >> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
> >>
> >>   Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
> >>
> >> are available in the Git repository at:
> >>
> >>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
> >>
> >> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
> >>
> >>   meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
> >>
> >> ----------------------------------------------------------------
> >> * target/i386/tcg: bugfixes and cleanups
> >> * AGENTS.md: add final instructions
> >> * meson: rewrite scripts/qemu-version.sh directly in meson.build
> >>
> >> ----------------------------------------------------------------
> >
> > The qemu-version.h changes here seem to have broken incremental builds:
> >
> > In file included from ../../monitor/qmp-cmds-control.c:28:
> > /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
> > qemu-version.h: No such file or directory
> >    11 | #include "qemu-version.h"
> >       |          ^~~~~~~~~~~~~~~~
> > compilation terminated.
> >
> > This happens even though the incremental rebuild decided it had
> > to re-run configure.
> >
> > Blowing away the build tree and doing a complete rebuild avoids the
> > error, but it would be nice for incremental builds to work.
> >
>
> It works fine on my side, with both ninja and make. qemu-version.h is
> correctly regenerated as the first target being executed.
>
> Can you reproduce this with a clean build folder?

Hi, it's for incremental builds, that is a build (exists) before these patches,
then reset hard to the version after this PR, then ninja will fail.
Clean build folder won't trigger issue. but for fast bisect, issues will happen.


>
> > thanks
> > -- PMM
> >
>
>


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Pierrick Bouvier 2 weeks, 3 days ago
On 11/5/2026 11:57 AM, Yonggang Luo wrote:
> On Fri, Nov 6, 2026 at 3:53 AM Pierrick Bouvier
> <pierrick.bouvier@oss.qualcomm.com> wrote:
>>
>> On 11/5/2026 2:27 AM, Peter Maydell wrote:
>>> On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>
>>>> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
>>>>
>>>>   Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>>>>
>>>> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
>>>>
>>>>   meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> * target/i386/tcg: bugfixes and cleanups
>>>> * AGENTS.md: add final instructions
>>>> * meson: rewrite scripts/qemu-version.sh directly in meson.build
>>>>
>>>> ----------------------------------------------------------------
>>>
>>> The qemu-version.h changes here seem to have broken incremental builds:
>>>
>>> In file included from ../../monitor/qmp-cmds-control.c:28:
>>> /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
>>> qemu-version.h: No such file or directory
>>>    11 | #include "qemu-version.h"
>>>       |          ^~~~~~~~~~~~~~~~
>>> compilation terminated.
>>>
>>> This happens even though the incremental rebuild decided it had
>>> to re-run configure.
>>>
>>> Blowing away the build tree and doing a complete rebuild avoids the
>>> error, but it would be nice for incremental builds to work.
>>>
>>
>> It works fine on my side, with both ninja and make. qemu-version.h is
>> correctly regenerated as the first target being executed.
>>
>> Can you reproduce this with a clean build folder?
> 
> Hi, it's for incremental builds, that is a build (exists) before these patches,
> then reset hard to the version after this PR, then ninja will fail.
> Clean build folder won't trigger issue. but for fast bisect, issues will happen.
>

I see, unfortunately there are multiple occurrences of such subtle
breaking when moving between commits in our history already. Especially
for current issue, it's now pushed and there, so we can't do anything to
avoid bisect hitting this eventually.

One nice and bulletproof solution is to rely on ccache, and allow
ourselves to delete a build folder (a full ccache rebuild is less than
20 sec on my machine).

> 
>>
>>> thanks
>>> -- PMM
>>>
>>
>>
> 
> 


Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Yonggang Luo 2 weeks, 3 days ago
On Fri, Nov 6, 2026 at 4:12 AM Pierrick Bouvier
<pierrick.bouvier@oss.qualcomm.com> wrote:
>
> On 11/5/2026 11:57 AM, Yonggang Luo wrote:
> > On Fri, Nov 6, 2026 at 3:53 AM Pierrick Bouvier
> > <pierrick.bouvier@oss.qualcomm.com> wrote:
> >>
> >> On 11/5/2026 2:27 AM, Peter Maydell wrote:
> >>> On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >>>>
> >>>> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
> >>>>
> >>>>   Merge tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
> >>>>
> >>>> are available in the Git repository at:
> >>>>
> >>>>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
> >>>>
> >>>> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
> >>>>
> >>>>   meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
> >>>>
> >>>> ----------------------------------------------------------------
> >>>> * target/i386/tcg: bugfixes and cleanups
> >>>> * AGENTS.md: add final instructions
> >>>> * meson: rewrite scripts/qemu-version.sh directly in meson.build
> >>>>
> >>>> ----------------------------------------------------------------
> >>>
> >>> The qemu-version.h changes here seem to have broken incremental builds:
> >>>
> >>> In file included from ../../monitor/qmp-cmds-control.c:28:
> >>> /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
> >>> qemu-version.h: No such file or directory
> >>>    11 | #include "qemu-version.h"
> >>>       |          ^~~~~~~~~~~~~~~~
> >>> compilation terminated.
> >>>
> >>> This happens even though the incremental rebuild decided it had
> >>> to re-run configure.
> >>>
> >>> Blowing away the build tree and doing a complete rebuild avoids the
> >>> error, but it would be nice for incremental builds to work.
> >>>
> >>
> >> It works fine on my side, with both ninja and make. qemu-version.h is
> >> correctly regenerated as the first target being executed.
> >>
> >> Can you reproduce this with a clean build folder?
> >
> > Hi, it's for incremental builds, that is a build (exists) before these patches,
> > then reset hard to the version after this PR, then ninja will fail.
> > Clean build folder won't trigger issue. but for fast bisect, issues will happen.
> >
>
> I see, unfortunately there are multiple occurrences of such subtle
> breaking when moving between commits in our history already. Especially
> for current issue, it's now pushed and there, so we can't do anything to
> avoid bisect hitting this eventually.
>
> One nice and bulletproof solution is to rely on ccache, and allow
> ourselves to delete a build folder (a full ccache rebuild is less than
> 20 sec on my machine).

Yeah, I also leverage ccache, so maybe this is not an issue at all.
for git bisect,
git always present. that won't affect, I think.

>
> >
> >>
> >>> thanks
> >>> -- PMM
> >>>
> >>
> >>
> >
> >
>


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Peter Maydell 2 weeks, 3 days ago
On Thu, 5 Nov 2026 at 10:27, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > ----------------------------------------------------------------
> > * target/i386/tcg: bugfixes and cleanups
> > * AGENTS.md: add final instructions
> > * meson: rewrite scripts/qemu-version.sh directly in meson.build
> >
> > ----------------------------------------------------------------
>
> The qemu-version.h changes here seem to have broken incremental builds:
>
> In file included from ../../monitor/qmp-cmds-control.c:28:
> /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
> qemu-version.h: No such file or directory
>    11 | #include "qemu-version.h"
>       |          ^~~~~~~~~~~~~~~~
> compilation terminated.
>
> This happens even though the incremental rebuild decided it had
> to re-run configure.
>
> Blowing away the build tree and doing a complete rebuild avoids the
> error, but it would be nice for incremental builds to work.

Also, if you delete qemu-version.h from the build tree, then
re-run make, nothing notices that it needs to recreate the file
and the build fails. Perhaps there is a dependency missing ?

thanks
-- PMM
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Yonggang Luo 2 weeks, 3 days ago
On Fri, Nov 6, 2026 at 12:32 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 5 Nov 2026 at 10:27, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Tue, 3 Nov 2026 at 13:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > > ----------------------------------------------------------------
> > > * target/i386/tcg: bugfixes and cleanups
> > > * AGENTS.md: add final instructions
> > > * meson: rewrite scripts/qemu-version.sh directly in meson.build
> > >
> > > ----------------------------------------------------------------
> >
> > The qemu-version.h changes here seem to have broken incremental builds:
> >
> > In file included from ../../monitor/qmp-cmds-control.c:28:
> > /home/pm215/qemu/include/qemu/version.h:11:10: fatal error:
> > qemu-version.h: No such file or directory
> >    11 | #include "qemu-version.h"
> >       |          ^~~~~~~~~~~~~~~~
> > compilation terminated.
> >
> > This happens even though the incremental rebuild decided it had
> > to re-run configure.
> >
> > Blowing away the build tree and doing a complete rebuild avoids the
> > error, but it would be nice for incremental builds to work.
>
> Also, if you delete qemu-version.h from the build tree, then
> re-run make, nothing notices that it needs to recreate the file
> and the build fails. Perhaps there is a dependency missing ?

Because I faced this issue, I have to fixes it at:

https://lore.kernel.org/qemu-devel/20261105181449.1691-1-luoyonggang@gmail.com/

>
> thanks
> -- PMM
>


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PULL v2 00/10] i386, AGENTS.md, meson changes for QEMU 11.2 soft freeze
Posted by Richard Henderson 2 weeks, 5 days ago
On 11/3/26 05:34, Paolo Bonzini wrote:
> The following changes since commit 74f7bf4c59e6b6d50dbc6e124d93440be8be4386:
> 
>    Merge tag 'pull-target-arm-20261102-1' ofhttps://gitlab.com/pm215/qemu into staging (2026-11-02 20:19:27 -0800)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/bonzini/qemu.git tags/for-upstream
> 
> for you to fetch changes up to ab78ac76f44a1241e76fd32d248df62d83f1ea58:
> 
>    meson: rewrite scripts/qemu-version.sh directly in meson.build (2026-11-03 14:31:24 +0100)
> 
> ----------------------------------------------------------------
> * target/i386/tcg: bugfixes and cleanups
> * AGENTS.md: add final instructions
> * meson: rewrite scripts/qemu-version.sh directly in meson.build

Applied, thanks.

r~