[PULL 00/11] QEMU changes for 2021-03-02

Paolo Bonzini posted 11 patches 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220302181134.285107-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Sunil Muthuswamy <sunilmut@microsoft.com>
accel/kvm/kvm-all.c                  |  7 +++---
accel/stubs/kvm-stub.c               |  2 +-
hw/misc/ivshmem.c                    |  5 +++-
hw/vfio/pci.c                        |  5 +++-
hw/virtio/virtio-pci.c               |  4 ++-
include/sysemu/kvm.h                 | 23 +++++++++++++++--
meson.build                          |  5 +++-
qga/meson.build                      |  2 +-
qga/vss-win32/install.cpp            |  4 +++
qga/vss-win32/provider.cpp           |  4 +++
qga/vss-win32/vss-common.h           |  3 ++-
scripts/kvm/vmxcap                   |  1 +
scripts/meson-buildoptions.sh        |  2 +-
target/i386/kvm/kvm.c                |  4 ++-
target/i386/tcg/seg_helper.c         | 49 +++++++++++++++++++++++++++++++++++-
target/i386/tcg/sysemu/excp_helper.c | 40 ++---------------------------
target/i386/whpx/whpx-all.c          | 30 +++++++++++++++++++++-
17 files changed, 136 insertions(+), 54 deletions(-)
[PULL 00/11] QEMU changes for 2021-03-02
Posted by Paolo Bonzini 2 years, 2 months ago
The following changes since commit 99c53410bc9d50e556f565b0960673cccb566452:

  Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-02-28' into staging (2022-03-01 13:25:54 +0000)

are available in the Git repository at:

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

for you to fetch changes up to 9e685c6c574a9e1f1e3affbb900f7c38fb4bff6e:

  target/i386: Throw a #SS when loading a non-canonical IST (2022-03-02 10:38:40 +0100)

----------------------------------------------------------------
* whpx fixes in preparation for GDB support (Ivan)
* VSS header fixes (Marc-André)
* Add 5-level EPT support to vmxcap (Vitaly)
* Bundle changes to MSI routes (Longpeng)
* More precise emulation of #SS (Gareth)

----------------------------------------------------------------
Gareth Webb (1):
      target/i386: Throw a #SS when loading a non-canonical IST

Ivan Shcherbakov (2):
      whpx: Fixed reporting of the CPU context to GDB for 64-bit
      whpx: Fixed incorrect CR8/TPR synchronization

Longpeng (Mike) (2):
      kvm-irqchip: introduce new API to support route change
      kvm/msi: do explicit commit when adding msi routes

Marc-André Lureau (3):
      meson: fix generic location of vss headers
      qga/vss-win32: check old VSS SDK headers
      qga/vss: update informative message about MinGW

Paolo Bonzini (2):
      update meson-buildoptions.sh
      target/i386: only include bits in pg_mode if they are not ignored

Vitaly Kuznetsov (1):
      vmxcap: Add 5-level EPT bit

 accel/kvm/kvm-all.c                  |  7 +++---
 accel/stubs/kvm-stub.c               |  2 +-
 hw/misc/ivshmem.c                    |  5 +++-
 hw/vfio/pci.c                        |  5 +++-
 hw/virtio/virtio-pci.c               |  4 ++-
 include/sysemu/kvm.h                 | 23 +++++++++++++++--
 meson.build                          |  5 +++-
 qga/meson.build                      |  2 +-
 qga/vss-win32/install.cpp            |  4 +++
 qga/vss-win32/provider.cpp           |  4 +++
 qga/vss-win32/vss-common.h           |  3 ++-
 scripts/kvm/vmxcap                   |  1 +
 scripts/meson-buildoptions.sh        |  2 +-
 target/i386/kvm/kvm.c                |  4 ++-
 target/i386/tcg/seg_helper.c         | 49 +++++++++++++++++++++++++++++++++++-
 target/i386/tcg/sysemu/excp_helper.c | 40 ++---------------------------
 target/i386/whpx/whpx-all.c          | 30 +++++++++++++++++++++-
 17 files changed, 136 insertions(+), 54 deletions(-)
-- 
2.34.1


Re: [PULL 00/11] QEMU changes for 2021-03-02
Posted by Peter Maydell 2 years, 2 months ago
On Wed, 2 Mar 2022 at 18:26, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 99c53410bc9d50e556f565b0960673cccb566452:
>
>   Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-02-28' into staging (2022-03-01 13:25:54 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 9e685c6c574a9e1f1e3affbb900f7c38fb4bff6e:
>
>   target/i386: Throw a #SS when loading a non-canonical IST (2022-03-02 10:38:40 +0100)
>
> ----------------------------------------------------------------
> * whpx fixes in preparation for GDB support (Ivan)
> * VSS header fixes (Marc-André)
> * Add 5-level EPT support to vmxcap (Vitaly)
> * Bundle changes to MSI routes (Longpeng)
> * More precise emulation of #SS (Gareth)
>
> ----------------------------------------------------------------

build-oss-fuzz detects a new memory leak:
https://gitlab.com/qemu-project/qemu/-/jobs/2155668404

==7088==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 7200 byte(s) in 9 object(s) allocated from:
#0 0x5645ae447747 in __interceptor_calloc
(/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x25c747)
#1 0x7f79c6b36510 in g_malloc0 (/lib64/libglib-2.0.so.0+0x5a510)
#2 0x5645ae48044a in walk_path
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:225:23
#3 0x5645ae4cf97e in qos_traverse_graph
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:417:17
#4 0x5645ae4cf97e in qos_graph_foreach_test_path
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:737:5
#5 0x5645ae4801c4 in main
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:334:5
#6 0x7f79c65e555f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
#7 0x7f79c65e560b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
#8 0x5645ae39fba4 in _start
(/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x1b4ba4)
Indirect leak of 1152 byte(s) in 9 object(s) allocated from:
#0 0x5645ae44792f in __interceptor_realloc
(/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x25c92f)
#1 0x7f79c6b3664f in g_realloc (/lib64/libglib-2.0.so.0+0x5a64f)
#2 0x7f79c6b5260b in g_string_sized_new (/lib64/libglib-2.0.so.0+0x7660b)
#3 0x5645ae480487 in walk_path
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:232:25
#4 0x5645ae4cf97e in qos_traverse_graph
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:417:17
#5 0x5645ae4cf97e in qos_graph_foreach_test_path
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:737:5
#6 0x5645ae4801c4 in main
/builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:334:5
#7 0x7f79c65e555f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
#8 0x7f79c65e560b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
#9 0x5645ae39fba4 in _start
(/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x1b4ba4)
SUMMARY: AddressSanitizer: 8352 byte(s) leaked in 18 allocation(s).
(test program exited with status code 1)


thanks
-- PMM
Re: [PULL 00/11] QEMU changes for 2021-03-02
Posted by Paolo Bonzini 2 years, 1 month ago
On 3/2/22 21:55, Peter Maydell wrote:
> On Wed, 2 Mar 2022 at 18:26, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> The following changes since commit 99c53410bc9d50e556f565b0960673cccb566452:
>>
>>    Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-02-28' into staging (2022-03-01 13:25:54 +0000)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/bonzini/qemu.git tags/for-upstream
>>
>> for you to fetch changes up to 9e685c6c574a9e1f1e3affbb900f7c38fb4bff6e:
>>
>>    target/i386: Throw a #SS when loading a non-canonical IST (2022-03-02 10:38:40 +0100)
>>
>> ----------------------------------------------------------------
>> * whpx fixes in preparation for GDB support (Ivan)
>> * VSS header fixes (Marc-André)
>> * Add 5-level EPT support to vmxcap (Vitaly)
>> * Bundle changes to MSI routes (Longpeng)
>> * More precise emulation of #SS (Gareth)
>>
>> ----------------------------------------------------------------
> 
> build-oss-fuzz detects a new memory leak:
> https://gitlab.com/qemu-project/qemu/-/jobs/2155668404

... which is impossible given what the pull request changes; the leak is 
in qos-test (the test executable itself, not QEMU) and the only non-QEMU 
changes in this pull request (to the build system) are for Windows 
systems only.  I've seen hangs of qos-test in the past, as well as this 
leak, and they've become more common lately.

The test seems to be flaky, I've been fighting with it all week---trying 
multiple versions of this pull request and removing patches until 
build-oss-fuzz passed.  The set of patches that triggered it or not was 
completely random, but I'll not that it did pass with this exact commit 
I'm submitting (https://gitlab.com/bonzini/qemu/-/jobs/2154365356).

I wanted to look at this today again before replying to you, but as you 
know I was sidetracked by work on the qemu.org infrastructure.  So, I 
can look at this but I really need to ask you one of two favors:

1) decide that the test is flaky and merge this pull request, and then 
I'll send before Monday the changes that I've omitted here (which again 
have nothing to do with qos-test).  I'll look at qos-test during soft 
freeze.

2) accept that I'll send another x86 pull request (not a large one) 
after soft freeze, so that I have more time to debug this (likely 
unrelated) build-oss-fuzz issue.

Paolo

> ==7088==ERROR: LeakSanitizer: detected memory leaks
> Direct leak of 7200 byte(s) in 9 object(s) allocated from:
> #0 0x5645ae447747 in __interceptor_calloc
> (/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x25c747)
> #1 0x7f79c6b36510 in g_malloc0 (/lib64/libglib-2.0.so.0+0x5a510)
> #2 0x5645ae48044a in walk_path
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:225:23
> #3 0x5645ae4cf97e in qos_traverse_graph
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:417:17
> #4 0x5645ae4cf97e in qos_graph_foreach_test_path
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:737:5
> #5 0x5645ae4801c4 in main
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:334:5
> #6 0x7f79c65e555f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
> #7 0x7f79c65e560b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
> #8 0x5645ae39fba4 in _start
> (/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x1b4ba4)
> Indirect leak of 1152 byte(s) in 9 object(s) allocated from:
> #0 0x5645ae44792f in __interceptor_realloc
> (/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x25c92f)
> #1 0x7f79c6b3664f in g_realloc (/lib64/libglib-2.0.so.0+0x5a64f)
> #2 0x7f79c6b5260b in g_string_sized_new (/lib64/libglib-2.0.so.0+0x7660b)
> #3 0x5645ae480487 in walk_path
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:232:25
> #4 0x5645ae4cf97e in qos_traverse_graph
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:417:17
> #5 0x5645ae4cf97e in qos_graph_foreach_test_path
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/libqos/qgraph.c:737:5
> #6 0x5645ae4801c4 in main
> /builds/qemu-project/qemu/build-oss-fuzz/../tests/qtest/qos-test.c:334:5
> #7 0x7f79c65e555f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f)
> #8 0x7f79c65e560b in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60b)
> #9 0x5645ae39fba4 in _start
> (/builds/qemu-project/qemu/build-oss-fuzz/tests/qtest/qos-test+0x1b4ba4)
> SUMMARY: AddressSanitizer: 8352 byte(s) leaked in 18 allocation(s).
> (test program exited with status code 1)


Re: [PULL 00/11] QEMU changes for 2021-03-02
Posted by Peter Maydell 2 years, 1 month ago
On Fri, 4 Mar 2022 at 17:41, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The test seems to be flaky, I've been fighting with it all week---trying
> multiple versions of this pull request and removing patches until
> build-oss-fuzz passed.  The set of patches that triggered it or not was
> completely random, but I'll not that it did pass with this exact commit
> I'm submitting (https://gitlab.com/bonzini/qemu/-/jobs/2154365356).
>
> I wanted to look at this today again before replying to you, but as you
> know I was sidetracked by work on the qemu.org infrastructure.  So, I
> can look at this but I really need to ask you one of two favors:
>
> 1) decide that the test is flaky and merge this pull request, and then
> I'll send before Monday the changes that I've omitted here (which again
> have nothing to do with qos-test).  I'll look at qos-test during soft
> freeze.
>
> 2) accept that I'll send another x86 pull request (not a large one)
> after soft freeze, so that I have more time to debug this (likely
> unrelated) build-oss-fuzz issue.

Either of these is fine; my requirement is only that either:
 (1) the oss-fuzz gitlab CI job needs to in practice actually
pass at least most of the time
 (2) we need to switch it to ok-to-fail or disable it

so I don't have CI failing for every merge I make.

We seem to have several intermittents right now (including one
which makes oss-fuzz hang, I think) which I'll try to find time
to investigate soon. Plus the CI infra in general is flaky:
some of the intermittents are clearly gitlab issues (like failing
to manage to git clone things).

thanks
-- PMM