* [Qemu-devel] [PULL 01/10] mips/kvm: Init EBase to correct KSEG0
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 02/10] mips_malta: Change default KVM cpu to 24Kc (no FP) Paolo Bonzini
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: James Hogan, Aurelien Jarno
From: James Hogan <james.hogan@imgtec.com>
The EBase CP0 register is initialised to 0x80000000, however with KVM
the guest's KSEG0 is at 0x40000000. The incorrect value doesn't get
passed to KVM yet as KVM doesn't implement the EBase register, however
we should set it correctly now so as not to break migration/loadvm to a
future version of QEMU that does support EBase.
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-mips/translate.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 2f91959..d7b8c4d 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -28,6 +28,7 @@
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
+#include "sysemu/kvm.h"
#define MIPS_DEBUG_DISAS 0
//#define MIPS_DEBUG_SIGN_EXTENSIONS
@@ -16076,7 +16077,12 @@ void cpu_state_reset(CPUMIPSState *env)
env->CP0_Random = env->tlb->nb_tlb - 1;
env->tlb->tlb_in_use = env->tlb->nb_tlb;
env->CP0_Wired = 0;
- env->CP0_EBase = 0x80000000 | (cs->cpu_index & 0x3FF);
+ env->CP0_EBase = (cs->cpu_index & 0x3FF);
+ if (kvm_enabled()) {
+ env->CP0_EBase |= 0x40000000;
+ } else {
+ env->CP0_EBase |= 0x80000000;
+ }
env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL);
/* vectored interrupts not implemented, timer on int 7,
no performance counters. */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 02/10] mips_malta: Change default KVM cpu to 24Kc (no FP)
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 01/10] mips/kvm: Init EBase to correct KSEG0 Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 03/10] mips_malta: Remove incorrect KVM T&E references Paolo Bonzini
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: James Hogan, Aurelien Jarno
From: James Hogan <james.hogan@imgtec.com>
Change the default Malta CPU model for when KVM is enabled to 24Kc which
doesn't have floating point support compared to the 24Kf.
The resulting incorrect Config CP0 register value doesn't get passed to
KVM yet as KVM doesn't expose it, however we should ensure it is set
correctly now to reduce the risk of breaking migration/loadvm to a
future version of QEMU/Linux that does support them.
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/mips/mips_malta.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 2868ee5..c084199 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -949,7 +949,12 @@ void mips_malta_init(MachineState *machine)
#ifdef TARGET_MIPS64
cpu_model = "20Kc";
#else
- cpu_model = "24Kf";
+ if (kvm_enabled()) {
+ /* Don't enable FPU on KVM yet */
+ cpu_model = "24Kc";
+ } else {
+ cpu_model = "24Kf";
+ }
#endif
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 03/10] mips_malta: Remove incorrect KVM T&E references
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 01/10] mips/kvm: Init EBase to correct KSEG0 Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 02/10] mips_malta: Change default KVM cpu to 24Kc (no FP) Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 04/10] mips_malta: Catch kernels linked at wrong address Paolo Bonzini
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: James Hogan, Aurelien Jarno
From: James Hogan <james.hogan@imgtec.com>
Fix the error message and code comments relating to KVM not supporting
booting from the flash mapping when no kernel is provided. The issue is
a general MIPS KVM issue and isn't specific to the Trap & Emulate
version of MIPS KVM.
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/mips/mips_malta.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index c084199..76cf5f2 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1033,7 +1033,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;
@@ -1057,10 +1057,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.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 04/10] mips_malta: Catch kernels linked at wrong address
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (2 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 03/10] mips_malta: Remove incorrect KVM T&E references Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 05/10] watchdog: fix deadlock with -watchdog-action pause Paolo Bonzini
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: James Hogan, Aurelien Jarno
From: James Hogan <james.hogan@imgtec.com>
Add error reporting if the wrong type of kernel is provided for the
current mode of acceleration.
Currently a KVM kernel linked at 0x40000000 can't be used with TCG, and
a normal kernel linked at 0x80000000 can't be used with KVM.
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/mips/mips_malta.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 76cf5f2..95df42e 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 05/10] watchdog: fix deadlock with -watchdog-action pause
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (3 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 04/10] mips_malta: Catch kernels linked at wrong address Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 06/10] Enforce stack protector usage Paolo Bonzini
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel
qemu_clock_enable says:
/* Disabling the clock will wait for related timerlists to stop
* executing qemu_run_timers. Thus, this functions should not
* be used from the callback of a timer that is based on @clock.
* Doing so would cause a deadlock.
*/
and it indeed does: vm_stop uses qemu_clock_enable on QEMU_CLOCK_VIRTUAL
and watchdogs are based on QEMU_CLOCK_VIRTUAL, and we get a deadlock.
Use qemu_system_vmstop_request_prepare()/qemu_system_vmstop_request()
instead; yet another alternative could be a BH.
I checked other occurrences of vm_stop and they should not have this
problem. RUN_STATE_IO_ERROR could in principle (it depends on the
code in the drivers) but it has been fixed by commit 2bd3bce, "block:
asynchronously stop the VM on I/O errors", 2014-06-05.
Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/watchdog/watchdog.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index 9f607d4..c307f9b 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -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.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 06/10] Enforce stack protector usage
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (4 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 05/10] watchdog: fix deadlock with -watchdog-action pause Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 07/10] target-i386: Add "kvmclock-stable-bit" feature bit name Paolo Bonzini
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Miroslav Rezanina
From: Miroslav Rezanina <mrezanin@redhat.com>
If --enable-stack-protector is used is used, configure script try to use
--fstack-protector-strong. In case it's not supported, --fstack-protector-all
is enabled. If both protectors are not supported, configure does not use
any protector at all without any notification.
This patch reports error when user requests stack protector to be used and
both protector modes are not supported. Behavior is not changed in case
user do not use any of --enable-stack-protector/--disable-stack-protector.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/configure b/configure
index 7dd43fd..b880954 100755
--- a/configure
+++ b/configure
@@ -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
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 07/10] target-i386: Add "kvmclock-stable-bit" feature bit name
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (5 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 06/10] Enforce stack protector usage Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 08/10] oslib-posix: Fix new compiler error with -Wclobbered Paolo Bonzini
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Eduardo Habkost
From: Eduardo Habkost <ehabkost@redhat.com>
KVM_FEATURE_CLOCKSOURCE_STABLE_BIT is enabled by default and supported
by KVM. But not having a name defined makes QEMU treat it as an unknown
and unmigratable feature flag (as any unknown feature may possibly
require state to be migrated), and disable it by default on "-cpu host".
As a side-effect, the new name also makes the flag configurable,
allowing the user to disable it (which may be useful for testing or for
compatibility with old kernels).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 45c662d..6d008ab 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -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,
};
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 08/10] oslib-posix: Fix new compiler error with -Wclobbered
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (6 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 07/10] target-i386: Add "kvmclock-stable-bit" feature bit name Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 09/10] mc146818rtc: register the clock reset notifier on the right clock Paolo Bonzini
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
From: Stefan Weil <sw@weilnetz.de>
Newer versions of gcc report a warning (or an error with -Werror) when
compiler option -Wclobbered (or -Wextra) is active:
util/oslib-posix.c:372:12: error:
variable ‘hpagesize’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
The rewritten code fixes this warning: variable 'hpagesize' is now set and
used in a block without any call of sigsetjmp or similar functions.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/oslib-posix.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 1524ead..cdbfb2e 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -366,10 +366,9 @@ static size_t fd_getpagesize(int fd)
void os_mem_prealloc(int fd, char *area, size_t memory)
{
- int ret, i;
+ int ret;
struct sigaction act, oldact;
sigset_t set, oldset;
- size_t hpagesize = fd_getpagesize(fd);
memset(&act, 0, sizeof(act));
act.sa_handler = &sigbus_handler;
@@ -389,19 +388,22 @@ void os_mem_prealloc(int fd, char *area, size_t memory)
if (sigsetjmp(sigjump, 1)) {
fprintf(stderr, "os_mem_prealloc: failed to preallocate pages\n");
exit(1);
- }
+ } else {
+ int i;
+ size_t hpagesize = fd_getpagesize(fd);
- /* MAP_POPULATE silently ignores failures */
- memory = (memory + hpagesize - 1) & -hpagesize;
- for (i = 0; i < (memory/hpagesize); i++) {
- memset(area + (hpagesize*i), 0, 1);
- }
+ /* MAP_POPULATE silently ignores failures */
+ memory = (memory + hpagesize - 1) & -hpagesize;
+ for (i = 0; i < (memory / hpagesize); i++) {
+ memset(area + (hpagesize * i), 0, 1);
+ }
- ret = sigaction(SIGBUS, &oldact, NULL);
- if (ret) {
- perror("os_mem_prealloc: failed to reinstall signal handler");
- exit(1);
- }
+ ret = sigaction(SIGBUS, &oldact, NULL);
+ if (ret) {
+ perror("os_mem_prealloc: failed to reinstall signal handler");
+ exit(1);
+ }
- pthread_sigmask(SIG_SETMASK, &oldset, NULL);
+ pthread_sigmask(SIG_SETMASK, &oldset, NULL);
+ }
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 09/10] mc146818rtc: register the clock reset notifier on the right clock
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (7 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 08/10] oslib-posix: Fix new compiler error with -Wclobbered Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 15:59 ` [Qemu-devel] [PULL 10/10] qtest: fix vhost-user-test compilation with old GLib Paolo Bonzini
2014-07-09 16:16 ` [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable
Commit 884f17c (aio / timers: Convert rtc_clock to be a QEMUClockType,
2013-08-21) erroneously changed an occurrence of rtc_clock to
QEMU_CLOCK_REALTIME, which broke the RTC reset notifier in
mc146818rtc. Fix this.
I redid the patch myself since the original reporter did not sign
off on his.
Cc: qemu-stable@nongnu.org
Reported-by: Lb peace <peaceustc@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/timer/mc146818rtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index 9d817ca..233fc70 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Qemu-devel] [PULL 10/10] qtest: fix vhost-user-test compilation with old GLib
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (8 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 09/10] mc146818rtc: register the clock reset notifier on the right clock Paolo Bonzini
@ 2014-07-09 15:59 ` Paolo Bonzini
2014-07-09 16:16 ` [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Nikolay Nikolaev
From: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Mising G_TIME_SPAN_SECOND definition breaks the RHEL6 compilation as GLib
version before 2.26 does not have it. In such case just define it.
Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/vhost-user-test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 2af2381..406ba70 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -22,6 +22,10 @@
#include <qemu/sockets.h>
/* GLIB version compatibility flags */
+#if !GLIB_CHECK_VERSION(2, 26, 0)
+#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT(1000000))
+#endif
+
#if GLIB_CHECK_VERSION(2, 28, 0)
#define HAVE_MONOTONIC_TIME
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1
2014-07-09 15:59 [Qemu-devel] [PULL for-2.1 00/10] KVM changes (+ misc small fixes) for 2.1 Paolo Bonzini
` (9 preceding siblings ...)
2014-07-09 15:59 ` [Qemu-devel] [PULL 10/10] qtest: fix vhost-user-test compilation with old GLib Paolo Bonzini
@ 2014-07-09 16:16 ` Paolo Bonzini
10 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2014-07-09 16:16 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Il 09/07/2014 17:59, Paolo Bonzini ha scritto:
> The following changes since commit 9d9de254c2b81b68cd48f2324cc753a570a4cdd8:
>
> MAINTAINERS: seccomp: change email contact for Eduardo Otubo (2014-07-03 12:36:15 +0100)
>
> are available in the git repository at:
>
> git://github.com/bonzini/qemu.git
>
> for you to fetch changes up to 8bf3cc8370059a08996651a63cdabe0d2503b430:
>
> qtest: fix vhost-user-test compilation with old GLib (2014-07-09 17:36:15 +0200)
>
> ----------------------------------------------------------------
> Eduardo Habkost (1):
> target-i386: Add "kvmclock-stable-bit" feature bit name
>
> James Hogan (4):
> mips/kvm: Init EBase to correct KSEG0
> mips_malta: Change default KVM cpu to 24Kc (no FP)
> mips_malta: Remove incorrect KVM T&E references
> mips_malta: Catch kernels linked at wrong address
>
> Miroslav Rezanina (1):
> Enforce stack protector usage
>
> Nikolay Nikolaev (1):
> qtest: fix vhost-user-test compilation with old GLib
>
> Paolo Bonzini (2):
> watchdog: fix deadlock with -watchdog-action pause
> mc146818rtc: register the clock reset notifier on the right clock
>
> Stefan Weil (1):
> oslib-posix: Fix new compiler error with -Wclobbered
>
> configure | 7 +++++++
> hw/mips/mips_malta.c | 27 +++++++++++++++++++++++----
> hw/timer/mc146818rtc.c | 2 +-
> hw/watchdog/watchdog.c | 6 +++++-
> target-i386/cpu.c | 2 +-
> target-mips/translate.c | 8 +++++++-
> tests/vhost-user-test.c | 4 ++++
> util/oslib-posix.c | 30 ++++++++++++++++--------------
> 8 files changed, 64 insertions(+), 22 deletions(-)
>
Nevermind, included the wrong version of patch 2.
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread