qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 93eae3: target-i386: mmu: use pg_mode instead


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 93eae3: target-i386: mmu: use pg_mode instead of HF_LMA_MASK
Date: Mon, 08 Nov 2021 09:49:32 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 93eae3583256896dd91a4c2ca38dcbb8d4051cff
      
https://github.com/qemu/qemu/commit/93eae3583256896dd91a4c2ca38dcbb8d4051cff
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M target/i386/tcg/sysemu/excp_helper.c

  Log Message:
  -----------
  target-i386: mmu: use pg_mode instead of HF_LMA_MASK

Correctly look up the paging mode of the hypervisor when it is using 64-bit
mode but the guest is not.

Fixes: 68746930ae ("target/i386: use mmu_translate for NPT walk", 2021-05-11)
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b04dc92e013d55c9ac8082caefff45dcfb1310e7
      
https://github.com/qemu/qemu/commit/b04dc92e013d55c9ac8082caefff45dcfb1310e7
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M target/i386/tcg/sysemu/excp_helper.c

  Log Message:
  -----------
  target-i386: mmu: fix handling of noncanonical virtual addresses

mmu_translate is supposed to return an error code for page faults; it is
not able to handle other exceptions.  The #GP case for noncanonical
virtual addresses is not handled correctly, and incorrectly raised as
a page fault with error code 1.  Since it cannot happen for nested
page tables, move it directly to handle_mmu_fault, even before the
invocation of mmu_translate.

Fixes: #676
Fixes: 661ff4879e ("target/i386: extract mmu_translate", 2021-05-11)
Cc: qemu-stable@nongnu.org
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
      
https://github.com/qemu/qemu/commit/b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
  Author: Mauro Matteo Cascella <mcascell@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands

This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().

Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pages in a table")
Fixes: #546
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 565174d08ed34a849f8420f0d9c97d08be3835aa
      
https://github.com/qemu/qemu/commit/565174d08ed34a849f8420f0d9c97d08be3835aa
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: perform snappy test with the C++ compiler if used

Snappy is written in C++ and as such needs to link against libstdc++.  When
linking statically, this means that the compile test cannot succeed unless
performed with a C++ compiler.  Do so if link_language is set to C++; if it
is C, the test will usually fail and snappy will be disabled.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4933436f6a13fb585d8b2e2f625bf52301e98f11
      
https://github.com/qemu/qemu/commit/4933436f6a13fb585d8b2e2f625bf52301e98f11
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M docs/devel/build-system.rst

  Log Message:
  -----------
  docs: adjust for demise of scripts/create_config

The config-host.h, $TARGET_NAME-config-target.h,
$TARGET_NAME-config-devices.h files are now generated by
configure_file() rather than scripts/create_config.  Adjust
he relevant paragraph in docs/devel/build-system.rst, and take
the occasion to fix a preexisting confusion of *.h vs *.mak.

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ac7ebcc589757af7de0a7cba68126a80224fb989
      
https://github.com/qemu/qemu/commit/ac7ebcc589757af7de0a7cba68126a80224fb989
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: simplify calls to meson_quote

meson_quote assumes a non-empty argument list, and incorrectly returns a
one-entry array if passed nothing.  Move the check for an empty argument
list from the invocations to the function itself.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8009da037418d454d4833e7d3c3367f2f4d7244a
      
https://github.com/qemu/qemu/commit/8009da037418d454d4833e7d3c3367f2f4d7244a
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include
-L or -I options), so they should be kept from the invocation of configure
to the subsequent reinvocations via config.status.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a2866660441f114188b7d1025a4a19cbb6188fef
      
https://github.com/qemu/qemu/commit/a2866660441f114188b7d1025a4a19cbb6188fef
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links
tests, as they are supposed to be independent of the specific sets of
compilation flags used to build the programs.  However, the user can
still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option
to specify -I or -L options that apply to cc.compiles/cc.links as well.

This is also the intended use of configure's --extra-cflags,
--extra-cxxflags and --extra-ldflags options.  For example, if
one has netmap's header in a nonstandard directory, up to commit
837b84b1c078bf3e909 it used to work fine to do:

.../configure --enable-netmap \
     --extra-cflags=-I/path/to/netmap/sys

but since the test was converted to meson, this does not work anymore.

Pass these options to meson via the toolchain file instead of via
config-host.mak, since both have the same purpose.

Reported-by: Owen LaGarde
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 47b30835e4 ("configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to 
meson", 2020-10-06)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: de38c0cc796047c5df97672921901be7251ec23b
      
https://github.com/qemu/qemu/commit/de38c0cc796047c5df97672921901be7251ec23b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: ignore preexisting QEMU_*FLAGS envvars

User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS,
or --extra-cflags/extra-cxxflags/--extra-ldflags on the
command line.

QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved
for flags detected by configure, so do not add to them
and clear them at the beginning of the script.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8b4ed0dabae559ebe1fd6f8eb54e1ec6000a0a7a
      
https://github.com/qemu/qemu/commit/8b4ed0dabae559ebe1fd6f8eb54e1ec6000a0a7a
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M ui/gtk-egl.c

  Log Message:
  -----------
  ui/gtk-egl: Fix build failure when libgbm is not available

Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
to be regenerated when reinitializing egl") we get on Ubuntu
18.04.4 LTS and Debian Buster (oldstable):

  $ ../configure --enable-virglrenderer
  [...]
  ui/gtk-egl.c: In function 'gd_egl_refresh':
  ui/gtk-egl.c:159:13: error: implicit declaration of function 
'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
    159 |             egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
  ui/gtk-egl.c:159:13: error: this function declaration is not a prototype 
[-Werror,-Wstrict-prototypes]
  ui/gtk-egl.c:159:13: error: nested extern declaration of 
'egl_dmabuf_release_texture' [-Werror=nested-externs]

Fix by restricting the egl_dmabuf_release_texture() call to the
availability of the generic buffer management library (libgbm).

Fixes: 4872a023a593e6519b272a
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211108083129.1262040-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5e10ccc2706768bcba608f5d174d4079944c270a
      
https://github.com/qemu/qemu/commit/5e10ccc2706768bcba608f5d174d4079944c270a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-08 (Mon, 08 Nov 2021)

  Changed paths:
    M configure
    M docs/devel/build-system.rst
    M hw/scsi/scsi-disk.c
    M meson.build
    M target/i386/tcg/sysemu/excp_helper.c
    M ui/gtk-egl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* Fix off-by-one in MODE SELECT commands
* extend --extra-*flags behavior to meson-based tests
* allow using snappy in static builds
* i386 TCG fixes
* fix build failure when libgbm is not available

# gpg: Signature made Mon 08 Nov 2021 12:20:24 PM CET
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]

* remotes/bonzini/tags/for-upstream:
  ui/gtk-egl: Fix build failure when libgbm is not available
  configure: ignore preexisting QEMU_*FLAGS envvars
  configure: propagate --extra-cflags and --extra-ldflags to meson compile tests
  configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
  configure: simplify calls to meson_quote
  docs: adjust for demise of scripts/create_config
  meson: perform snappy test with the C++ compiler if used
  hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
  target-i386: mmu: fix handling of noncanonical virtual addresses
  target-i386: mmu: use pg_mode instead of HF_LMA_MASK

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/260f9210d2ce...5e10ccc27067



reply via email to

[Prev in Thread] Current Thread [Next in Thread]