Home
last modified time | relevance | path

Searched full:limit (Results 1 – 25 of 425) sorted by relevance

12345678910>>...17

/qemu/include/qemu/
H A Dratelimit.h40 static inline int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n) in ratelimit_calculate_delay() argument
45 QEMU_LOCK_GUARD(&limit->lock); in ratelimit_calculate_delay()
46 if (!limit->slice_quota) { in ratelimit_calculate_delay()
50 assert(limit->slice_ns); in ratelimit_calculate_delay()
52 if (limit->slice_end_time < now) { in ratelimit_calculate_delay()
55 limit->slice_start_time = now; in ratelimit_calculate_delay()
56 limit->slice_end_time = now + limit->slice_ns; in ratelimit_calculate_delay()
57 limit->dispatched = 0; in ratelimit_calculate_delay()
60 limit->dispatched += n; in ratelimit_calculate_delay()
61 if (limit->dispatched < limit->slice_quota) { in ratelimit_calculate_delay()
[all …]
H A Dthrottle-options.h39 .help = "limit total I/O operations per second",\
43 .help = "limit read operations per second",\
47 .help = "limit write operations per second",\
51 .help = "limit total bytes per second",\
55 .help = "limit read bytes per second",\
59 .help = "limit write bytes per second",\
/qemu/hw/timer/
H A Dslavio_timer.c59 uint64_t limit; member
109 uint64_t count, limit; in slavio_timer_get_out() local
111 if (t->limit == 0) { /* free-run system or processor counter */ in slavio_timer_get_out()
112 limit = TIMER_MAX_COUNT32; in slavio_timer_get_out()
114 limit = t->limit; in slavio_timer_get_out()
116 count = limit - PERIODS_TO_LIMIT(ptimer_get_count(t->timer)); in slavio_timer_get_out()
118 trace_slavio_timer_get_out(t->limit, t->counthigh, t->count); in slavio_timer_get_out()
132 /* if limit is 0 (free-run), there will be no match */ in slavio_timer_irq()
133 if (t->limit != 0) { in slavio_timer_irq()
137 if (!slavio_timer_is_user(tc) && t->limit != 0) { in slavio_timer_irq()
[all …]
H A Darm_timer.c35 uint32_t limit; member
60 return s->limit; in arm_timer_read()
79 * Reset the timer limit after settings have changed.
84 uint32_t limit; in arm_timer_recalibrate() local
89 limit = 0xffffffff; in arm_timer_recalibrate()
91 limit = 0xffff; in arm_timer_recalibrate()
94 limit = s->limit; in arm_timer_recalibrate()
96 ptimer_set_limit(s->timer, limit, reload); in arm_timer_recalibrate()
107 s->limit = value; in arm_timer_write()
143 s->limit = value; in arm_timer_write()
[all …]
H A Dimx_epit.c176 uint64_t limit = ptimer_get_limit(s->timer_cmp); in imx_epit_update_compare_timer() local
178 * The compare timer is a periodic timer if the limit is at least in imx_epit_update_compare_timer()
182 is_oneshot = (limit < s->cmp); in imx_epit_update_compare_timer()
190 * value calculated below can be above the 32-bit limit, which in imx_epit_update_compare_timer()
194 counter += limit - s->cmp; in imx_epit_update_compare_timer()
197 * The compare timer won't fire in this round, and the limit is in imx_epit_update_compare_timer()
254 uint64_t limit = (s->cr & CR_RLD) ? s->lr : EPIT_TIMER_MAX; in imx_epit_write_cr() local
255 ptimer_set_limit(s->timer_reload, limit, set_counter ? 1 : 0); in imx_epit_write_cr()
257 ptimer_set_limit(s->timer_cmp, limit, 0); in imx_epit_write_cr()
301 /* Also set the limit if the LRD bit is set */ in imx_epit_write_lr()
/qemu/docs/devel/migration/
H A Ddirty-limit.rst1 Dirty limit
4 The dirty limit, short for dirty page rate upper limit, is a new capability
36 page rate value and the corresponding upper limit of the VM:
40 limit is specified by caller, therefore fetch it directly.
47 rate progressively down to the upper limit without oscillation. To
50 to the limit, which is used when the current dirty page rate is far
51 from the limit; the second is to add or subtract a fixed time when
52 the current dirty page rate is close to the limit.
60 to step PREPARE (1) until the dirty limit is reached.
68 In summary, thanks to the KVM dirty ring technology, the dirty limit
[all …]
/qemu/target/i386/hvf/
H A Dx86.c54 uint32_t limit; in x86_read_segment_descriptor() local
65 limit = rvmcs(cpu->accel->fd, VMCS_GUEST_GDTR_LIMIT); in x86_read_segment_descriptor()
68 limit = rvmcs(cpu->accel->fd, VMCS_GUEST_LDTR_LIMIT); in x86_read_segment_descriptor()
71 if (sel.index * 8 >= limit) { in x86_read_segment_descriptor()
84 uint32_t limit; in x86_write_segment_descriptor() local
88 limit = rvmcs(cpu->accel->fd, VMCS_GUEST_GDTR_LIMIT); in x86_write_segment_descriptor()
91 limit = rvmcs(cpu->accel->fd, VMCS_GUEST_LDTR_LIMIT); in x86_write_segment_descriptor()
94 if (sel.index * 8 >= limit) { in x86_write_segment_descriptor()
95 printf("%s: gdt limit\n", __func__); in x86_write_segment_descriptor()
106 uint32_t limit = rvmcs(cpu->accel->fd, VMCS_GUEST_IDTR_LIMIT); in x86_read_call_gate() local
[all …]
H A Dx86_descr.c28 .limit = VMCS_GUEST_##seg##_LIMIT, \
35 int limit; member
50 return (uint32_t)rvmcs(cpu->accel->fd, vmx_segment_fields[seg].limit); in vmx_read_segment_limit()
79 desc->limit = rvmcs(cpu->accel->fd, vmx_segment_fields[seg].limit); in vmx_read_segment_descriptor()
88 wvmcs(cpu->accel->fd, sf->limit, desc->limit); in vmx_write_segment_descriptor()
99 vmx_desc->limit = x86_segment_limit(desc); in x86_segment_descriptor_to_vmx()
115 x86_set_segment_limit(desc, vmx_desc->limit); in vmx_segment_to_x86_descriptor()
/qemu/hw/core/
H A Dptimer.c25 uint64_t limit; member
83 delta = s->delta = s->limit; in ptimer_reload()
102 if (s->enabled == 1 && s->limit == 0) { in ptimer_reload()
114 if (s->enabled == 1 && s->limit != 0) { in ptimer_reload()
133 * Artificially limit timeout rate to something in ptimer_reload()
175 if (s->delta == 0 || s->limit == 0) { in ptimer_tick()
176 /* If a "continuous trigger" policy is not used and limit == 0, in ptimer_tick()
189 s->delta = s->limit; in ptimer_tick()
265 if (!oneshot && s->delta == s->limit) { in ptimer_get_count()
270 if (counter == s->limit + DELTA_ADJUST) { in ptimer_get_count()
[all …]
/qemu/tests/migration-stress/guestperf/
H A Dcomparison.py139 # Looking at effect of dirty-limit with
141 Comparison("compr-dirty-limit-period", scenarios = [
142 Scenario("compr-dirty-limit-period-500",
144 Scenario("compr-dirty-limit-period-800",
146 Scenario("compr-dirty-limit-period-1000",
151 # Looking at effect of dirty-limit with
153 Comparison("compr-dirty-limit", scenarios = [
154 Scenario("compr-dirty-limit-10MB",
156 Scenario("compr-dirty-limit-20MB",
158 Scenario("compr-dirty-limit-50MB",
/qemu/hw/pci/
H A Dpci_host.c57 static void pci_adjust_config_limit(PCIBus *bus, uint32_t *limit) in pci_adjust_config_limit() argument
59 if ((*limit > PCI_CONFIG_SPACE_SIZE) && in pci_adjust_config_limit()
61 *limit = PCI_CONFIG_SPACE_SIZE; in pci_adjust_config_limit()
77 uint32_t limit, uint32_t val, uint32_t len) in pci_host_config_write_common() argument
79 pci_adjust_config_limit(pci_get_bus(pci_dev), &limit); in pci_host_config_write_common()
80 if (limit <= addr) { in pci_host_config_write_common()
96 pci_dev->config_write(pci_dev, addr, val, MIN(len, limit - addr)); in pci_host_config_write_common()
100 uint32_t limit, uint32_t len) in pci_host_config_read_common() argument
104 pci_adjust_config_limit(pci_get_bus(pci_dev), &limit); in pci_host_config_read_common()
105 if (limit <= addr) { in pci_host_config_read_common()
[all …]
H A Dpci_bridge.c128 /* accessor function to get bridge filtering limit */
131 pcibus_t limit; in pci_bridge_get_limit() local
133 limit = pci_config_get_io_base(bridge, in pci_bridge_get_limit()
135 limit |= 0xfff; /* PCI bridge spec 3.2.5.6. */ in pci_bridge_get_limit()
138 limit = pci_config_get_pref_base( in pci_bridge_get_limit()
141 limit = pci_config_get_memory_base(bridge, PCI_MEMORY_LIMIT); in pci_bridge_get_limit()
143 limit |= 0xfffff; /* PCI bridge spec 3.2.5.{1, 8}. */ in pci_bridge_get_limit()
145 return limit; in pci_bridge_get_limit()
156 pcibus_t limit = pci_bridge_get_limit(bridge_dev, type); in pci_bridge_init_alias() local
157 /* TODO: this doesn't handle base = 0 limit = 2^64 - 1 correctly. in pci_bridge_init_alias()
[all …]
H A Dpcie_host.c42 uint32_t limit; in pcie_mmcfg_data_write() local
48 limit = pci_config_size(pci_dev); in pcie_mmcfg_data_write()
49 pci_host_config_write_common(pci_dev, addr, limit, val, len); in pcie_mmcfg_data_write()
60 uint32_t limit; in pcie_mmcfg_data_read() local
66 limit = pci_config_size(pci_dev); in pcie_mmcfg_data_read()
67 return pci_host_config_read_common(pci_dev, addr, limit, len); in pcie_mmcfg_data_read()
/qemu/target/i386/tcg/system/
H A Dsmm_helper.c62 x86_stl_phys(cs, sm_state + offset + 4, dt->limit); in do_smm_enter()
67 x86_stl_phys(cs, sm_state + 0x7e64, env->gdt.limit); in do_smm_enter()
71 x86_stl_phys(cs, sm_state + 0x7e74, env->ldt.limit); in do_smm_enter()
75 x86_stl_phys(cs, sm_state + 0x7e84, env->idt.limit); in do_smm_enter()
79 x86_stl_phys(cs, sm_state + 0x7e94, env->tr.limit); in do_smm_enter()
128 x86_stl_phys(cs, sm_state + 0x7f60, env->tr.limit); in do_smm_enter()
133 x86_stl_phys(cs, sm_state + 0x7f7c, env->ldt.limit); in do_smm_enter()
137 x86_stl_phys(cs, sm_state + 0x7f70, env->gdt.limit); in do_smm_enter()
140 x86_stl_phys(cs, sm_state + 0x7f54, env->idt.limit); in do_smm_enter()
151 x86_stl_phys(cs, sm_state + offset + 4, dt->limit); in do_smm_enter()
[all …]
/qemu/hw/sensor/
H A Dtmp105.c57 if (s->temperature < s->limit[0]) { in tmp105_alarm_update()
62 if (s->temperature >= s->limit[1]) { in tmp105_alarm_update()
74 if (s->temperature < s->limit[0]) { in tmp105_alarm_update()
79 if (s->temperature >= s->limit[1]) { in tmp105_alarm_update()
145 s->buf[s->len++] = ((uint16_t) s->limit[0]) >> 8; in tmp105_read()
146 s->buf[s->len++] = ((uint16_t) s->limit[0]) >> 0; in tmp105_read()
150 s->buf[s->len++] = ((uint16_t) s->limit[1]) >> 8; in tmp105_read()
151 s->buf[s->len++] = ((uint16_t) s->limit[1]) >> 0; in tmp105_read()
178 s->limit[s->pointer & 1] = (int16_t) in tmp105_write()
271 VMSTATE_INT16_ARRAY(limit, TMP105State, 2),
[all …]
/qemu/include/hw/
H A Dptimer.h20 * can be set to either reload itself from a specified limit value
56 * is running causes a trigger and reloads counter with a limit value.
57 * If limit = 0, ptimer emits error message and stops the timer.
71 /* Running periodic timer that has counter = limit = 0 would continuously
215 * ptimer_get_limit - Get the configured limit of the ptimer
218 * This function returns the current limit (reload) value
224 * and set limit functions rather than needing to also track it
230 * ptimer_set_limit - Set the limit of the ptimer
232 * @limit: initial countdown value
233 * @reload: if nonzero, then reset the counter to the new limit
[all …]
/qemu/tests/qtest/migration/
H A Dprecopy-tests.c843 "{ 'execute': 'set-vcpu-dirty-limit'," in dirtylimit_set_all()
852 "{ 'execute': 'cancel-vcpu-dirty-limit' }"); in cancel_vcpu_dirty_limit()
859 rsp = qtest_qmp(who, "{ 'execute': 'query-vcpu-dirty-limit' }"); in query_vcpu_dirty_limit()
951 dirtyrate = qdict_get_try_int(rate, "limit-rate", -1); in get_limit_rate()
1017 * Check if set-vcpu-dirty-limit and query-vcpu-dirty-limit in test_vcpu_dirty_limit()
1075 /* Enable dirty limit capability */ in migrate_dirty_limit_wait_showup()
1076 migrate_set_capability(from, "dirty-limit", true); in migrate_dirty_limit_wait_showup()
1078 /* Set dirty limit parameters */ in migrate_dirty_limit_wait_showup()
1079 migrate_set_parameter_int(from, "x-vcpu-dirty-limit-period", period); in migrate_dirty_limit_wait_showup()
1080 migrate_set_parameter_int(from, "vcpu-dirty-limit", value); in migrate_dirty_limit_wait_showup()
[all …]
/qemu/hw/sparc64/
H A Dtrace-events22 … char *dis, void *p, uint64_t limit, uint64_t t, uint64_t dt) "%s set_limit limit=0x%"PRIx64 " (%s…
23 sparc64_cpu_tick_set_limit_zero(const char *name) "%s set_limit limit=ZERO - not starting timer"
/qemu/util/
H A Dblock-helpers.h6 /* lower limit is sector size */
10 * upper limit is arbitrary, 2 MiB looks sufficient for all sensible uses, and
11 * matches qcow2 cluster size limit
/qemu/qapi/
H A Dmigration.json251 # @dirty-limit-throttle-time-per-round: Maximum throttle time (in
253 # shows how MigrationCapability dirty-limit affects the guest
256 # @dirty-limit-ring-full-time: Estimated average dirty ring full time
279 '*dirty-limit-throttle-time-per-round': 'uint64',
280 '*dirty-limit-ring-full-time': 'uint64'} }
472 # @dirty-limit: If enabled, migration will throttle vCPUs as needed to
473 # keep their dirty page rate within @vcpu-dirty-limit. This can
501 'dirty-limit', 'mapped-ram'] }
805 # not limit the bandwidth during switchover, but only for
814 # @downtime-limit: set maximum tolerated downtime for migration.
[all …]
/qemu/system/
H A Ddirtylimit.c2 * Dirty page rate limit implementation code
442 * dirty page rate limit is not allowed to set if migration
443 * is running with dirty-limit capability enabled.
470 error_setg(errp, "can't cancel dirty page rate limit while" in qmp_cancel_vcpu_dirty_limit()
506 "dirty limit for virtual CPU]\n"); in hmp_cancel_vcpu_dirty_limit()
515 error_setg(errp, "dirty page limit feature requires KVM with" in qmp_set_vcpu_dirty_limit()
526 error_setg(errp, "can't set dirty page rate limit while" in qmp_set_vcpu_dirty_limit()
558 error_setg(&err, "invalid dirty page limit %" PRId64, dirty_rate); in hmp_set_vcpu_dirty_limit()
657 monitor_printf(mon, "Dirty page limit not enabled!\n"); in hmp_info_vcpu_dirty_limit()
668 monitor_printf(mon, "vcpu[%"PRIi64"], limit rate %"PRIi64 " (MB/s)," in hmp_info_vcpu_dirty_limit()
/qemu/migration/
H A Dmigration-stats.c49 void migration_rate_set(uint64_t limit) in migration_rate_set() argument
52 * 'limit' is per second. But we check it each BUFFER_DELAY milliseconds. in migration_rate_set()
54 stat64_set(&mig_stats.rate_limit_max, limit / XFER_LIMIT_RATIO); in migration_rate_set()
/qemu/qobject/
H A Djson-streamer.c66 * Security consideration, we limit total memory allocated per object in json_message_process_token()
70 error_setg(&err, "JSON token size limit exceeded"); in json_message_process_token()
74 error_setg(&err, "JSON token count limit exceeded"); in json_message_process_token()
78 error_setg(&err, "JSON nesting depth limit exceeded"); in json_message_process_token()
/qemu/tests/qtest/migration/i386/
H A Da-b-bootblock.S62 # bl keeps a counter so we limit the output speed
121 * base = 0x00000000, limit = 0xFFFFF (4 KiB Granularity), present
128 * base = 0x00000000, limit 0xFFFFF (4 KiB Granularity), present
135 .word 0x27 /* limit */
/qemu/target/i386/emulate/
H A Dx86.h153 uint32_t limit = (uint32_t)((desc->limit1 << 16) | desc->limit0); in x86_segment_limit() local
155 return (limit << 12) | 0xfff; in x86_segment_limit()
157 return limit; in x86_segment_limit()
161 uint32_t limit) in x86_set_segment_limit() argument
163 desc->limit0 = limit & 0xffff; in x86_set_segment_limit()
164 desc->limit1 = limit >> 16; in x86_set_segment_limit()

12345678910>>...17