]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Mar 2022 22:27:34 +0000 (22:27 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Mar 2022 22:27:34 +0000 (22:27 +0000)
virtio,pc,pci: features, cleanups, fixes

vhost-user enabled on non-linux systems
beginning of nvme sriov support
bigger tx queue for vdpa
virtio iommu bypass
FADT flag to detect legacy keyboards

Fixes, cleanups all over the place

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Mon 07 Mar 2022 22:43:31 GMT
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream: (47 commits)
  hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present
  tests/acpi: i386: update FACP table differences
  hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table
  tests/acpi: i386: allow FACP acpi table changes
  docs: vhost-user: add subsection for non-Linux platforms
  configure, meson: allow enabling vhost-user on all POSIX systems
  vhost: use wfd on functions setting vring call fd
  event_notifier: add event_notifier_get_wfd()
  pci: drop COMPAT_PROP_PCP for 2.0 machine types
  hw/smbios: Add table 4 parameter, "processor-id"
  x86: cleanup unused compat_apic_id_mode
  vhost-vsock: detach the virqueue element in case of error
  pc: add option to disable PS/2 mouse/keyboard
  acpi: pcihp: pcie: set power on cap on parent slot
  pci: expose TYPE_XIO3130_DOWNSTREAM name
  pci: show id info when pci BDF conflict
  hw/misc/pvpanic: Use standard headers instead
  headers: Add pvpanic.h
  pci-bridge/xio3130_downstream: Fix error handling
  pci-bridge/xio3130_upstream: Fix error handling
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
# Conflicts:
# docs/specs/index.rst

1  2 
MAINTAINERS
configure
docs/specs/index.rst
include/qemu/typedefs.h
meson.build
qom/object.c

diff --combined MAINTAINERS
index 56460c886da57503f3a265ec2316f5e7489a02ca,83a9f79c1c2b7b93becc0bfff34fc1f1b3c101a1..38d1ac8803f554954c59060684b12d5bd1f5f266
@@@ -1819,7 -1819,6 +1819,6 @@@ F: docs/specs/acpi_hw_reduced_hotplug.r
  
  ACPI/VIOT
  M: Jean-Philippe Brucker <jean-philippe@linaro.org>
- R: Ani Sinha <ani@anisinha.ca>
  S: Supported
  F: hw/acpi/viot.c
  F: hw/acpi/viot.h
@@@ -2515,12 -2514,9 +2514,12 @@@ F: block/stream.
  F: block/mirror.c
  F: qapi/job.json
  F: block/block-copy.c
 -F: include/block/block-copy.c
 +F: include/block/block-copy.h
 +F: block/reqlist.c
 +F: include/block/reqlist.h
  F: block/copy-before-write.h
  F: block/copy-before-write.c
 +F: block/snapshot-access.c
  F: include/block/aio_task.h
  F: block/aio_task.c
  F: util/qemu-co-shared-resource.c
@@@ -3611,8 -3607,7 +3610,8 @@@ FreeBSD Hosted Continuous Integratio
  M: Ed Maste <emaste@freebsd.org>
  M: Li-Wen Hsu <lwhsu@freebsd.org>
  S: Maintained
 -F: .cirrus.yml
 +F: .gitlab-ci.d/cirrus/freebsd*
 +F: tests/vm/freebsd
  W: https://cirrus-ci.com/github/qemu/qemu
  
  Windows Hosted Continuous Integration
diff --combined configure
index 81618708e46a7e399236e3c7819a1781a2962ee5,daccf4be7c90c46344de6b1f8a4f7a01cf7137ad..886000346a9fee8ecf28c321b1914f6a46a64ef7
+++ b/configure
@@@ -630,10 -630,10 +630,10 @@@ case "$cpu" i
    ppc)
      CPU_CFLAGS="-m32" ;;
    ppc64)
 -    CPU_CFLAGS="-m64 -mbig" ;;
 +    CPU_CFLAGS="-m64 -mbig-endian" ;;
    ppc64le)
      cpu="ppc64"
 -    CPU_CFLAGS="-m64 -mlittle" ;;
 +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
  
    s390)
      CPU_CFLAGS="-m31" ;;
  # vhost interdependencies and host support
  
  # vhost backends
- if test "$vhost_user" = "yes" && test "$linux" != "yes"; then
-   error_exit "vhost-user is only available on Linux"
+ if test "$vhost_user" = "yes" && test "$mingw32" = "yes"; then
+   error_exit "vhost-user is not available on Windows"
  fi
  test "$vhost_vdpa" = "" && vhost_vdpa=$linux
  if test "$vhost_vdpa" = "yes" && test "$linux" != "yes"; then
diff --combined docs/specs/index.rst
index 2a35700fb32214dfc2ab7b5431beaa721648fc8a,32863b4aa558b803470f953432540a4584a8b817..e10684bf5353e59387b77d96dac37ec4aa742f57
@@@ -18,4 -18,4 +18,5 @@@ guest hardware that is specific to QEMU
     acpi_mem_hotplug
     acpi_pci_hotplug
     acpi_nvdimm
+    acpi_erst
 +   sev-guest-firmware
diff --combined include/qemu/typedefs.h
index c564f54c112fe9be7c8fc8308f1f5a7714e56332,5b302cb214545d9a38397d9c47b4acd951144ff5..42f4ceb701b100c20349998b34a8efbf8655ba0f
@@@ -26,7 -26,6 +26,7 @@@ typedef struct AddressSpace AddressSpac
  typedef struct AioContext AioContext;
  typedef struct Aml Aml;
  typedef struct AnnounceTimer AnnounceTimer;
 +typedef struct ArchCPU ArchCPU;
  typedef struct BdrvDirtyBitmap BdrvDirtyBitmap;
  typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter;
  typedef struct BlockBackend BlockBackend;
@@@ -40,7 -39,6 +40,7 @@@ typedef struct CompatProperty CompatPro
  typedef struct CoMutex CoMutex;
  typedef struct ConfidentialGuestSupport ConfidentialGuestSupport;
  typedef struct CPUAddressSpace CPUAddressSpace;
 +typedef struct CPUArchState CPUArchState;
  typedef struct CPUState CPUState;
  typedef struct DeviceListener DeviceListener;
  typedef struct DeviceState DeviceState;
@@@ -88,6 -86,8 +88,8 @@@ typedef struct PCIDevice PCIDevice
  typedef struct PCIEAERErr PCIEAERErr;
  typedef struct PCIEAERLog PCIEAERLog;
  typedef struct PCIEAERMsg PCIEAERMsg;
+ typedef struct PCIESriovPF PCIESriovPF;
+ typedef struct PCIESriovVF PCIESriovVF;
  typedef struct PCIEPort PCIEPort;
  typedef struct PCIESlot PCIESlot;
  typedef struct PCIExpressDevice PCIExpressDevice;
diff --combined meson.build
index 0763c3b6a0f7895494824111fc333b977742b0d8,28612fca36fcccd0589cc085af81a73ca8b07dc4..2d6601467f1e54d2908109f6a01d55e01b83e531
@@@ -1462,16 -1462,14 +1462,16 @@@ dbus_display = get_option('dbus_display
    .allowed()
  
  have_virtfs = get_option('virtfs') \
 -    .require(targetos == 'linux',
 -             error_message: 'virtio-9p (virtfs) requires Linux') \
 -    .require(libattr.found() and libcap_ng.found(),
 -             error_message: 'virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel') \
 +    .require(targetos == 'linux' or targetos == 'darwin',
 +             error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
 +    .require(targetos == 'linux' or cc.has_function('pthread_fchdir_np'),
 +             error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
 +    .require(targetos == 'darwin' or (libattr.found() and libcap_ng.found()),
 +             error_message: 'virtio-9p (virtfs) on Linux requires libcap-ng-devel and libattr-devel') \
      .disable_auto_if(not have_tools and not have_system) \
      .allowed()
  
 -have_virtfs_proxy_helper = have_virtfs and have_tools
 +have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools
  
  foreach k : get_option('trace_backends')
    config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true)
@@@ -1621,15 -1619,9 +1621,15 @@@ config_host_data.set('CONFIG_CLOCK_ADJT
  config_host_data.set('CONFIG_DUP3', cc.has_function('dup3'))
  config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate'))
  config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
 -config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memalign'))
 +# Note that we need to specify prefix: here to avoid incorrectly
 +# thinking that Windows has posix_memalign()
 +config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memalign', prefix: '#include <stdlib.h>'))
 +config_host_data.set('CONFIG_ALIGNED_MALLOC', cc.has_function('_aligned_malloc'))
 +config_host_data.set('CONFIG_VALLOC', cc.has_function('valloc'))
 +config_host_data.set('CONFIG_MEMALIGN', cc.has_function('memalign'))
  config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll'))
  config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#include <sys/uio.h>'))
 +config_host_data.set('CONFIG_PTHREAD_FCHDIR_NP', cc.has_function('pthread_fchdir_np'))
  config_host_data.set('CONFIG_SEM_TIMEDWAIT', cc.has_function('sem_timedwait', dependencies: threads))
  config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile'))
  config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_function('unshare'))
@@@ -2440,8 -2432,8 +2440,8 @@@ if get_option('cfi') and slirp_opt == '
  endif
  
  fdt = not_found
 -fdt_opt = get_option('fdt')
  if have_system
 +  fdt_opt = get_option('fdt')
    if fdt_opt in ['enabled', 'auto', 'system']
      have_internal = fs.exists(meson.current_source_dir() / 'dtc/libfdt/Makefile.libfdt')
      fdt = cc.find_library('fdt', kwargs: static_kwargs,
      fdt = declare_dependency(link_with: libfdt,
                               include_directories: fdt_inc)
    endif
 +else
 +  fdt_opt = 'disabled'
  endif
  if not fdt.found() and fdt_required.length() > 0
    error('fdt not available but required by targets ' + ', '.join(fdt_required))
@@@ -2715,7 -2705,6 +2715,7 @@@ if have_system or have_use
      'target/i386',
      'target/i386/kvm',
      'target/mips/tcg',
 +    'target/nios2',
      'target/ppc',
      'target/riscv',
      'target/s390x',
  endif
  
  vhost_user = not_found
- if 'CONFIG_VHOST_USER' in config_host
+ if targetos == 'linux' and 'CONFIG_VHOST_USER' in config_host
    libvhost_user = subproject('libvhost-user')
    vhost_user = libvhost_user.get_variable('vhost_user_dep')
  endif
diff --combined qom/object.c
index 4048a2fef1eb48d24f775ef88e7ce8cb32d71703,a27532a6ba41f36b2315db078d6709c20db19f39..d34608558e9e5e53f4b363774f06b810f49ca36c
@@@ -16,7 -16,6 +16,7 @@@
  #include "qom/object.h"
  #include "qom/object_interfaces.h"
  #include "qemu/cutils.h"
 +#include "qemu/memalign.h"
  #include "qapi/visitor.h"
  #include "qapi/string-input-visitor.h"
  #include "qapi/string-output-visitor.h"
@@@ -1168,10 -1167,14 +1168,14 @@@ GSList *object_class_get_list_sorted(co
  Object *object_ref(void *objptr)
  {
      Object *obj = OBJECT(objptr);
+     uint32_t ref;
      if (!obj) {
          return NULL;
      }
-     qatomic_inc(&obj->ref);
+     ref = qatomic_fetch_inc(&obj->ref);
+     /* Assert waaay before the integer overflows */
+     g_assert(ref < INT_MAX);
      return obj;
  }