]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 25 May 2023 15:36:10 +0000 (08:36 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 25 May 2023 15:36:10 +0000 (08:36 -0700)
* hot-unplug fixes for ioport
* purge qatomic_mb_read/set from monitor
* build system fixes
* OHCI fix from gitlab
* provide EPYC-Rome CPU model not susceptible to XSAVES erratum

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmRvGpEUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOa/Af/WS5/tmIlEYgH7UOPERQXNqf7+Jwj
# bA2wgqv3ZoQwcgp5f4EVjfA8ABfpGxLZy6xIdUSbWANb8lDJNuh/nPd/em3rWUAU
# LnJGGdo1vF31gfsVQnlzb7hJi3ur+e2f8JqkRVskDCk3a7YY44OCN42JdKWLrN9u
# CFf2zYqxMqXHjrYrY0Kx2oTkfGDZrfwUlx0vM4dHb8IEoxaplfDd8lJXQzjO4htr
# 3nPBPjQ+h08EeC7mObH4XoJE0omzovR10GkBo8K4q952xGOQ041Y/2YY7JwLfx0D
# na7IanVo+ZAmvTJZoJFSBwNnXkTMHvDH5+Hc45NSTsDBtz0YJhRxPw/z/A==
# =A5Lp
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 25 May 2023 01:21:37 AM PDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  monitor: do not use mb_read/mb_set
  monitor: extract request dequeuing to a new function
  monitor: introduce qmp_dispatcher_co_wake
  monitor: cleanup fetching of QMP requests
  monitor: cleanup detection of qmp_dispatcher_co shutting down
  monitor: do not use mb_read/mb_set for suspend_cnt
  monitor: add more *_locked() functions
  monitor: allow calling monitor_resume under mon_lock
  monitor: use QEMU_LOCK_GUARD a bit more
  softmmu/ioport.c: make MemoryRegionPortioList owner of portio_list MemoryRegions
  softmmu/ioport.c: QOMify MemoryRegionPortioList
  softmmu/ioport.c: allocate MemoryRegionPortioList ports on the heap
  usb/ohci: Set pad to 0 after frame update
  meson: move -no-pie from linker to compiler
  meson: fix rule for qemu-ga installer
  meson.build: Fix glib -Wno-unused-function workaround
  target/i386: EPYC-Rome model without XSAVES

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
1  2 
meson.build

diff --combined meson.build
index ef181ff2df4d67ef2784d0af233b49cfe4f9bb9b,2e47608353d13b09a388e6768d6c15ef8826c280..78890f01550a3d449f70929aaf6703b930e9d215
@@@ -265,12 -265,21 +265,21 @@@ endi
  
  # Meson currently only handles pie as a boolean for now, so if the user
  # has explicitly disabled PIE we need to extend our cflags.
+ #
+ # -no-pie is supposedly a linker flag that has no effect on the compiler
+ # command line, but some distros, that didn't quite know what they were
+ # doing, made local changes to gcc's specs file that turned it into
+ # a compiler command-line flag.
+ #
+ # What about linker flags?  For a static build, no PIE is implied by -static
+ # which we added above (and if it's not because of the same specs patching,
+ # there's nothing we can do: compilation will fail, report a bug to your
+ # distro and do not use --disable-pie in the meanwhile).  For dynamic linking,
+ # instead, we can't add -no-pie because it overrides -shared: the linker then
+ # tries to build an executable instead of a shared library and fails.  So
+ # don't add -no-pie anywhere and cross fingers. :(
  if not get_option('b_pie')
-   qemu_common_flags += cc.get_supported_arguments('-fno-pie')
-   if not get_option('prefer_static')
-     # No PIE is implied by -static which we added above.
-     qemu_ldflags += cc.get_supported_link_arguments('-no-pie')
-   endif
+   qemu_common_flags += cc.get_supported_arguments('-fno-pie', '-no-pie')
  endif
  
  if not get_option('stack_protector').disabled()
@@@ -512,16 -521,6 +521,16 @@@ add_project_arguments('-iquote', '.'
                        '-iquote', meson.current_source_dir() / 'include',
                        language: all_languages)
  
 +# If a host-specific include directory exists, list that first...
 +host_include = meson.current_source_dir() / 'host/include/'
 +if fs.is_dir(host_include / host_arch)
 +  add_project_arguments('-iquote', host_include / host_arch,
 +                        language: all_languages)
 +endif
 +# ... followed by the generic fallback.
 +add_project_arguments('-iquote', host_include / 'generic',
 +                      language: all_languages)
 +
  sparse = find_program('cgcc', required: get_option('sparse'))
  if sparse.found()
    run_target('sparse',
@@@ -780,7 -779,7 +789,7 @@@ if not cc.compiles(''
      g_free(f);
    }
    G_DEFINE_AUTOPTR_CLEANUP_FUNC(Foo, foo_free)
-   int main(void) { return 0; }''', dependencies: glib_pc, args: ['-Werror'])
+   int main(void) { return 0; }''', dependencies: glib_pc, args: ['-Wunused-function', '-Werror'])
    glib_cflags += cc.get_supported_arguments('-Wno-unused-function')
  endif
  glib = declare_dependency(dependencies: [glib_pc, gmodule],
@@@ -2557,7 -2556,7 +2566,7 @@@ if has_int12
    # __alignof(unsigned __int128) for the host.
    atomic_test_128 = '''
      int main(int ac, char **av) {
 -      unsigned __int128 *p = __builtin_assume_aligned(av[ac - 1], sizeof(16));
 +      unsigned __int128 *p = __builtin_assume_aligned(av[ac - 1], 16);
        p[1] = __atomic_load_n(&p[0], __ATOMIC_RELAXED);
        __atomic_store_n(&p[2], p[3], __ATOMIC_RELAXED);
        __atomic_compare_exchange_n(&p[4], &p[5], p[6], 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);