1. 10 10月, 2019 12 次提交
  2. 08 10月, 2019 7 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 98b2e3c9
      Peter Maydell 提交于
      Pull request
      
      This pull request also contains the two commits from the previous pull request
      that was dropped due to a mingw compilation error.  The compilation should now
      be fixed.
      
      # gpg: Signature made Tue 08 Oct 2019 15:54:26 BST
      # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        iotests/262: Switch source/dest VM launch order
        block: Skip COR for inactive nodes
        virtio-blk: schedule virtio_notify_config to run on main context
        util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      98b2e3c9
    • M
      iotests/262: Switch source/dest VM launch order · 4d804b53
      Max Reitz 提交于
      Launching the destination VM before the source VM gives us a regression
      test for HEAD^:
      
      The guest device causes a read from the disk image through
      guess_disk_lchs().  This will not work if the first sector (containing
      the partition table) is yet unallocated, we use COR, and the node is
      inactive.
      
      By launching the source VM before the destination, however, the COR
      filter on the source will allocate that area in the image shared between
      both VMs, thus the problem will not become apparent.
      
      Switching the launch order causes the sector to still be unallocated
      when guess_disk_lchs() runs on the inactive node in the destination VM,
      and thus we get our test case.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 20191001174827.11081-3-mreitz@redhat.com
      Message-Id: <20191001174827.11081-3-mreitz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4d804b53
    • M
      block: Skip COR for inactive nodes · 8644476e
      Max Reitz 提交于
      We must not write data to inactive nodes, and a COR is certainly
      something we can simply not do without upsetting anyone.  So skip COR
      operations on inactive nodes.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 20191001174827.11081-2-mreitz@redhat.com
      Message-Id: <20191001174827.11081-2-mreitz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8644476e
    • S
      virtio-blk: schedule virtio_notify_config to run on main context · 9b92fbcf
      Sergio Lopez 提交于
      virtio_notify_config() needs to acquire the global mutex, which isn't
      allowed from an iothread, and may lead to a deadlock like this:
      
       - main thead
        * Has acquired: qemu_global_mutex.
        * Is trying the acquire: iothread AioContext lock via
          AIO_WAIT_WHILE (after aio_poll).
      
       - iothread
        * Has acquired: AioContext lock.
        * Is trying to acquire: qemu_global_mutex (via
          virtio_notify_config->prepare_mmio_access).
      
      If virtio_blk_resize() is called from an iothread, schedule
      virtio_notify_config() to be run in the main context BH.
      
      [Removed unnecessary newline as suggested by Kevin Wolf
      <kwolf@redhat.com>.
      --Stefan]
      Signed-off-by: NSergio Lopez <slp@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 20190916112411.21636-1-slp@redhat.com
      Message-Id: <20190916112411.21636-1-slp@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9b92fbcf
    • V
      util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended · d38d6de2
      Vladimir Sementsov-Ogievskiy 提交于
      Make it more obvious, that filling qiov corresponds to qiov allocation,
      which in turn corresponds to total_niov calculation, based on mid_niov
      (not mid_len). Still add an assertion to show that there should be no
      difference.
      
      [Added mingw "error: 'mid_iov' may be used uninitialized in this
      function" compiler error fix suggested by Vladimir.
      --Stefan]
      
      Reported-by: Coverity (CID 1405302)
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20190910090310.14032-1-vsementsov@virtuozzo.com
      Suggested-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20190910090310.14032-1-vsementsov@virtuozzo.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      
      fixup! util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended
      d38d6de2
    • P
      Merge remote-tracking branch 'remotes/philmd-gitlab/tags/edk2-next-20191007' into staging · 14d40ab1
      Peter Maydell 提交于
      Improve scripts relying on the EDK2 submodule,
      drop Python2 dependency in EDK2 build scripts.
      
      # gpg: Signature made Mon 07 Oct 2019 14:31:38 BST
      # gpg:                using RSA key 89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (Phil) <philmd@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 89C1 E78F 601E E86C 8674  95CB A2A3 FD6E DEAD C0DE
      
      * remotes/philmd-gitlab/tags/edk2-next-20191007:
        edk2 build scripts: work around TianoCore#1607 without forcing Python 2
        edk2 build scripts: honor external BaseTools flags with uefi-test-tools
        roms: Add a 'make help' target alias
        roms/Makefile.edk2: don't pull in submodules when building from tarball
        make-release: pull in edk2 submodules so we can build it from tarballs
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      14d40ab1
    • P
      Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging · ce701584
      Peter Maydell 提交于
      slirp: Allow non-local DNS address when restrict is off
      
      # gpg: Signature made Mon 07 Oct 2019 00:54:44 BST
      # gpg:                using RSA key 5ED9E856F7D6C6EAF51167A18D35C355720BBAFD
      # gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>" [unknown]
      # gpg:                 aka "Samuel Thibault <sthibault@debian.org>" [marginal]
      # gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>" [unknown]
      # gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>" [marginal]
      # gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>" [marginal]
      # gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" [marginal]
      # gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>" [unknown]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
      #      Subkey fingerprint: 5ED9 E856 F7D6 C6EA F511  67A1 8D35 C355 720B BAFD
      
      * remotes/thibault/tags/samuel-thibault:
        slirp: Allow non-local DNS address when restrict is off
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ce701584
  3. 07 10月, 2019 7 次提交
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 560009f2
      Peter Maydell 提交于
      Block layer patches:
      
      - Fix internal snapshots with typical -blockdev setups
      - iotests: Require Python 3.6 or later
      
      # gpg: Signature made Fri 04 Oct 2019 10:59:21 BST
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream:
        iotests: Remove Python 2 compatibility code
        iotests: Require Python 3.6 or later
        iotests: Test internal snapshots with -blockdev
        block/snapshot: Restrict set of snapshot nodes
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      560009f2
    • L
      edk2 build scripts: work around TianoCore#1607 without forcing Python 2 · 037973bb
      Laszlo Ersek 提交于
      It turns out that forcing python2 for running the edk2 "build" utility is
      neither necessary nor sufficient.
      
      Forcing python2 is not sufficient for two reasons:
      
      - QEMU is moving away from python2, with python2 nearing EOL,
      
      - according to my most recent testing, the lacking dependency information
        in the makefiles that are generated by edk2's "build" utility can cause
        parallel build failures even when "build" is executed by python2.
      
      And forcing python2 is not necessary because we can still return to the
      original idea of filtering out jobserver-related options from MAKEFLAGS.
      So do that.
      
      While at it, cut short edk2's auto-detection of the python3.* minor
      version, by setting PYTHON_COMMAND to "python3" (which we expect to be
      available wherever we intend to build edk2).
      
      With this patch, the guest UEFI binaries that are used as part of the BIOS
      tables test, and the OVMF and ArmVirtQemu platform firmwares, will be
      built strictly in a single job, regardless of an outermost "-jN" make
      option. Alas, there appears to be no reliable way to build edk2 in an
      (outer make, inner make) environment, with a jobserver enabled.
      
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
      Reported-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Message-Id: <20190920083808.21399-3-lersek@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      037973bb
    • L
      edk2 build scripts: honor external BaseTools flags with uefi-test-tools · 53fde085
      Laszlo Ersek 提交于
      Unify the recipe for "build-edk2-tools" in
      "tests/uefi-test-tools/Makefile" with the recipe for "edk2-basetools" in
      "roms/Makefile".
      
      Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Message-Id: <20190920083808.21399-2-lersek@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      53fde085
    • P
      roms: Add a 'make help' target alias · 6f8a70f6
      Philippe Mathieu-Daudé 提交于
      Various C projects provide a 'make help' target. Our root directory
      does so. The roms/ directory lacks a such rule, but already displays
      a help output when the default target is called.
      Add a 'help' target aliased to the default one, to avoid:
      
        $ make -C roms help
        make: *** No rule to make target 'help'.  Stop.
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-Id: <20190920171159.18633-1-philmd@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      6f8a70f6
    • M
      roms/Makefile.edk2: don't pull in submodules when building from tarball · f3e330e3
      Michael Roth 提交于
      Currently the `make efi` target pulls submodules nested under the
      roms/edk2 submodule as dependencies. However, when we attempt to build
      from a tarball this fails since we are no longer in a git tree.
      
      A preceding patch will pre-populate these submodules in the tarball,
      so assume this build dependency is only needed when building from a
      git tree.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Bruce Rogers <brogers@suse.com>
      Cc: qemu-stable@nongnu.org # v4.1.0
      Reported-by: NBruce Rogers <brogers@suse.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-Id: <20190912231202.12327-3-mdroth@linux.vnet.ibm.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      f3e330e3
    • M
      make-release: pull in edk2 submodules so we can build it from tarballs · 45c61c6c
      Michael Roth 提交于
      The `make efi` target added by 536d2173 is built from the roms/edk2
      submodule, which in turn relies on additional submodules nested under
      roms/edk2.
      
      The make-release script currently only pulls in top-level submodules,
      so these nested submodules are missing in the resulting tarball.
      
      We could try to address this situation more generally by recursively
      pulling in all submodules, but this doesn't necessarily ensure the
      end-result will build properly (this case also required other changes).
      
      Additionally, due to the nature of submodules, we may not always have
      control over how these sorts of things are dealt with, so for now we
      continue to handle it on a case-by-case in the make-release script.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Bruce Rogers <brogers@suse.com>
      Cc: qemu-stable@nongnu.org # v4.1.0
      Reported-by: NBruce Rogers <brogers@suse.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Message-Id: <20190912231202.12327-2-mdroth@linux.vnet.ibm.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      45c61c6c
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191004' into staging · 0f0b4386
      Peter Maydell 提交于
      ppc patch queue 2019-10-04
      
      Here's the next batch of ppc and spapr patches.  Includes:
        * Fist part of a large cleanup to irq infrastructure
        * Recreate the full FDT at CAS time, instead of making a difficult
          to follow set of updates.  This will help us move towards
          eliminating CAS reboots altogether
        * No longer provide RTAS blob to SLOF - SLOF can include it just as
          well itself, since guests will generally need to relocate it with
          a call to instantiate-rtas
        * A number of DFP fixes and cleanups from Mark Cave-Ayland
        * Assorted bugfixes
        * Several new small devices for powernv
      
      # gpg: Signature made Fri 04 Oct 2019 10:35:57 BST
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-4.2-20191004: (53 commits)
        ppc/pnv: Remove the XICSFabric Interface from the POWER9 machine
        spapr: Eliminate SpaprIrq::init hook
        spapr: Add return value to spapr_irq_check()
        spapr: Use less cryptic representation of which irq backends are supported
        xive: Improve irq claim/free path
        spapr, xics, xive: Better use of assert()s on irq claim/free paths
        spapr: Handle freeing of multiple irqs in frontend only
        spapr: Remove unhelpful tracepoints from spapr_irq_free_xics()
        spapr: Eliminate SpaprIrq:get_nodename method
        spapr: Simplify spapr_qirq() handling
        spapr: Fix indexing of XICS irqs
        spapr: Eliminate nr_irqs parameter to SpaprIrq::init
        spapr: Clarify and fix handling of nr_irqs
        spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper
        spapr: Fold spapr_phb_lsi_qirq() into its single caller
        xics: Create sPAPR specific ICS subtype
        xics: Merge TYPE_ICS_BASE and TYPE_ICS_SIMPLE classes
        xics: Eliminate reset hook
        xics: Rename misleading ics_simple_*() functions
        xics: Eliminate 'reject', 'resend' and 'eoi' class hooks
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0f0b4386
  4. 05 10月, 2019 14 次提交
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 9e5319ca
      Peter Maydell 提交于
      * Compilation fix for KVM (Alex)
      * SMM fix (Dmitry)
      * VFIO error reporting (Eric)
      * win32 fixes and workarounds (Marc-André)
      * qemu-pr-helper crash bugfix (Maxim)
      * Memory leak fixes (myself)
      * VMX features (myself)
      * Record-replay deadlock (Pavel)
      * i386 CPUID bits (Sebastian)
      * kconfig tweak (Thomas)
      * Valgrind fix (Thomas)
      * Autoconverge test (Yury)
      
      # gpg: Signature made Fri 04 Oct 2019 17:57:48 BST
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
      # 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
      
      * remotes/bonzini/tags/for-upstream: (29 commits)
        target/i386/kvm: Silence warning from Valgrind about uninitialized bytes
        target/i386: work around KVM_GET_MSRS bug for secondary execution controls
        target/i386: add VMX features
        vmxcap: correct the name of the variables
        target/i386: add VMX definitions
        target/i386: expand feature words to 64 bits
        target/i386: introduce generic feature dependency mechanism
        target/i386: handle filtered_features in a new function mark_unavailable_features
        tests/docker: only enable ubsan for test-clang
        win32: work around main-loop busy loop on socket/fd event
        tests: skip serial test on windows
        util: WSAEWOULDBLOCK on connect should map to EINPROGRESS
        Fix wrong behavior of cpu_memory_rw_debug() function in SMM
        memory: allow memory_region_register_iommu_notifier() to fail
        vfio: Turn the container error into an Error handle
        i386: Add CPUID bit for CLZERO and XSAVEERPTR
        docker: test-debug: disable LeakSanitizer
        lm32: do not leak memory on object_new/object_unref
        cris: do not leak struct cris_disasm_data
        mips: fix memory leaks in board initialization
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9e5319ca
    • T
      target/i386/kvm: Silence warning from Valgrind about uninitialized bytes · a1834d97
      Thomas Huth 提交于
      When I run QEMU with KVM under Valgrind, I currently get this warning:
      
       Syscall param ioctl(generic) points to uninitialised byte(s)
          at 0x95BA45B: ioctl (in /usr/lib64/libc-2.28.so)
          by 0x429DC3: kvm_ioctl (kvm-all.c:2365)
          by 0x51B249: kvm_arch_get_supported_msr_feature (kvm.c:469)
          by 0x4C2A49: x86_cpu_get_supported_feature_word (cpu.c:3765)
          by 0x4C4116: x86_cpu_expand_features (cpu.c:5065)
          by 0x4C7F8D: x86_cpu_realizefn (cpu.c:5242)
          by 0x5961F3: device_set_realized (qdev.c:835)
          by 0x7038F6: property_set_bool (object.c:2080)
          by 0x707EFE: object_property_set_qobject (qom-qobject.c:26)
          by 0x705814: object_property_set_bool (object.c:1338)
          by 0x498435: pc_new_cpu (pc.c:1549)
          by 0x49C67D: pc_cpus_init (pc.c:1681)
        Address 0x1ffeffee74 is on thread 1's stack
        in frame #2, created by kvm_arch_get_supported_msr_feature (kvm.c:445)
      
      It's harmless, but a little bit annoying, so silence it by properly
      initializing the whole structure with zeroes.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a1834d97
    • P
      target/i386: work around KVM_GET_MSRS bug for secondary execution controls · 048c9516
      Paolo Bonzini 提交于
      Some secondary controls are automatically enabled/disabled based on the CPUID
      values that are set for the guest.  However, they are still available at a
      global level and therefore should be present when KVM_GET_MSRS is sent to
      /dev/kvm.
      
      Unfortunately KVM forgot to include those, so fix that.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      048c9516
    • P
      target/i386: add VMX features · 20a78b02
      Paolo Bonzini 提交于
      Add code to convert the VMX feature words back into MSR values,
      allowing the user to enable/disable VMX features as they wish.  The same
      infrastructure enables support for limiting VMX features in named
      CPU models.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      20a78b02
    • P
      vmxcap: correct the name of the variables · 49d51b89
      Paolo Bonzini 提交于
      The low bits are 1 if the control must be one, the high bits
      are 1 if the control can be one.  Correct the variable names
      as they are very confusing.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      49d51b89
    • P
      target/i386: add VMX definitions · 704798ad
      Paolo Bonzini 提交于
      These will be used to compile the list of VMX features for named
      CPU models, and/or by the code that sets up the VMX MSRs.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      704798ad
    • P
      target/i386: expand feature words to 64 bits · ede146c2
      Paolo Bonzini 提交于
      VMX requires 64-bit feature words for the IA32_VMX_EPT_VPID_CAP
      and IA32_VMX_BASIC MSRs.  (The VMX control MSRs are 64-bit wide but
      actually have only 32 bits of information).
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ede146c2
    • P
      target/i386: introduce generic feature dependency mechanism · 99e24dbd
      Paolo Bonzini 提交于
      Sometimes a CPU feature does not make sense unless another is
      present.  In the case of VMX features, KVM does not even allow
      setting the VMX controls to some invalid combinations.
      
      Therefore, this patch adds a generic mechanism that looks for bits
      that the user explicitly cleared, and uses them to remove other bits
      from the expanded CPU definition.  If these dependent bits were also
      explicitly *set* by the user, this will be a warning for "-cpu check"
      and an error for "-cpu enforce".  If not, then the dependent bits are
      cleared silently, for convenience.
      
      With VMX features, this will be used so that for example
      "-cpu host,-rdrand" will also hide support for RDRAND exiting.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      99e24dbd
    • P
      target/i386: handle filtered_features in a new function mark_unavailable_features · 245edd0c
      Paolo Bonzini 提交于
      The next patch will add a different reason for filtering features, unrelated
      to host feature support.  Extract a new function that takes care of disabling
      the features and optionally reporting them.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      245edd0c
    • P
      tests/docker: only enable ubsan for test-clang · 9e5ef164
      Paolo Bonzini 提交于
      -fsanitize=undefined is not the same thing as --enable-sanitizers.  After
      commit 47c823e5 ("tests/docker: add sanitizers back to clang build", 2019-09-11)
      test-clang is almost duplicating the asan (test-debug) test, so
      partly revert commit 47c823e5 while leaving ubsan enabled.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9e5ef164
    • M
      win32: work around main-loop busy loop on socket/fd event · 873df2ce
      Marc-André Lureau 提交于
      Commit 05e514b1 introduced an AIO
      context optimization to avoid calling event_notifier_test_and_clear() on
      ctx->notifier. On Windows, the same notifier is being used to wakeup the
      wait on socket events (see commit
      d3385eb4).
      
      The ctx->notifier event is added to the gpoll sources in
      aio_set_event_notifier(), aio_ctx_check() should clear the event
      regardless of ctx->notified, since Windows sets the event by itself,
      bypassing the aio->notified. This fixes qemu not clearing the event
      resulting in a busy loop.
      
      Paolo suggested to me on irc to call event_notifier_test_and_clear()
      after select() >0 from aio-win32.c's aio_prepare. Unfortunately, not all
      fds associated with ctx->notifiers are in AIO fd handlers set.
      (qemu_set_nonblock() in util/oslib-win32.c calls qemu_fd_register()).
      
      This is essentially a v2 of a patch that was sent earlier:
      https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00420.html
      
      that resurfaced when James investigated Spice performance issues on Windows:
      https://gitlab.freedesktop.org/spice/spice/issues/36
      
      In order to test that patch, I simply tried running test-char on
      win32, and it hangs. Applying that patch solves it. QIO idle sources
      are not dispatched. I haven't investigated much further, I suspect
      source priorities and busy looping still come into play.
      
      This version keeps the "notified" field, so event_notifier_poll()
      should still work as expected.
      
      Cc: James Le Cuirot <chewi@gentoo.org>
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      873df2ce
    • M
      tests: skip serial test on windows · 2d18ec29
      Marc-André Lureau 提交于
      Serial test is currently hard-coded to /dev/null.
      
      On Windows, serial chardev expect a COM: device, which may not be
      availble.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2d18ec29
    • M
      util: WSAEWOULDBLOCK on connect should map to EINPROGRESS · f1cd5d41
      Marc-André Lureau 提交于
      In general, WSAEWOULDBLOCK can be mapped to EAGAIN as done by
      socket_error() (or EWOULDBLOCK). But for connect() with non-blocking
      sockets, it actually means the operation is in progress:
      
      https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect
      "The socket is marked as nonblocking and the connection cannot be completed immediately."
      
      (this is also the behaviour implemented by GLib GSocket)
      
      This fixes socket_can_bind_connect() test on win32.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f1cd5d41
    • D
      Fix wrong behavior of cpu_memory_rw_debug() function in SMM · 56f99750
      Dmitry Poletaev 提交于
      There is a problem, that you don't have access to the data using cpu_memory_rw_debug() function when in SMM. You can't remotely debug SMM mode program because of that for example.
      Likely attrs version of get_phys_page_debug should be used to get correct asidx at the end to handle access properly.
      Here the patch to fix it.
      Signed-off-by: NDmitry Poletaev <poletaev@ispras.ru>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      56f99750