Commit 1d31f187 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging



pci, pc, virtio: fixes, cleanups, tests

Lots of work on tests: BiosTablesTest UEFI app,
vhost-user testing for non-Linux hosts.
Misc cleanups and fixes all over the place

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Fri 22 Feb 2019 15:51:40 GMT
# gpg:                using RSA key 281F0DB8D28D5469
# 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: (26 commits)
  pci: Sanity test minimum downstream LNKSTA
  hw/smbios: fix offset of type 3 sku field
  pci: Move NVIDIA vendor id to the rest of ids
  virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size
  virtio-balloon: Use ram_block_discard_range() instead of raw madvise()
  virtio-balloon: Rework ballon_page() interface
  virtio-balloon: Corrections to address verification
  virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate
  i386/kvm: ignore masked irqs when update msi routes
  contrib/vhost-user-blk: fix the compilation issue
  Revert "contrib/vhost-user-blk: fix the compilation issue"
  pc-dimm: use same mechanism for [get|set]_addr
  tests/data: introduce "uefi-boot-images" with the "bios-tables-test" ISOs
  tests/uefi-test-tools: add build scripts
  tests: introduce "uefi-test-tools" with the BiosTablesTest UEFI app
  roms: build the EfiRom utility from the roms/edk2 submodule
  roms: add the edk2 project as a git submodule
  vhost-user-test: create a temporary directory per TestServer
  vhost-user-test: small changes to init_hugepagefs
  vhost-user-test: create a main loop per TestServer
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 20b084c4 88c86919
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -49,3 +49,6 @@
[submodule "tests/fp/berkeley-softfloat-3"]
	path = tests/fp/berkeley-softfloat-3
	url = https://github.com/cota/berkeley-softfloat-3
[submodule "roms/edk2"]
	path = roms/edk2
	url = https://github.com/tianocore/edk2.git
+5 −1
Original line number Diff line number Diff line
@@ -609,7 +609,11 @@ clean:
	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
	rm -f qemu-options.def
	rm -f *.msi
	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \
		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
		! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \
		-exec rm {} +
	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
	rm -f fsdev/*.pod scsi/*.pod
	rm -f qemu-img-cmds.h
+2 −3
Original line number Diff line number Diff line
@@ -9,10 +9,9 @@ common-obj-$(CONFIG_POSIX) += hostmem-file.o
common-obj-y += cryptodev.o
common-obj-y += cryptodev-builtin.o

ifeq ($(CONFIG_VIRTIO),y)
ifeq ($(CONFIG_VIRTIO_CRYPTO),y)
common-obj-y += cryptodev-vhost.o
common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX)) += \
    cryptodev-vhost-user.o
common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o
endif

common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
+64 −38
Original line number Diff line number Diff line
@@ -368,10 +368,10 @@ libattr=""
xfs=""
tcg="yes"
membarrier=""
vhost_net="no"
vhost_crypto="no"
vhost_scsi="no"
vhost_vsock="no"
vhost_net=""
vhost_crypto=""
vhost_scsi=""
vhost_vsock=""
vhost_user=""
kvm="no"
hax="no"
@@ -783,6 +783,7 @@ case $targetos in
MINGW32*)
  mingw32="yes"
  hax="yes"
  vhost_user="no"
  audio_possible_drivers="dsound sdl"
  if check_include dsound.h; then
    audio_drv_list="dsound"
@@ -884,10 +885,6 @@ Linux)
  linux="yes"
  linux_user="yes"
  kvm="yes"
  vhost_net="yes"
  vhost_crypto="yes"
  vhost_scsi="yes"
  vhost_vsock="yes"
  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
  supported_os="yes"
  libudev="yes"
@@ -1263,11 +1260,7 @@ for opt do
  ;;
  --disable-vhost-crypto) vhost_crypto="no"
  ;;
  --enable-vhost-crypto)
      vhost_crypto="yes"
      if test "$mingw32" = "yes"; then
          error_exit "vhost-crypto isn't available on win32"
      fi
  --enable-vhost-crypto) vhost_crypto="yes"
  ;;
  --disable-vhost-scsi) vhost_scsi="no"
  ;;
@@ -1476,11 +1469,11 @@ for opt do
  ;;
  --disable-vhost-user) vhost_user="no"
  ;;
  --enable-vhost-user)
      vhost_user="yes"
      if test "$mingw32" = "yes"; then
          error_exit "vhost-user isn't available on win32"
      fi
  --enable-vhost-user) vhost_user="yes"
  ;;
  --disable-vhost-kernel) vhost_kernel="no"
  ;;
  --enable-vhost-kernel) vhost_kernel="yes"
  ;;
  --disable-capstone) capstone="no"
  ;;
@@ -1512,14 +1505,6 @@ for opt do
  esac
done

if test "$vhost_user" = ""; then
    if test "$mingw32" = "yes"; then
        vhost_user="no"
    else
        vhost_user="yes"
    fi
fi

case "$cpu" in
    ppc)
           CPU_CFLAGS="-m32"
@@ -1743,8 +1728,12 @@ disabled with --disable-FEATURE, default is enabled if available:
  linux-aio       Linux AIO support
  cap-ng          libcap-ng support
  attr            attr and xattr support
  vhost-net       vhost-net acceleration support
  vhost-crypto    vhost-crypto acceleration support
  vhost-net       vhost-net kernel acceleration support
  vhost-vsock     virtio sockets device support
  vhost-scsi      vhost-scsi kernel target support
  vhost-crypto    vhost-user-crypto backend support
  vhost-kernel    vhost kernel backend support
  vhost-user      vhost-user backend support
  spice           spice
  rbd             rados block device (rbd)
  libiscsi        iscsi support
@@ -1770,7 +1759,6 @@ disabled with --disable-FEATURE, default is enabled if available:
  jemalloc        jemalloc support
  avx2            AVX2 optimization support
  replication     replication support
  vhost-vsock     virtio sockets device support
  opengl          opengl support
  virglrenderer   virgl rendering support
  xfsctl          xfsctl support
@@ -1787,7 +1775,6 @@ disabled with --disable-FEATURE, default is enabled if available:
  parallels       parallels image format support
  sheepdog        sheepdog block driver support
  crypto-afalg    Linux AF_ALG crypto backend driver
  vhost-user      vhost-user support
  capstone        capstone disassembler support
  debug-mutex     mutex debugging support
  libpmem         libpmem support
@@ -2177,6 +2164,45 @@ else
  l2tpv3=no
fi

#########################################
# vhost interdependencies and host support

# vhost backends
test "$vhost_user" = "" && vhost_user=yes
if test "$vhost_user" = "yes" && test "$mingw32" = "yes"; then
  error_exit "vhost-user isn't available on win32"
fi
test "$vhost_kernel" = "" && vhost_kernel=$linux
if test "$vhost_kernel" = "yes" && test "$linux" != "yes"; then
  error_exit "vhost-kernel is only available on Linux"
fi

# vhost-kernel devices
test "$vhost_scsi" = "" && vhost_scsi=$vhost_kernel
if test "$vhost_scsi" = "yes" && test "$vhost_kernel" != "yes"; then
  error_exit "--enable-vhost-scsi requires --enable-vhost-kernel"
fi
test "$vhost_vsock" = "" && vhost_vsock=$vhost_kernel
if test "$vhost_vsock" = "yes" && test "$vhost_kernel" != "yes"; then
  error_exit "--enable-vhost-vsock requires --enable-vhost-kernel"
fi

# vhost-user backends
test "$vhost_net_user" = "" && vhost_net_user=$vhost_user
if test "$vhost_net_user" = "yes" && test "$vhost_user" = "no"; then
  error_exit "--enable-vhost-net-user requires --enable-vhost-user"
fi
test "$vhost_crypto" = "" && vhost_crypto=$vhost_user
if test "$vhost_crypto" = "yes" && test "$vhost_user" = "no"; then
  error_exit "--enable-vhost-crypto requires --enable-vhost-user"
fi

# OR the vhost-kernel and vhost-user values for simplicity
if test "$vhost_net" = ""; then
  test "$vhost_net_user" = "yes" && vhost_net=yes
  test "$vhost_kernel" = "yes" && vhost_net=yes
fi

##########################################
# MinGW / Mingw-w64 localtime_r/gmtime_r check

@@ -6622,8 +6648,11 @@ fi
if test "$vhost_scsi" = "yes" ; then
  echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
if test "$vhost_net" = "yes" && test "$vhost_user" = "yes"; then
  echo "CONFIG_VHOST_NET_USED=y" >> $config_host_mak
if test "$vhost_net" = "yes" ; then
  echo "CONFIG_VHOST_NET=y" >> $config_host_mak
fi
if test "$vhost_net_user" = "yes" ; then
  echo "CONFIG_VHOST_NET_USER=y" >> $config_host_mak
fi
if test "$vhost_crypto" = "yes" ; then
  echo "CONFIG_VHOST_CRYPTO=y" >> $config_host_mak
@@ -6631,6 +6660,9 @@ fi
if test "$vhost_vsock" = "yes" ; then
  echo "CONFIG_VHOST_VSOCK=y" >> $config_host_mak
fi
if test "$vhost_kernel" = "yes" ; then
  echo "CONFIG_VHOST_KERNEL=y" >> $config_host_mak
fi
if test "$vhost_user" = "yes" ; then
  echo "CONFIG_VHOST_USER=y" >> $config_host_mak
fi
@@ -7401,12 +7433,6 @@ if supported_xen_target $target; then
fi
if supported_kvm_target $target; then
    echo "CONFIG_KVM=y" >> $config_target_mak
    if test "$vhost_net" = "yes" ; then
        echo "CONFIG_VHOST_NET=y" >> $config_target_mak
        if test "$vhost_user" = "yes" ; then
            echo "CONFIG_VHOST_USER_NET_TEST_$target_name=y" >> $config_host_mak
        fi
    fi
fi
if supported_hax_target $target; then
    echo "CONFIG_HAX=y" >> $config_target_mak
+2 −2
Original line number Diff line number Diff line
CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
CONFIG_VHOST_USER_SCSI=$(CONFIG_VHOST_USER)
CONFIG_VHOST_USER_BLK=$(CONFIG_VHOST_USER)
CONFIG_VIRTIO=y
CONFIG_VIRTIO_9P=$(CONFIG_VIRTFS)
CONFIG_VIRTIO_BALLOON=y
Loading