Skip to contentSkip to conversation

hw/ptimer: Do not artificially limit timers when using icount

PATCH In review Edgar E. Iglesias 2 participants 3 messages May 4, 2015 – May 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/ptimer: Do not artificially limit timers when using icount

From: "Edgar E. Iglesias" <[email protected]>

---
 hw/core/ptimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/ptimer.c +1 -1
index 2abad1f..8437bd6 100644
@@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
      * on the current generation of host machines.
      */
 
-    if (limit * s->period < 10000 && s->period) {
+    if (!use_icount && limit * s->period < 10000 && s->period) {
         limit = 10000 / s->period;
     }
 
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

---
 hw/core/ptimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/ptimer.c +0 -0
index 2abad1f..8437bd6 100644

hw/core/ptimer.c void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload) · line 195

Quoted 8 lines
hw/core/ptimer.c +1 -1
@@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
      * on the current generation of host machines.
      */
 
-    if (limit * s->period < 10000 && s->period) {
+    if (!use_icount && limit * s->period < 10000 && s->period) {
         limit = 10000 / s->period;
     }
 
#2 lore raw
Quoted 18 lines · Paolo Bonzini
Quoted 15 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

---
 hw/core/ptimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/ptimer.c +0 -0
index 2abad1f..8437bd6 100644
@@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
      * on the current generation of host machines.
      */
 
Quoted 8 lines

hw/core/ptimer.c void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload) · line 195

Quoted 6 lines
hw/core/ptimer.c +1 -1
-    if (limit * s->period < 10000 && s->period) {
+    if (!use_icount && limit * s->period < 10000 && s->period) {
         limit = 10000 / s->period;
     }
 

Thanks, I've applied this one.

Cheers,
Edgar