Commit 3591ddd3 authored by Peter Maydell's avatar Peter Maydell
Browse files

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



* Various fixes
* libdaxctl support to correctly align devdax character devices (Jingqi)
* initial-all-set support for live migration (Jay)
* forbid '-numa node, mem' for 5.1 and newer machine types (Igor)
* x87 fixes (Joseph)
* Tighten memory_region_access_valid (Michael) and fix fallout (myself)
* Replay fixes (Pavel)

# gpg: Signature made Fri 26 Jun 2020 14:42:17 BST
# 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]
# 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: (31 commits)
  i386: Mask SVM features if nested SVM is disabled
  ibex_uart: fix XOR-as-pow
  vmport: move compat properties to hw_compat_5_0
  hyperv: vmbus: Remove the 2nd IRQ
  kvm: i386: allow TSC to differ by NTP correction bounds without TSC scaling
  numa: forbid '-numa node, mem' for 5.1 and newer machine types
  osdep: Make MIN/MAX evaluate arguments only once
  target/i386: Add notes for versioned CPU models
  target/i386: reimplement fpatan using floatx80 operations
  target/i386: reimplement fyl2x using floatx80 operations
  target/i386: reimplement fyl2xp1 using floatx80 operations
  target/i386: reimplement fprem, fprem1 using floatx80 operations
  softfloat: return low bits of quotient from floatx80_modrem
  softfloat: do not set denominator high bit for floatx80 remainder
  softfloat: do not return pseudo-denormal from floatx80 remainder
  softfloat: fix floatx80 remainder pseudo-denormal check for zero
  softfloat: merge floatx80_mod and floatx80_rem
  target/i386: reimplement f2xm1 using floatx80 operations
  xen: Actually fix build without passthrough
  Makefile: Install qemu-[qmp/ga]-ref.* into the directory "interop"
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 87fb952d 730319ae
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -873,8 +873,9 @@ install-sphinxdocs: sphinxdocs
install-doc: $(DOCS) install-sphinxdocs
	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop"
	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
	$(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
ifdef CONFIG_POSIX
	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu.1 "$(DESTDIR)$(mandir)/man1"
@@ -892,8 +893,9 @@ ifdef CONFIG_TRACE_SYSTEMTAP
endif
ifneq (,$(findstring qemu-ga,$(TOOLS)))
	$(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-ga.8 "$(DESTDIR)$(mandir)/man8"
	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)"
	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)/interop"
	$(INSTALL_DATA) docs/interop/qemu-ga-ref.html "$(DESTDIR)$(qemu_docdir)/interop"
	$(INSTALL_DATA) docs/interop/qemu-ga-ref.txt "$(DESTDIR)$(qemu_docdir)/interop"
	$(INSTALL_DATA) docs/interop/qemu-ga-ref.7 "$(DESTDIR)$(mandir)/man7"
endif
endif
+14 −7
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ struct KVMState
    bool kernel_irqchip_required;
    OnOffAuto kernel_irqchip_split;
    bool sync_mmu;
    bool manual_dirty_log_protect;
    uint64_t manual_dirty_log_protect;
    /* The man page (and posix) say ioctl numbers are signed int, but
     * they're not.  Linux, glibc and *BSD all treat ioctl numbers as
     * unsigned, and treating them as signed here can break things */
@@ -1995,6 +1995,7 @@ static int kvm_init(MachineState *ms)
    int ret;
    int type = 0;
    const char *kvm_type;
    uint64_t dirty_log_manual_caps;

    s = KVM_STATE(ms->accelerator);

@@ -2120,14 +2121,20 @@ static int kvm_init(MachineState *ms)
    s->coalesced_pio = s->coalesced_mmio &&
                       kvm_check_extension(s, KVM_CAP_COALESCED_PIO);

    s->manual_dirty_log_protect =
    dirty_log_manual_caps =
        kvm_check_extension(s, KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2);
    if (s->manual_dirty_log_protect) {
        ret = kvm_vm_enable_cap(s, KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2, 0, 1);
    dirty_log_manual_caps &= (KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE |
                              KVM_DIRTY_LOG_INITIALLY_SET);
    s->manual_dirty_log_protect = dirty_log_manual_caps;
    if (dirty_log_manual_caps) {
        ret = kvm_vm_enable_cap(s, KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2, 0,
                                   dirty_log_manual_caps);
        if (ret) {
            warn_report("Trying to enable KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 "
                        "but failed.  Falling back to the legacy mode. ");
            s->manual_dirty_log_protect = false;
            warn_report("Trying to enable capability %"PRIu64" of "
                        "KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 but failed. "
                        "Falling back to the legacy mode. ",
                        dirty_log_manual_caps);
            s->manual_dirty_log_protect = 0;
        }
    }

+3 −3
Original line number Diff line number Diff line
@@ -2582,9 +2582,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags)
    /* This function should never be called with addresses outside the
       guest address space.  If this assert fires, it probably indicates
       a missing call to h2g_valid.  */
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
    if (TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS) {
        assert(start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
    }

    if (len == 0) {
        return 0;
+29 −0
Original line number Diff line number Diff line
@@ -518,6 +518,7 @@ plugins="no"
fuzzing="no"
rng_none="no"
secret_keyring=""
libdaxctl=""

supported_cpu="no"
supported_os="no"
@@ -1626,6 +1627,10 @@ for opt do
  ;;
  --disable-keyring) secret_keyring="no"
  ;;
  --enable-libdaxctl) libdaxctl=yes
  ;;
  --disable-libdaxctl) libdaxctl=no
  ;;
  *)
      echo "ERROR: unknown option $opt"
      echo "Try '$0 --help' for more information"
@@ -1927,6 +1932,7 @@ disabled with --disable-FEATURE, default is enabled if available:
  libpmem         libpmem support
  xkbcommon       xkbcommon support
  rng-none        dummy RNG, avoid using /dev/(u)random and getrandom()
  libdaxctl       libdaxctl support

NOTE: The object files are built at the place where configure is launched
EOF
@@ -6360,6 +6366,24 @@ if test "$libpmem" != "no"; then
	fi
fi

##########################################
# check for libdaxctl

if test "$libdaxctl" != "no"; then
	if $pkg_config --atleast-version=57 "libdaxctl"; then
		libdaxctl="yes"
		libdaxctl_libs=$($pkg_config --libs libdaxctl)
		libdaxctl_cflags=$($pkg_config --cflags libdaxctl)
		libs_softmmu="$libs_softmmu $libdaxctl_libs"
		QEMU_CFLAGS="$QEMU_CFLAGS $libdaxctl_cflags"
	else
		if test "$libdaxctl" = "yes" ; then
			feature_not_found "libdaxctl" "Install libdaxctl"
		fi
		libdaxctl="no"
	fi
fi

##########################################
# check for slirp

@@ -6967,6 +6991,7 @@ echo "parallels support $parallels"
echo "sheepdog support  $sheepdog"
echo "capstone          $capstone"
echo "libpmem support   $libpmem"
echo "libdaxctl support $libdaxctl"
echo "libudev           $libudev"
echo "default devices   $default_devices"
echo "plugin support    $plugins"
@@ -7800,6 +7825,10 @@ if test "$libpmem" = "yes" ; then
  echo "CONFIG_LIBPMEM=y" >> $config_host_mak
fi

if test "$libdaxctl" = "yes" ; then
  echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
fi

if test "$bochs" = "yes" ; then
  echo "CONFIG_BOCHS=y" >> $config_host_mak
fi
+12 −3
Original line number Diff line number Diff line
@@ -1374,6 +1374,13 @@ static int64_t tcg_get_icount_limit(void)
    }
}

static void notify_aio_contexts(void)
{
    /* Wake up other AioContexts.  */
    qemu_clock_notify(QEMU_CLOCK_VIRTUAL);
    qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL);
}

static void handle_icount_deadline(void)
{
    assert(qemu_in_vcpu_thread());
@@ -1382,9 +1389,7 @@ static void handle_icount_deadline(void)
                                                      QEMU_TIMER_ATTR_ALL);

        if (deadline == 0) {
            /* Wake up other AioContexts.  */
            qemu_clock_notify(QEMU_CLOCK_VIRTUAL);
            qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL);
            notify_aio_contexts();
        }
    }
}
@@ -1407,6 +1412,10 @@ static void prepare_icount_for_run(CPUState *cpu)
        cpu->icount_extra = cpu->icount_budget - insns_left;

        replay_mutex_lock();

        if (cpu->icount_budget == 0 && replay_has_checkpoint()) {
            notify_aio_contexts();
        }
    }
}

Loading