Skip to contentSkip to conversation

aspeed/timer: Fix slowdowns in recent Linux

PATCH In review Cédric Le Goater 5 participants 14 messages Mar 14, 2019 Arm/Aspeed machine support

lore
Share & tools
lore
#0 lore raw

cover aspeed/timer: Fix slowdowns in recent Linux

Hello,

This series was initially sent by Andrew on the OpenBMC list :

https://lists.ozlabs.org/pipermail/openbmc/2019-January/014640.html

We had an issue with the introduction of 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler") in Linux where our QEMU Aspeed machine were becoming very slow.

The series' approach is to provide back-pressure and it has shown significant improvement on the initial behavior which became normal again.

Sorry for this last minute fix but I think it's worth merging for all the QEMU Aspeed machine. It's a bit late for QEMU-4.0 so that might be 4.1 material.

Thanks,

C.

Andrew Jeffery (3):
aspeed/timer: Status register contains reload for stopped timer aspeed/timer: Fix match calculations
aspeed/timer: Provide back-pressure information for short periods

Christian Svensson (1):
aspeed/timer: Use signed muldiv for timer resets

Joel Stanley (1):
aspeed/timer: Fix behaviour running Linux

 include/hw/timer/aspeed_timer.h |  1 +
 hw/misc/aspeed_scu.c            |  6 +++
 hw/timer/aspeed_timer.c         | 81 ++++++++++++++++++++-------------
 3 files changed, 57 insertions(+), 31 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/5 aspeed/timer: Fix behaviour running Linux

From: Joel Stanley <[email protected]>

The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an issue observed on hardware:

Quoted 4 lines

RELOAD register is loaded into COUNT register when the aspeed timer is enabled, which means the next event may be delayed because timer interrupt won't be generated until <0xFFFFFFFF - current_count + cycles>.

When running under Qemu, the system appeared "laggy". The guest is now scheduling timer events too regularly, starving the host of CPU time.

This patch modifies the timer model to attempt to schedule the timer expiry as the guest requests, but if we have missed the deadline we re interrupt and try again, which allows the guest to catch up.

Provides expected behaviour with old and new guest code.

Fixes c04bd47db6b9 ("hw/timer: Add ASPEED timer device model")

[clg: - merged a fix from Andrew Jeffery <[email protected]>
"Fire interrupt on failure to meet deadline"
https://lists.ozlabs.org/pipermail/openbmc/2019-January/014641.html
- adapted commit log
- checkpatch fixes ]

---
 hw/timer/aspeed_timer.c | 59 ++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 28 deletions(-)
hw/timer/aspeed_timer.c +31 -28
index 5c786e512815..9ffd8e09f670 100644
@@ -109,37 +109,40 @@ static inline uint64_t calculate_time(struct AspeedTimer *t, uint32_t ticks)
 
 static uint64_t calculate_next(struct AspeedTimer *t)
 {
-    uint64_t next = 0;
-    uint32_t rate = calculate_rate(t);
+    uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+    uint64_t next;
 
-    while (!next) {
-        /* We don't know the relationship between the values in the match
-         * registers, so sort using MAX/MIN/zero. We sort in that order as the
-         * timer counts down to zero. */
-        uint64_t seq[] = {
-            calculate_time(t, MAX(t->match[0], t->match[1])),
-            calculate_time(t, MIN(t->match[0], t->match[1])),
-            calculate_time(t, 0),
-        };
-        uint64_t reload_ns;
-        uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
-
-        if (now < seq[0]) {
-            next = seq[0];
-        } else if (now < seq[1]) {
-            next = seq[1];
-        } else if (now < seq[2]) {
-            next = seq[2];
-        } else if (t->reload) {
-            reload_ns = muldiv64(t->reload, NANOSECONDS_PER_SECOND, rate);
-            t->start = now - ((now - t->start) % reload_ns);
-        } else {
-            /* no reload value, return 0 */
-            break;
-        }
+    /*
+     * We don't know the relationship between the values in the match
+     * registers, so sort using MAX/MIN/zero. We sort in that order as
+     * the timer counts down to zero.
+     */
+
+    next = calculate_time(t, MAX(t->match[0], t->match[1]));
+    if (now < next) {
+        return next;
+    }
+
+    next = calculate_time(t, MIN(t->match[0], t->match[1]));
+    if (now < next) {
+        return next;
+    }
+
+    next = calculate_time(t, 0);
+    if (now < next) {
+        return next;
+    }
+
+    /* We've missed all deadlines, fire interrupt and try again */
+    timer_del(&t->timer);
+
+    if (timer_overflow_interrupt(t)) {
+        t->level = !t->level;
+        qemu_set_irq(t->irq, t->level);
     }
 
-    return next;
+    t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+    return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0));
 }
 
 static void aspeed_timer_mod(AspeedTimer *t)
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/5 aspeed/timer: Status register contains reload for stopped timer

In reply to Cédric Le Goater

From: Andrew Jeffery <[email protected]>

From the datasheet:

This register stores the current status of counter #N. When timer enable bit TMC30[N * b] is disabled, the reload register will be loaded into this counter. When timer bit TMC30[N * b] is set, the counter will start to decrement. CPU can update this register value when enable bit is set.

---
 hw/timer/aspeed_timer.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
hw/timer/aspeed_timer.c +5 -1
index 9ffd8e09f670..2f8522a597d3 100644
@@ -187,7 +187,11 @@ static uint64_t aspeed_timer_get_value(AspeedTimer *t, int reg)
 
     switch (reg) {
     case TIMER_REG_STATUS:
-        value = calculate_ticks(t, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+        if (timer_enabled(t)) {
+            value = calculate_ticks(t, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+        } else {
+            value = t->reload;
+        }
         break;
     case TIMER_REG_RELOAD:
         value = t->reload;
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/5 aspeed/timer: Fix match calculations

In reply to Cédric Le Goater

From: Andrew Jeffery <[email protected]>

If the match value exceeds reload then we don't want to include it in calculations for the next event.

---
 hw/timer/aspeed_timer.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
hw/timer/aspeed_timer.c +10 -3
index 2f8522a597d3..6c184572ea04 100644
@@ -107,6 +107,11 @@ static inline uint64_t calculate_time(struct AspeedTimer *t, uint32_t ticks)
     return t->start + delta_ns;
 }
 
+static inline uint32_t calculate_match(struct AspeedTimer *t, int i)
+{
+    return t->match[i] < t->reload ? t->match[i] : 0;
+}
+
 static uint64_t calculate_next(struct AspeedTimer *t)
 {
     uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
@@ -118,12 +123,12 @@ static uint64_t calculate_next(struct AspeedTimer *t)
      * the timer counts down to zero.
      */
 
-    next = calculate_time(t, MAX(t->match[0], t->match[1]));
+    next = calculate_time(t, MAX(calculate_match(t, 0), calculate_match(t, 1)));
     if (now < next) {
         return next;
     }
 
-    next = calculate_time(t, MIN(t->match[0], t->match[1]));
+    next = calculate_time(t, MIN(calculate_match(t, 0), calculate_match(t, 1)));
     if (now < next) {
         return next;
     }
@@ -141,8 +146,10 @@ static uint64_t calculate_next(struct AspeedTimer *t)
         qemu_set_irq(t->irq, t->level);
     }
 
+    next = MAX(MAX(calculate_match(t, 0), calculate_match(t, 1)), 0);
     t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
-    return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0));
+
+    return calculate_time(t, next);
 }
 
 static void aspeed_timer_mod(AspeedTimer *t)
Signature · 1 line
2.20.1
#4 lore raw

PATCH 4/5 aspeed/timer: Provide back-pressure information for short periods

In reply to Cédric Le Goater

From: Andrew Jeffery <[email protected]>

First up: This is not the way the hardware behaves.

However, it helps resolve real-world problems with short periods being used under Linux. Commit 4451d3f59f2a ("clocksource/drivers/fttmr010:
Fix set_next_event handler") in Linux fixed the timer driver to correctly schedule the next event for the Aspeed controller, and in combination with 5daa8212c08e ("ARM: dts: aspeed: Describe random number device") Linux will now set a timer with a period as low as 1us.

Configuring a qemu timer with such a short period results in spending time handling the interrupt in the model rather than executing guest code, leading to noticeable "sticky" behaviour in the guest.

The behaviour of Linux is correct with respect to the hardware, so we need to improve our handling under emulation. The approach chosen is to provide back-pressure information by calculating an acceptable minimum number of ticks to be set on the model. Under Linux an additional read is added in the timer configuration path to detect back-pressure, which will never occur on hardware. However if back-pressure is observed, the driver alerts the clock event subsystem, which then performs its own next event dilation via a config option - d1748302f70b ("clockevents:
Make minimum delay adjustments configurable")

A minimum period of 5us was experimentally determined on a Lenovo T480s, which I've increased to 20us for "safety".

---
 include/hw/timer/aspeed_timer.h | 1 +
 hw/misc/aspeed_scu.c            | 6 ++++++
 hw/timer/aspeed_timer.c         | 6 +++++-
 3 files changed, 12 insertions(+), 1 deletion(-)
include/hw/timer/aspeed_timer.h +1 -0
index 1fb949e16710..10c851ebb6d7 100644
@@ -41,6 +41,7 @@ typedef struct AspeedTimer {
      * interrupts, signalling with both the rising and falling edge.
      */
     int32_t level;
+    uint32_t min_ticks;
     uint32_t reload;
     uint32_t match[2];
     uint64_t start;
hw/misc/aspeed_scu.c +6 -0
index 51498ce70be6..797a07c2c45a 100644
@@ -427,6 +427,12 @@ static void aspeed_scu_realize(DeviceState *dev, Error **errp)
                           TYPE_ASPEED_SCU, SCU_IO_REGION_SIZE);
 
     sysbus_init_mmio(sbd, &s->iomem);
+
+    /*
+     * Reset on realize to ensure the APB clock value is calculated in time for
+     * use by the timer model, which is reset before the SCU.
+     */
+    aspeed_scu_reset(dev);
 }
 
 static const VMStateDescription vmstate_aspeed_scu = {
hw/timer/aspeed_timer.c +5 -1
index 6c184572ea04..9988b8fbbf17 100644
@@ -259,7 +259,7 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
     switch (reg) {
     case TIMER_REG_RELOAD:
         old_reload = t->reload;
-        t->reload = value;
+        t->reload = value < t->min_ticks ? t->min_ticks : value;
 
         /* If the reload value was not previously set, or zero, and
          * the current value is valid, try to start the timer if it is
@@ -311,7 +311,11 @@ static void aspeed_timer_ctrl_enable(AspeedTimer *t, bool enable)
 
 static void aspeed_timer_ctrl_external_clock(AspeedTimer *t, bool enable)
 {
+    AspeedTimerCtrlState *s = timer_to_ctrl(t);
+    uint32_t rate = enable ? TIMER_CLOCK_EXT_HZ : s->scu->apb_freq;
+
     trace_aspeed_timer_ctrl_external_clock(t->id, enable);
+    t->min_ticks = muldiv64(20 * SCALE_US, rate, NANOSECONDS_PER_SECOND);
 }
 
 static void aspeed_timer_ctrl_overflow_interrupt(AspeedTimer *t, bool enable)
Signature · 1 line
2.20.1
#5 lore raw

PATCH 5/5 aspeed/timer: Use signed muldiv for timer resets

In reply to Cédric Le Goater

From: Christian Svensson <[email protected]>

If the host decrements the counter register that results in a negative delta. This is then passed to muldiv64 which only handles unsigned numbers resulting in bogus results.

This fix ensures the data being operated on is signed before it is ultimately casted to the final unsigned value.

Test case: kexec a kernel using aspeed_timer and it will freeze on the second bootup when the kernel initializes the timer. With this patch that no longer happens and the timer appears to run OK.

[clg: - checkpatch fixes ]
---
 hw/timer/aspeed_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/timer/aspeed_timer.c +2 -1
index 9988b8fbbf17..0b16eac8970c 100644
@@ -275,7 +275,8 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
             uint32_t rate = calculate_rate(t);
 
-            t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
+            t->start = (int64_t)t->start +
+                ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
             aspeed_timer_mod(t);
         }
         break;
Signature · 1 line
2.20.1
#6 lore raw

Re: [Qemu-arm] [PATCH 5/5] aspeed/timer: Use signed muldiv for timer resets

Christian,

Could you please provide a fix for this patch ? patchew complains, see attached log.

Thanks,

C.

Quoted 26 lines · Cédric Le Goater

From: Christian Svensson <[email protected]>

If the host decrements the counter register that results in a negative delta. This is then passed to muldiv64 which only handles unsigned numbers resulting in bogus results.

This fix ensures the data being operated on is signed before it is ultimately casted to the final unsigned value.

Test case: kexec a kernel using aspeed_timer and it will freeze on the second bootup when the kernel initializes the timer. With this patch that no longer happens and the timer appears to run OK.

[clg: - checkpatch fixes ]
---
 hw/timer/aspeed_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/timer/aspeed_timer.c +0 -0
index 9988b8fbbf17..0b16eac8970c 100644

hw/timer/aspeed_timer.c static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg, · line 282

Quoted 9 lines
hw/timer/aspeed_timer.c +2 -1
@@ -275,7 +275,8 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
             uint32_t rate = calculate_rate(t);
 
-            t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
+            t->start = (int64_t)t->start +
+                ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
             aspeed_timer_mod(t);
         }
         break;

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

CC migration/xbzrle.o
CC migration/postcopy-ram.o
/tmp/qemu-test/src/hw/timer/aspeed_timer.c: In function 'aspeed_timer_set_value':
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: error: '__int128_t' undeclared (first use in this function); did you mean '__int128'?

                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                   ^~~~~~~~~~
                   __int128
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: note: each undeclared identifier is reported only once for each function it appears in
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:30: error: expected ')' before 'delta'
                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                 ~            ^~~~~
                              )
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:276:22: error: unused variable 'rate' [-Werror=unused-variable]
             uint32_t rate = calculate_rate(t);
                      ^~~~
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:275:21: error: unused variable 'delta' [-Werror=unused-variable]
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
                     ^~~~~

cc1: all warnings being treated as errors

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#7 lore raw

Re: [Qemu-devel] [PATCH 5/5] aspeed/timer: Use signed muldiv for timer resets

Hi all,

I have a new patch but I'm not sure how you want me to post it. Should I do a "PATCH v2" with a single patch and this thread as the thread ID?

Thanks,
- Chris

Quoted 49 lines · Cédric Le Goater

Christian,

Could you please provide a fix for this patch ? patchew complains, see attached log.

Thanks,

C.

hw/timer/aspeed_timer.c static void

Quoted 25 lines · Cédric Le Goater

From: Christian Svensson <[email protected]>

If the host decrements the counter register that results in a negative delta. This is then passed to muldiv64 which only handles unsigned numbers resulting in bogus results.

This fix ensures the data being operated on is signed before it is ultimately casted to the final unsigned value.

Test case: kexec a kernel using aspeed_timer and it will freeze on the second bootup when the kernel initializes the timer. With this patch that no longer happens and the timer appears to run OK.

[clg: - checkpatch fixes ]
---
 hw/timer/aspeed_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/timer/aspeed_timer.c +0 -0
index 9988b8fbbf17..0b16eac8970c 100644
@@ -275,7 +275,8 @@ static void

aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,

hw/timer/aspeed_timer.c static void · line 275

Quoted 1 line
hw/timer/aspeed_timer.c +0 -0
             int64_t delta = (int64_t) value - (int64_t)

calculate_ticks(t, now);

Quoted 9 lines
hw/timer/aspeed_timer.c +2 -1
             uint32_t rate = calculate_rate(t);
 
-            t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
+            t->start = (int64_t)t->start +
+                ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
             aspeed_timer_mod(t);
         }
         break;
#8 lore raw

Re: [Qemu-devel] [PATCH 5/5] aspeed/timer: Use signed muldiv for timer resets

Quoted 4 lines · Christian Svensson

Hi all,

I have a new patch but I'm not sure how you want me to post it. Should I do a "PATCH v2" with a single patch and this thread as the thread ID?

I would wait for feedback from Peter first.

Thanks,

C.

Quoted 52 lines

Thanks,
- Chris

On Thu, Mar 14, 2019 at 10:05 AM Cédric Le Goater <[email protected] <mailto:[email protected]>> wrote:

    Christian,

    Could you please provide a fix for this patch ? patchew complains, see
    attached log.

    Thanks,

    C.

    On 3/14/19 9:42 AM, Cédric Le Goater wrote:
    > From: Christian Svensson <[email protected] <mailto:[email protected]>>
    >
    > If the host decrements the counter register that results in a negative
    > delta. This is then passed to muldiv64 which only handles unsigned
    > numbers resulting in bogus results.
    >
    > This fix ensures the data being operated on is signed before it is
    > ultimately casted to the final unsigned value.
    >
    > Test case: kexec a kernel using aspeed_timer and it will freeze on the
    > second bootup when the kernel initializes the timer. With this patch
    > that no longer happens and the timer appears to run OK.
    >
    > Signed-off-by: Christian Svensson <[email protected] <mailto:[email protected]>>
    > [clg: - checkpatch fixes ]
    > Signed-off-by: Cédric Le Goater <[email protected] <mailto:[email protected]>>
    > ---
    >  hw/timer/aspeed_timer.c | 3 ++-
    >  1 file changed, 2 insertions(+), 1 deletion(-)
    >
    > diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
    > index 9988b8fbbf17..0b16eac8970c 100644
    > --- a/hw/timer/aspeed_timer.c
    > +++ b/hw/timer/aspeed_timer.c
    > @@ -275,7 +275,8 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
    >              int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
    >              uint32_t rate = calculate_rate(t);
    > 
    > -            t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
    > +            t->start = (int64_t)t->start +
    > +                ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
    >              aspeed_timer_mod(t);
    >          }
    >          break;
    >
#9 lore raw

Re: [Qemu-arm] [PATCH 5/5] aspeed/timer: Use signed muldiv for timer resets

In reply to Cédric Le Goater
Quoted 26 lines · Cédric Le Goater

From: Christian Svensson <[email protected]>

If the host decrements the counter register that results in a negative delta. This is then passed to muldiv64 which only handles unsigned numbers resulting in bogus results.

This fix ensures the data being operated on is signed before it is ultimately casted to the final unsigned value.

Test case: kexec a kernel using aspeed_timer and it will freeze on the second bootup when the kernel initializes the timer. With this patch that no longer happens and the timer appears to run OK.

[clg: - checkpatch fixes ]
---
 hw/timer/aspeed_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/timer/aspeed_timer.c +0 -0
index 9988b8fbbf17..0b16eac8970c 100644

hw/timer/aspeed_timer.c static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg, · line 280

Quoted 7 lines
hw/timer/aspeed_timer.c +2 -1
@@ -275,7 +275,8 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
             uint32_t rate = calculate_rate(t);
 
-            t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
+            t->start = (int64_t)t->start +
+                ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
             aspeed_timer_mod(t);

You can't guarantee that __int128_t exists. If you must use it then you need an alternate code path for the ifndef CONFIG_INT128 case (which is going to be complicated enough that this should really be abstracted away into a signed version of muldiv64().)

But overall I'm a little sceptical that the aspeed timer is really a special case that needs a signed version of this when no other timer in the system does...

thanks
-- PMM

#10 lore raw

Re: [Qemu-arm] [PATCH 5/5] aspeed/timer: Use signed muldiv for timer resets

Thanks for the feedback,

Quoted 3 lines · On Thu, Mar 14, 2019, 11:57 Peter Maydell <[email protected]> wrote:

But overall I'm a little sceptical that the aspeed timer is really a special case that needs a signed version of this when no other timer in the system does...

I agree, and the v2 of the patch doesn't require it. Happy to submit it when you folks think it's a good time to merge it.

If you're curious you can get a sneak peek of the patch in
https://github.com/u-root/u-bmc/issues/134.

Regards,

#11 lore raw
In reply to Cédric Le Goater
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

CC migration/xbzrle.o
CC migration/postcopy-ram.o
/tmp/qemu-test/src/hw/timer/aspeed_timer.c: In function 'aspeed_timer_set_value':
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: error: '__int128_t' undeclared (first use in this function); did you mean '__int128'?

                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                   ^~~~~~~~~~
                   __int128
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: note: each undeclared identifier is reported only once for each function it appears in
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:30: error: expected ')' before 'delta'
                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                 ~            ^~~~~
                              )
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:276:22: error: unused variable 'rate' [-Werror=unused-variable]
             uint32_t rate = calculate_rate(t);
                      ^~~~
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:275:21: error: unused variable 'delta' [-Werror=unused-variable]
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
                     ^~~~~

cc1: all warnings being treated as errors

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#12 lore raw

Hello,

For the time being, we can drop patch 5 from this series.

Thanks,

C.

Quoted 42 lines · On 3/14/19 9:59 AM, [email protected] wrote:

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

CC migration/xbzrle.o
CC migration/postcopy-ram.o
/tmp/qemu-test/src/hw/timer/aspeed_timer.c: In function 'aspeed_timer_set_value':
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: error: '__int128_t' undeclared (first use in this function); did you mean '__int128'?

                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                   ^~~~~~~~~~
                   __int128
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: note: each undeclared identifier is reported only once for each function it appears in
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:30: error: expected ')' before 'delta'
                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                 ~            ^~~~~
                              )
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:276:22: error: unused variable 'rate' [-Werror=unused-variable]
             uint32_t rate = calculate_rate(t);
                      ^~~~
/tmp/qemu-test/src/hw/timer/aspeed_timer.c:275:21: error: unused variable 'delta' [-Werror=unused-variable]
             int64_t delta = (int64_t) value - (int64_t) calculate_ticks(t, now);
                     ^~~~~

cc1: all warnings being treated as errors

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#13 lore raw

Hi,

My apologies, I don't know how I missed those warnings. I'll create a new patch.

- Chris

Quoted 65 lines · Cédric Le Goater

Hello,

For the time being, we can drop patch 5 from this series.

Thanks,

C.

Quoted 1 line · On 3/14/19 9:59 AM, [email protected] wrote:

Patchew URL:

https://patchew.org/QEMU/[email protected]/

Quoted 6 lines

Hi,

This series failed the docker-mingw@fedora build test. Please find the

testing commands and

Quoted 1 line

their output below. If you have Docker installed, you can probably

reproduce it

Quoted 10 lines

locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

CC migration/xbzrle.o
CC migration/postcopy-ram.o
/tmp/qemu-test/src/hw/timer/aspeed_timer.c: In function

'aspeed_timer_set_value':

Quoted 1 line

/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: error: '__int128_t'

undeclared (first use in this function); did you mean '__int128'?

Quoted 4 lines
                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                   ^~~~~~~~~~
                   __int128

/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:19: note: each undeclared

identifier is reported only once for each function it appears in

Quoted 1 line

/tmp/qemu-test/src/hw/timer/aspeed_timer.c:279:30: error: expected ')'

before 'delta'

Quoted 4 lines
                 ((__int128_t)delta * NANOSECONDS_PER_SECOND / rate);
                 ~            ^~~~~
                              )

/tmp/qemu-test/src/hw/timer/aspeed_timer.c:276:22: error: unused

variable 'rate' [-Werror=unused-variable]

Quoted 3 lines
             uint32_t rate = calculate_rate(t);
                      ^~~~

/tmp/qemu-test/src/hw/timer/aspeed_timer.c:275:21: error: unused

variable 'delta' [-Werror=unused-variable]

Quoted 1 line
             int64_t delta = (int64_t) value - (int64_t)

calculate_ticks(t, now);

Quoted 6 lines
                     ^~~~~

cc1: all warnings being treated as errors

The full log is available at

http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message
.

Quoted 4 lines

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]