* [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18
@ 2014-07-18 9:04 Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 1/6] target-i386: Allow execute from user mode when SMEP is enabled Paolo Bonzini
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 146ae00192ffcbd78f6b11fa78c72d1b3d628d8a:
Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2014-07-15 15:51:12 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to d64be1e60d228e558baf677bb40c4732d08c2f17:
Revert "kvmclock: Ensure time in migration never goes backward" (2014-07-15 21:46:44 +0200)
----------------------------------------------------------------
Andreas's fixes to --enable-modules, two 2.1 regression fixes, and a
new qtest. Michael sent a pull request of his own, so I dropped
the vhost changes.
----------------------------------------------------------------
Andreas Färber (2):
module: Simplify module_load()
module: Don't complain when a module is absent
Paolo Bonzini (3):
qtest: new test for wdt_ib700
Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
Revert "kvmclock: Ensure time in migration never goes backward"
Ricky Zhou (1):
target-i386: Allow execute from user mode when SMEP is enabled.
hw/i386/kvm/clock.c | 52 -------------------
target-i386/helper.c | 3 +-
tests/Makefile | 2 +
tests/wdt_ib700-test.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++++
util/module.c | 9 +---
5 files changed, 140 insertions(+), 60 deletions(-)
create mode 100644 tests/wdt_ib700-test.c
--
1.9.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 1/6] target-i386: Allow execute from user mode when SMEP is enabled.
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 2/6] qtest: new test for wdt_ib700 Paolo Bonzini
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Ricky Zhou
From: Ricky Zhou <ricky@rzhou.org>
Previously, execute would be disabled for all pages with SMEP enabled,
regardless of what mode the access took place in.
Signed-off-by: Ricky Zhou <ricky@rzhou.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-i386/helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 11ca864..47b982b 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -750,7 +750,8 @@ do_check_protect_pse36:
/* the page can be put in the TLB */
prot = PAGE_READ;
if (!(ptep & PG_NX_MASK) &&
- !((env->cr[4] & CR4_SMEP_MASK) && (ptep & PG_USER_MASK))) {
+ (mmu_idx == MMU_USER_IDX ||
+ !((env->cr[4] & CR4_SMEP_MASK) && (ptep & PG_USER_MASK)))) {
prot |= PAGE_EXEC;
}
if (pte & PG_DIRTY_MASK) {
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 2/6] qtest: new test for wdt_ib700
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 1/6] target-i386: Allow execute from user mode when SMEP is enabled Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 3/6] module: Simplify module_load() Paolo Bonzini
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel
Since the "pause" watchdog action had a regression and it went
unnoticed for a while, let's add a test for it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/Makefile | 2 +
tests/wdt_ib700-test.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 136 insertions(+)
create mode 100644 tests/wdt_ib700-test.c
diff --git a/tests/Makefile b/tests/Makefile
index 1fcd633..ed9b8e6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -141,6 +141,8 @@ check-qtest-i386-y += tests/i440fx-test$(EXESUF)
check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
check-qtest-i386-y += tests/blockdev-test$(EXESUF)
check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
+check-qtest-i386-y += tests/wdt_ib700-test$(EXESUF)
+gcov-files-i386-y += hw/watchdog/watchdog.c hw/watchdog/wdt_ib700.c
check-qtest-i386-y += $(check-qtest-pci-y)
gcov-files-i386-y += $(gcov-files-pci-y)
check-qtest-i386-y += tests/vmxnet3-test$(EXESUF)
diff --git a/tests/wdt_ib700-test.c b/tests/wdt_ib700-test.c
new file mode 100644
index 0000000..513a533
--- /dev/null
+++ b/tests/wdt_ib700-test.c
@@ -0,0 +1,134 @@
+/*
+ * QTest testcase for the IB700 watchdog
+ *
+ * Copyright (c) 2014 Red Hat, Inc.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+#define NS_PER_SEC 1000000000ULL
+
+static void qmp_check_no_event(void)
+{
+ QDict *resp = qmp("{'execute':'query-status'}");
+ g_assert(qdict_haskey(resp, "return"));
+ QDECREF(resp);
+}
+
+static QDict *qmp_get_event(const char *name)
+{
+ QDict *event = qmp("");
+ QDict *data;
+ g_assert(qdict_haskey(event, "event"));
+ g_assert(!strcmp(qdict_get_str(event, "event"), name));
+
+ if (qdict_haskey(event, "data")) {
+ data = qdict_get_qdict(event, "data");
+ QINCREF(data);
+ } else {
+ data = NULL;
+ }
+
+ QDECREF(event);
+ return data;
+}
+
+static QDict *ib700_program_and_wait(QTestState *s)
+{
+ clock_step(NS_PER_SEC * 40);
+ qmp_check_no_event();
+
+ /* 2 second limit */
+ outb(0x443, 14);
+
+ /* Ping */
+ clock_step(NS_PER_SEC);
+ qmp_check_no_event();
+ outb(0x443, 14);
+
+ /* Disable */
+ clock_step(NS_PER_SEC);
+ qmp_check_no_event();
+ outb(0x441, 1);
+ clock_step(3 * NS_PER_SEC);
+ qmp_check_no_event();
+
+ /* Enable and let it fire */
+ outb(0x443, 13);
+ clock_step(3 * NS_PER_SEC);
+ qmp_check_no_event();
+ clock_step(2 * NS_PER_SEC);
+ return qmp_get_event("WATCHDOG");
+}
+
+
+static void ib700_pause(void)
+{
+ QDict *d;
+ QTestState *s = qtest_start("-watchdog-action pause -device ib700");
+ qtest_irq_intercept_in(s, "ioapic");
+ d = ib700_program_and_wait(s);
+ g_assert(!strcmp(qdict_get_str(d, "action"), "pause"));
+ QDECREF(d);
+ d = qmp_get_event("STOP");
+ QDECREF(d);
+ qtest_end();
+}
+
+static void ib700_reset(void)
+{
+ QDict *d;
+ QTestState *s = qtest_start("-watchdog-action reset -device ib700");
+ qtest_irq_intercept_in(s, "ioapic");
+ d = ib700_program_and_wait(s);
+ g_assert(!strcmp(qdict_get_str(d, "action"), "reset"));
+ QDECREF(d);
+ d = qmp_get_event("RESET");
+ QDECREF(d);
+ qtest_end();
+}
+
+static void ib700_shutdown(void)
+{
+ QDict *d;
+ QTestState *s = qtest_start("-watchdog-action reset -no-reboot -device ib700");
+ qtest_irq_intercept_in(s, "ioapic");
+ d = ib700_program_and_wait(s);
+ g_assert(!strcmp(qdict_get_str(d, "action"), "reset"));
+ QDECREF(d);
+ d = qmp_get_event("SHUTDOWN");
+ QDECREF(d);
+ qtest_end();
+}
+
+static void ib700_none(void)
+{
+ QDict *d;
+ QTestState *s = qtest_start("-watchdog-action none -device ib700");
+ qtest_irq_intercept_in(s, "ioapic");
+ d = ib700_program_and_wait(s);
+ g_assert(!strcmp(qdict_get_str(d, "action"), "none"));
+ QDECREF(d);
+ qtest_end();
+}
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+ qtest_add_func("/wdt_ib700/pause", ib700_pause);
+ qtest_add_func("/wdt_ib700/reset", ib700_reset);
+ qtest_add_func("/wdt_ib700/shutdown", ib700_shutdown);
+ qtest_add_func("/wdt_ib700/none", ib700_none);
+
+ ret = g_test_run();
+
+ return ret;
+}
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 3/6] module: Simplify module_load()
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 1/6] target-i386: Allow execute from user mode when SMEP is enabled Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 2/6] qtest: new test for wdt_ib700 Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent Paolo Bonzini
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber
From: Andreas Färber <afaerber@suse.de>
The file path is not used for error reporting, so we can free it
directly after use.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/module.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/util/module.c b/util/module.c
index 214effb..9fd3030 100644
--- a/util/module.c
+++ b/util/module.c
@@ -202,18 +202,16 @@ static void module_load(module_init_type type)
for (i = 0; i < ARRAY_SIZE(dirs); i++) {
fname = g_strdup_printf("%s/%s%s", dirs[i], *mp, HOST_DSOSUF);
ret = module_load_file(fname);
+ g_free(fname);
+ fname = NULL;
/* Try loading until loaded a module file */
if (!ret) {
break;
}
- g_free(fname);
- fname = NULL;
}
if (ret == -ENOENT) {
fprintf(stderr, "Can't find module: %s\n", *mp);
}
-
- g_free(fname);
}
for (i = 0; i < ARRAY_SIZE(dirs); i++) {
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
` (2 preceding siblings ...)
2014-07-18 9:04 ` [Qemu-devel] [PULL 3/6] module: Simplify module_load() Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 13:48 ` Michael Tokarev
2014-07-18 9:04 ` [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" Paolo Bonzini
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael Tokarev, Andreas Färber
From: Andreas Färber <afaerber@suse.de>
The current implementation depends on a configure-time generated list of
block modules. When any of them is absent, module_load() emits a warning.
This is suboptimal because extracting code to modules was mainly done to
allow separate packaging of modules with intrusive dependencies. Absence
of optional packages then leads to absence of modules and an error
message, which users may recognize as new and report as error.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/module.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/util/module.c b/util/module.c
index 9fd3030..4bd4a94 100644
--- a/util/module.c
+++ b/util/module.c
@@ -209,9 +209,6 @@ static void module_load(module_init_type type)
break;
}
}
- if (ret == -ENOENT) {
- fprintf(stderr, "Can't find module: %s\n", *mp);
- }
}
for (i = 0; i < ARRAY_SIZE(dirs); i++) {
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
` (3 preceding siblings ...)
2014-07-18 9:04 ` [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 11:31 ` Amit Shah
2014-07-18 9:04 ` [Qemu-devel] [PULL 6/6] Revert "kvmclock: Ensure time in migration never goes backward" Paolo Bonzini
2014-07-18 12:46 ` [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Peter Maydell
6 siblings, 1 reply; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: mtosatti, agraf, qemu-stable
This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
Cc: agraf@suse.de
Cc: mtosatti@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/kvm/clock.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 272a88a..feb5fc5 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -17,7 +17,6 @@
#include "qemu/host-utils.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
-#include "sysemu/cpus.h"
#include "hw/sysbus.h"
#include "hw/kvm/clock.h"
@@ -66,7 +65,6 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s)
cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time));
- assert(time.tsc_timestamp <= migration_tsc);
delta = migration_tsc - time.tsc_timestamp;
if (time.tsc_shift < 0) {
delta >>= -time.tsc_shift;
@@ -125,8 +123,6 @@ static void kvmclock_vm_state_change(void *opaque, int running,
if (s->clock_valid) {
return;
}
-
- cpu_synchronize_all_states();
ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
if (ret < 0) {
fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 6/6] Revert "kvmclock: Ensure time in migration never goes backward"
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
` (4 preceding siblings ...)
2014-07-18 9:04 ` [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" Paolo Bonzini
@ 2014-07-18 9:04 ` Paolo Bonzini
2014-07-18 12:46 ` [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Peter Maydell
6 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: mtosatti, agraf, qemu-stable
This reverts commit a096b3a6732f846ec57dc28b47ee9435aa0609bf.
Cc: agraf@suse.de
Cc: mtosatti@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/kvm/clock.c | 48 ------------------------------------------------
1 file changed, 48 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index feb5fc5..07b9c0e 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -14,7 +14,6 @@
*/
#include "qemu-common.h"
-#include "qemu/host-utils.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "hw/sysbus.h"
@@ -35,47 +34,6 @@ typedef struct KVMClockState {
bool clock_valid;
} KVMClockState;
-struct pvclock_vcpu_time_info {
- uint32_t version;
- uint32_t pad0;
- uint64_t tsc_timestamp;
- uint64_t system_time;
- uint32_t tsc_to_system_mul;
- int8_t tsc_shift;
- uint8_t flags;
- uint8_t pad[2];
-} __attribute__((__packed__)); /* 32 bytes */
-
-static uint64_t kvmclock_current_nsec(KVMClockState *s)
-{
- CPUState *cpu = first_cpu;
- CPUX86State *env = cpu->env_ptr;
- hwaddr kvmclock_struct_pa = env->system_time_msr & ~1ULL;
- uint64_t migration_tsc = env->tsc;
- struct pvclock_vcpu_time_info time;
- uint64_t delta;
- uint64_t nsec_lo;
- uint64_t nsec_hi;
- uint64_t nsec;
-
- if (!(env->system_time_msr & 1ULL)) {
- /* KVM clock not active */
- return 0;
- }
-
- cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time));
-
- delta = migration_tsc - time.tsc_timestamp;
- if (time.tsc_shift < 0) {
- delta >>= -time.tsc_shift;
- } else {
- delta <<= time.tsc_shift;
- }
-
- mulu64(&nsec_lo, &nsec_hi, delta, time.tsc_to_system_mul);
- nsec = (nsec_lo >> 32) | (nsec_hi << 32);
- return nsec + time.system_time;
-}
static void kvmclock_vm_state_change(void *opaque, int running,
RunState state)
@@ -87,15 +45,9 @@ static void kvmclock_vm_state_change(void *opaque, int running,
if (running) {
struct kvm_clock_data data;
- uint64_t time_at_migration = kvmclock_current_nsec(s);
s->clock_valid = false;
- /* We can't rely on the migrated clock value, just discard it */
- if (time_at_migration) {
- s->clock = time_at_migration;
- }
-
data.clock = s->clock;
data.flags = 0;
ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
2014-07-18 9:04 ` [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" Paolo Bonzini
@ 2014-07-18 11:31 ` Amit Shah
2014-07-18 11:36 ` Alexander Graf
0 siblings, 1 reply; 14+ messages in thread
From: Amit Shah @ 2014-07-18 11:31 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-stable, mtosatti, qemu-devel, agraf
On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
> This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
>
> Cc: agraf@suse.de
> Cc: mtosatti@redhat.com
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Please include some information on why this is being reverted. Helps
people browsing the tree later.
Thanks,
Amit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
2014-07-18 11:31 ` Amit Shah
@ 2014-07-18 11:36 ` Alexander Graf
2014-07-18 11:45 ` Amit Shah
0 siblings, 1 reply; 14+ messages in thread
From: Alexander Graf @ 2014-07-18 11:36 UTC (permalink / raw)
To: Amit Shah, Paolo Bonzini; +Cc: mtosatti, qemu-devel, qemu-stable
On 18.07.14 13:31, Amit Shah wrote:
> On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
>> This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
>>
>> Cc: agraf@suse.de
>> Cc: mtosatti@redhat.com
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Please include some information on why this is being reverted. Helps
> people browsing the tree later.
Yeah, I'm also not convinced it's a great idea to trade one known bug
with another known bug.
Alex
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
2014-07-18 11:36 ` Alexander Graf
@ 2014-07-18 11:45 ` Amit Shah
0 siblings, 0 replies; 14+ messages in thread
From: Amit Shah @ 2014-07-18 11:45 UTC (permalink / raw)
To: Alexander Graf; +Cc: Paolo Bonzini, mtosatti, qemu-devel, qemu-stable
On (Fri) 18 Jul 2014 [13:36:15], Alexander Graf wrote:
>
> On 18.07.14 13:31, Amit Shah wrote:
> >On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
> >>This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
> >>
> >>Cc: agraf@suse.de
> >>Cc: mtosatti@redhat.com
> >>Cc: qemu-stable@nongnu.org
> >>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >Please include some information on why this is being reverted. Helps
> >people browsing the tree later.
>
> Yeah, I'm also not convinced it's a great idea to trade one known bug with
> another known bug.
I'm not opposed to the revert, though. We don't yet have a fix for
the issue caused by the original patch, and Paolo is being
conservative in keeping the older bug around for 2.1, rather than
trading it for unknown bugs at this stage.
The investigation for the bug is proceeding, though, and we may get a
fix soon. If it turns out to be well-contained, we could also look at
backporting all the fixes to -stable, if it helps.
Amit
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
` (5 preceding siblings ...)
2014-07-18 9:04 ` [Qemu-devel] [PULL 6/6] Revert "kvmclock: Ensure time in migration never goes backward" Paolo Bonzini
@ 2014-07-18 12:46 ` Peter Maydell
2014-07-18 12:55 ` Paolo Bonzini
6 siblings, 1 reply; 14+ messages in thread
From: Peter Maydell @ 2014-07-18 12:46 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On 18 July 2014 10:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The following changes since commit 146ae00192ffcbd78f6b11fa78c72d1b3d628d8a:
>
> Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2014-07-15 15:51:12 +0100)
>
> are available in the git repository at:
>
>
> git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to d64be1e60d228e558baf677bb40c4732d08c2f17:
>
> Revert "kvmclock: Ensure time in migration never goes backward" (2014-07-15 21:46:44 +0200)
>
> ----------------------------------------------------------------
> Andreas's fixes to --enable-modules, two 2.1 regression fixes, and a
> new qtest. Michael sent a pull request of his own, so I dropped
> the vhost changes.
Hi. I'm afraid this fails make check:
ccache gcc -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-g -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
/home/petmay01/linaro/qemu-for-merges/tests/wdt_ib700-test.c
tests/libqtest.o libqemuutil.a libqemustub.a -o tests/wdt_ib700-test
In file included from
/home/petmay01/linaro/qemu-for-merges/tests/wdt_ib700-test.c:12:0:
/home/petmay01/linaro/qemu-for-merges/tests/libqtest.h:25:28: fatal
error: qapi/qmp/qdict.h: No such file or directory
#include "qapi/qmp/qdict.h"
^
compilation terminated.
make: *** [tests/wdt_ib700-test] Error 1
thanks
-- PMM
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18
2014-07-18 12:46 ` [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Peter Maydell
@ 2014-07-18 12:55 ` Paolo Bonzini
0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 12:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
Il 18/07/2014 14:46, Peter Maydell ha scritto:
> On 18 July 2014 10:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> The following changes since commit 146ae00192ffcbd78f6b11fa78c72d1b3d628d8a:
>>
>> Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' into staging (2014-07-15 15:51:12 +0100)
>>
>> are available in the git repository at:
>>
>>
>> git://github.com/bonzini/qemu.git tags/for-upstream
>>
>> for you to fetch changes up to d64be1e60d228e558baf677bb40c4732d08c2f17:
>>
>> Revert "kvmclock: Ensure time in migration never goes backward" (2014-07-15 21:46:44 +0200)
>>
>> ----------------------------------------------------------------
>> Andreas's fixes to --enable-modules, two 2.1 regression fixes, and a
>> new qtest. Michael sent a pull request of his own, so I dropped
>> the vhost changes.
>
> Hi. I'm afraid this fails make check:
>
> ccache gcc -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> -g -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
> /home/petmay01/linaro/qemu-for-merges/tests/wdt_ib700-test.c
> tests/libqtest.o libqemuutil.a libqemustub.a -o tests/wdt_ib700-test
> In file included from
> /home/petmay01/linaro/qemu-for-merges/tests/wdt_ib700-test.c:12:0:
> /home/petmay01/linaro/qemu-for-merges/tests/libqtest.h:25:28: fatal
> error: qapi/qmp/qdict.h: No such file or directory
> #include "qapi/qmp/qdict.h"
Oops, when I was developing the test I did
make tests/wdt_ib700-test.o
make tests/wdt_ib700-test
but a straight 'make tests/wdt_ib700-test.o' doesn't work because this
line is missing:
tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o
I'll respin the pull request to also include a clarification of the two
reverts.
Paolo
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
2014-07-18 13:31 [Qemu-devel] [PULL v2 " Paolo Bonzini
@ 2014-07-18 13:31 ` Paolo Bonzini
0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2014-07-18 13:31 UTC (permalink / raw)
To: qemu-devel; +Cc: mtosatti, agraf, qemu-stable
This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
This patch fixed a hang introduced by commit a096b3a (kvmclock: Ensure
time in migration never goes backward, 2014-05-16), but it causes
a regression in migration whose cause is not quite clear.
Because of this, I'm choosing to revert both patches. This trades a
2.1 regression for a bug that's been there forever.
Cc: agraf@suse.de
Cc: mtosatti@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/kvm/clock.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 272a88a..feb5fc5 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -17,7 +17,6 @@
#include "qemu/host-utils.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
-#include "sysemu/cpus.h"
#include "hw/sysbus.h"
#include "hw/kvm/clock.h"
@@ -66,7 +65,6 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s)
cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time));
- assert(time.tsc_timestamp <= migration_tsc);
delta = migration_tsc - time.tsc_timestamp;
if (time.tsc_shift < 0) {
delta >>= -time.tsc_shift;
@@ -125,8 +123,6 @@ static void kvmclock_vm_state_change(void *opaque, int running,
if (s->clock_valid) {
return;
}
-
- cpu_synchronize_all_states();
ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
if (ret < 0) {
fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
--
1.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent
2014-07-18 9:04 ` [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent Paolo Bonzini
@ 2014-07-18 13:48 ` Michael Tokarev
0 siblings, 0 replies; 14+ messages in thread
From: Michael Tokarev @ 2014-07-18 13:48 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: Andreas Färber
18.07.2014 13:04, Paolo Bonzini wrote:
> From: Andreas Färber <afaerber@suse.de>
>
> The current implementation depends on a configure-time generated list of
> block modules. When any of them is absent, module_load() emits a warning.
>
> This is suboptimal because extracting code to modules was mainly done to
> allow separate packaging of modules with intrusive dependencies. Absence
> of optional packages then leads to absence of modules and an error
> message, which users may recognize as new and report as error.
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
ACK!
/mjt
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-07-18 13:48 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 9:04 [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 1/6] target-i386: Allow execute from user mode when SMEP is enabled Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 2/6] qtest: new test for wdt_ib700 Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 3/6] module: Simplify module_load() Paolo Bonzini
2014-07-18 9:04 ` [Qemu-devel] [PULL 4/6] module: Don't complain when a module is absent Paolo Bonzini
2014-07-18 13:48 ` Michael Tokarev
2014-07-18 9:04 ` [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" Paolo Bonzini
2014-07-18 11:31 ` Amit Shah
2014-07-18 11:36 ` Alexander Graf
2014-07-18 11:45 ` Amit Shah
2014-07-18 9:04 ` [Qemu-devel] [PULL 6/6] Revert "kvmclock: Ensure time in migration never goes backward" Paolo Bonzini
2014-07-18 12:46 ` [Qemu-devel] [PULL for-2.1 0/6] target-i386, module, qtest patches for 2014-07-18 Peter Maydell
2014-07-18 12:55 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2014-07-18 13:31 [Qemu-devel] [PULL v2 " Paolo Bonzini
2014-07-18 13:31 ` [Qemu-devel] [PULL 5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation" Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).