Commit 74aeb37d authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/kvm/uq/master' into staging



* remotes/kvm/uq/master:
  qtest: fix vhost-user-test compilation with old GLib
  mc146818rtc: register the clock reset notifier on the right clock
  oslib-posix: Fix new compiler error with -Wclobbered
  target-i386: Add "kvmclock-stable-bit" feature bit name
  Enforce stack protector usage
  watchdog: fix deadlock with -watchdog-action pause
  mips_malta: Catch kernels linked at wrong address
  mips_malta: Remove incorrect KVM T&E references
  mips/kvm: Disable FPU on reset with KVM
  mips/kvm: Init EBase to correct KSEG0

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 9e99c5fd 0a58991a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1491,6 +1491,7 @@ done

if test "$stack_protector" != "no"; then
  gcc_flags="-fstack-protector-strong -fstack-protector-all"
  sp_on=0
  for flag in $gcc_flags; do
    # We need to check both a compile and a link, since some compiler
    # setups fail only on a .c->.o compile and some only at link time
@@ -1498,9 +1499,15 @@ if test "$stack_protector" != "no" ; then
       compile_prog "-Werror $flag" ""; then
      QEMU_CFLAGS="$QEMU_CFLAGS $flag"
      LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
      sp_on=1
      break
    fi
  done
  if test "$stack_protector" = yes; then
    if test $sp_on = 0; then
      error_exit "Stack protector not supported"
    fi
  fi
fi

# Workaround for http://gcc.gnu.org/PR55489.  Happens with -fPIE/-fPIC and
+17 −3
Original line number Diff line number Diff line
@@ -792,9 +792,23 @@ static int64_t load_kernel (void)
                loaderparams.kernel_filename);
        exit(1);
    }

    /* Sanity check where the kernel has been linked */
    if (kvm_enabled()) {
        if (kernel_entry & 0x80000000ll) {
            error_report("KVM guest kernels must be linked in useg. "
                         "Did you forget to enable CONFIG_KVM_GUEST?");
            exit(1);
        }

        xlate_to_kseg0 = cpu_mips_kvm_um_phys_to_kseg0;
    } else {
        if (!(kernel_entry & 0x80000000ll)) {
            error_report("KVM guest kernels aren't supported with TCG. "
                         "Did you unintentionally enable CONFIG_KVM_GUEST?");
            exit(1);
        }

        xlate_to_kseg0 = cpu_mips_phys_to_kseg0;
    }

@@ -1028,7 +1042,7 @@ void mips_malta_init(MachineState *machine)
    fl_idx++;
    if (kernel_filename) {
        ram_low_size = MIN(ram_size, 256 << 20);
        /* For KVM T&E we reserve 1MB of RAM for running bootloader */
        /* For KVM we reserve 1MB of RAM for running bootloader */
        if (kvm_enabled()) {
            ram_low_size -= 0x100000;
            bootloader_run_addr = 0x40000000 + ram_low_size;
@@ -1052,10 +1066,10 @@ void mips_malta_init(MachineState *machine)
                             bootloader_run_addr, kernel_entry);
        }
    } else {
        /* The flash region isn't executable from a KVM T&E guest */
        /* The flash region isn't executable from a KVM guest */
        if (kvm_enabled()) {
            error_report("KVM enabled but no -kernel argument was specified. "
                         "Booting from flash is not supported with KVM T&E.");
                         "Booting from flash is not supported with KVM.");
            exit(1);
        }
        /* Load firmware from flash. */
+1 −1
Original line number Diff line number Diff line
@@ -895,7 +895,7 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
    check_update_timer(s);

    s->clock_reset_notifier.notify = rtc_notify_clock_reset;
    qemu_clock_register_reset_notifier(QEMU_CLOCK_REALTIME,
    qemu_clock_register_reset_notifier(rtc_clock,
                                       &s->clock_reset_notifier);

    s->suspend_notifier.notify = rtc_notify_suspend;
+5 −1
Original line number Diff line number Diff line
@@ -122,8 +122,12 @@ void watchdog_perform_action(void)
        exit(0);

    case WDT_PAUSE:             /* same as 'stop' command in monitor */
        /* In a timer callback, when vm_stop calls qemu_clock_enable
         * you would get a deadlock.  Bypass the problem.
         */
        qemu_system_vmstop_request_prepare();
        qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_PAUSE, &error_abort);
        vm_stop(RUN_STATE_WATCHDOG);
        qemu_system_vmstop_request(RUN_STATE_WATCHDOG);
        break;

    case WDT_DEBUG:
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ static const char *kvm_feature_name[] = {
    NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
    "kvmclock-stable-bit", NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
};

Loading