Skip to contentSkip to conversation

libxl: Made it possible to use 'timer='delay_for_missed_ticks'

PATCH Applied Konrad Rzeszutek Wilk 3 participants 4 messages Feb 25, 2013 – Feb 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Made it possible to use 'timer='delay_for_missed_ticks'

The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 1 (delay_for_missed_ticks) for the timer configuration option.

---
 tools/libxl/libxl_dom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dom.c +1 -1
index e1cd9a4..de555ee 100644
@@ -417,7 +417,7 @@ out:
 static unsigned long timer_mode(const libxl_domain_build_info *info)
 {
     const libxl_timer_mode mode = info->u.hvm.timer_mode;
-    assert(mode != LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
+    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
            mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
     return ((unsigned long)mode);
 }
Signature · 1 line
1.8.0.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Konrad Rzeszutek Wilk

The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 1 (delay_for_missed_ticks) for the timer configuration option.

Doh! That was very likely a brainfart by me...

Quoted 1 line
Quoted 17 lines
---
 tools/libxl/libxl_dom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dom.c +1 -1
index e1cd9a4..de555ee 100644
@@ -417,7 +417,7 @@ out:
 static unsigned long timer_mode(const libxl_domain_build_info *info)
 {
     const libxl_timer_mode mode = info->u.hvm.timer_mode;
-    assert(mode != LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
+    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
            mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
     return ((unsigned long)mode);
 }
author Acked-by Ian Campbell
#2 lore raw
Quoted 4 lines · Ian Campbell
Quoted 3 lines · Konrad Rzeszutek Wilk

The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 1 (delay_for_missed_ticks) for the timer configuration

                     ^- 0
Quoted 3 lines
Quoted 1 line

option.

Doh! That was very likely a brainfart by me...

And by me in the git commit description :-(

Quoted 7 lines
Quoted 2 lines

From 4f7bd24184f98b4cf53cd8a24b89829c17ca3d1d Mon Sep 17 00:00:00 2001

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Mon, 25 Feb 2013 11:30:18 -0500
Subject: [PATCH] libxl: Made it possible to use
'timer='delay_for_missed_ticks'

The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 0 (delay_for_missed_ticks) for the timer configuration option.

---
 tools/libxl/libxl_dom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_dom.c +1 -1
index e1cd9a4..de555ee 100644
@@ -417,7 +417,7 @@ out:
 static unsigned long timer_mode(const libxl_domain_build_info *info)
 {
     const libxl_timer_mode mode = info->u.hvm.timer_mode;
-    assert(mode != LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
+    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
            mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
     return ((unsigned long)mode);
 }
Signature · 1 line
1.8.0.2
Applied
#3 lore raw

Konrad Rzeszutek Wilk writes ("Re: [Xen-devel] [PATCH] libxl: Made it possible to use 'timer='delay_for_missed_ticks'"):

Quoted 4 lines · Ian Campbell
Quoted 1 line

Doh! That was very likely a brainfart by me...

And by me in the git commit description :-(

Heh.

Quoted 5 lines

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Mon, 25 Feb 2013 11:30:18 -0500
Subject: [PATCH] libxl: Made it possible to use
'timer='delay_for_missed_ticks'

Quoted 7 lines

The assertion only allows values of 1 (no_delay_for_missed_ticks) up to 3 (one_missed_tick_pending). It should be possible to use the value of 0 (delay_for_missed_ticks) for the timer configuration option.

Applied, thanks.

Ian.