Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 1204) sorted by relevance

12345678910>>...49

/qemu/linux-user/
H A Duaccess.c19 host_addr = g_memdup(host_addr, len); in lock_user()
21 host_addr = g_malloc0(len); in lock_user()
39 if (len > 0) { in unlock_user()
48 ssize_t len = target_strlen(guest_addr); in lock_user_string() local
49 if (len < 0) { in lock_user_string()
65 memcpy(hptr, ghptr, len); in copy_from_user()
79 memcpy(ghptr, hptr, len); in copy_to_user()
80 unlock_user(ghptr, gaddr, len); in copy_to_user()
94 size_t max_len, len; in target_strlen() local
104 guest_addr += len; in target_strlen()
[all …]
H A Dmmap.c184 if (len == 0) { in target_mprotect()
187 len = TARGET_PAGE_ALIGN(len); in target_mprotect()
192 last = start + len - 1; in target_mprotect()
704 do_munmap(p + len, host_len - len); in mmap_h_lt_g()
914 if (!len) { in target_mmap()
926 len = TARGET_PAGE_ALIGN(len); in target_mmap()
927 if (!len || len != (size_t)len) { in target_mmap()
1039 len = TARGET_PAGE_ALIGN(len); in target_munmap()
1040 if (len == 0 || !guest_range_valid_untagged(start, len)) { in target_munmap()
1151 abi_ulong len; in target_madvise() local
[all …]
H A Dlinuxload.c17 host_ptr = lock_user(VERIFY_WRITE, dest, len, 0); in memcpy_to_target()
21 memcpy(host_ptr, src, len); in memcpy_to_target()
188 if (offset + len <= img->cache_size) { in imgsrc_read()
189 memcpy(dst, img->cache + offset, len); in imgsrc_read()
198 ret = pread(img->fd, dst, len, offset); in imgsrc_read()
199 if (ret == len) { in imgsrc_read()
213 void *alloc = g_malloc(len); in imgsrc_read_alloc()
250 if (offset + len <= src->cache_size) { in imgsrc_mmap()
255 memset(haddr + rest, 0, len - rest); in imgsrc_mmap()
257 unlock_user(haddr, start, len); in imgsrc_mmap()
[all …]
/qemu/util/
H A Dbufferiszero.c30 buffer_zero_int(const void *buf, size_t len) in buffer_zero_int() argument
32 if (unlikely(len < 8)) { in buffer_zero_int()
35 const unsigned char *e = buf + len; in buffer_zero_int()
61 t |= ldq_he_p(buf + len - 8); in buffer_zero_int()
97 t |= _mm_loadu_si128(buf + len - 16); in buffer_zero_sse2()
126 t |= _mm_loadu_si128(buf + len - 16); in buffer_zero_sse4()
216 unsigned len; in select_accel_cpuinfo() member
262 return buffer_accel(buf, len); in select_accel_fn()
264 return buffer_zero_int(buf, len); in select_accel_fn()
280 if (unlikely(len == 0)) { in buffer_is_zero()
[all …]
H A Duri.c1088 int len; in uri_to_string() local
1097 len = 0; in uri_to_string()
1102 if (len >= max) { in uri_to_string()
1108 if (len >= max) { in uri_to_string()
1112 ret[len++] = ':'; in uri_to_string()
1137 ret[len++] = '/'; in uri_to_string()
1138 ret[len++] = '/'; in uri_to_string()
1177 len += snprintf(&ret[len], max - len, ":%d", uri->port); in uri_to_string()
1271 ret[len++] = '#'; in uri_to_string()
1289 if (len >= max) { in uri_to_string()
[all …]
H A Dcacheflush.c79 size_t len = sizeof(size); in sys_cache_info() local
90 size_t len = sizeof(size); in sys_cache_info() local
250 sys_dcache_flush((void *)rw, len); in flush_idcache_range()
252 sys_icache_invalidate((void *)rx, len); in flush_idcache_range()
311 cacheflush((void *)rw, len, DCACHE); in flush_idcache_range()
313 cacheflush((void *)rx, len, ICACHE); in flush_idcache_range()
341 e = (rw + len + dsize - 1) & ~(dsize - 1); in flush_idcache_range()
348 e = (rx + len + isize - 1) & ~(isize - 1); in flush_idcache_range()
361 uintptr_t p, end = (rx + len + 7) & -8; in flush_idcache_range()
372 __builtin___clear_cache((char *)rw, (char *)rw + len); in flush_idcache_range()
[all …]
H A Dguest-random.c24 static int glib_random_bytes(void *buf, size_t len) in glib_random_bytes() argument
35 for (i = 0; i + 4 <= len; i += 4) { in glib_random_bytes()
39 if (i < len) { in glib_random_bytes()
41 __builtin_memcpy(buf + i, &x, len - i); in glib_random_bytes()
46 int qemu_guest_getrandom(void *buf, size_t len, Error **errp) in qemu_guest_getrandom() argument
50 return replay_read_random(buf, len); in qemu_guest_getrandom()
54 ret = glib_random_bytes(buf, len); in qemu_guest_getrandom()
57 ret = qcrypto_random_bytes(buf, len, errp); in qemu_guest_getrandom()
60 replay_save_random(ret, buf, len); in qemu_guest_getrandom()
65 void qemu_guest_getrandom_nofail(void *buf, size_t len) in qemu_guest_getrandom_nofail() argument
[all …]
/qemu/hw/i386/kvm/
H A Dxen_xenstore.c512 if (len == 0 || req_data[len - 1] != '\0') { in xs_read()
529 len = data->len; in xs_read()
536 rsp->len += len; in xs_read()
584 if (len == 0 || req_data[len - 1] != '\0') { in xs_mkdir()
638 memcpy(&rsp_data[rsp->len], str, len); in xs_append_strings()
639 rsp->len += len; in xs_append_strings()
1292 memcpy(&rsp_data[rsp->len], path, len); in deliver_watch()
1293 rsp->len += len; in deliver_watch()
1307 memcpy(&rsp_data[rsp->len], token, len); in deliver_watch()
1308 rsp->len += len; in deliver_watch()
[all …]
/qemu/hw/scsi/
H A Desp.c204 int len; in esp_fifo8_pop_buf() local
217 len -= n; in esp_fifo8_pop_buf()
218 len = MIN(len, fifo8_num_used(fifo)); in esp_fifo8_pop_buf()
219 if (len) { in esp_fifo8_pop_buf()
522 len = MIN(len, fifo8_num_free(&s->cmdfifo)); in esp_do_dma()
527 len = MIN(fifo8_num_free(&s->cmdfifo), len); in esp_do_dma()
705 len = MIN(len, 1); in esp_do_dma()
739 len = MIN(len, 1); in esp_do_dma()
764 int len; in esp_nodma_ti_dataout() local
774 len = MIN(len, fifo8_num_used(&s->fifo)); in esp_nodma_ti_dataout()
[all …]
/qemu/semihosting/
H A Duaccess.c17 void *p = malloc(len); in uaccess_lock_user()
30 size_t len = 0; in uaccess_strlen_user() local
52 return len; in uaccess_strlen_user()
55 len++; in uaccess_strlen_user()
56 if (len > INT32_MAX) { in uaccess_strlen_user()
63 len += p - (char *)h; in uaccess_strlen_user()
64 return len <= INT32_MAX ? (ssize_t)len : -1; in uaccess_strlen_user()
67 len += left_in_page; in uaccess_strlen_user()
68 if (len > INT32_MAX) { in uaccess_strlen_user()
78 if (len < 0) { in uaccess_lock_user_string()
[all …]
H A Dsyscalls.c135 if (len < 0) { in gdb_open()
191 if (len < 0) { in gdb_stat()
204 if (len < 0) { in gdb_remove()
238 if (len < 0) { in gdb_system()
554 if (len > rest) { in staticfile_read()
555 len = rest; in staticfile_read()
565 complete(cs, len, 0); in staticfile_read()
727 if (len > INT32_MAX) { in semihost_sys_read_gf()
728 len = INT32_MAX; in semihost_sys_read_gf()
768 if (len > INT32_MAX) { in semihost_sys_write_gf()
[all …]
/qemu/tests/qtest/
H A Dtest-filter-redirector.c64 uint32_t ret = 0, len = 0; in test_redirector_tx() local
114 ret = recv(recv_sock, &len, sizeof(len), 0); in test_redirector_tx()
115 g_assert_cmpint(ret, ==, sizeof(len)); in test_redirector_tx()
116 len = ntohl(len); in test_redirector_tx()
119 recv_buf = g_malloc(len); in test_redirector_tx()
121 g_assert_cmpint(ret, ==, len); in test_redirector_tx()
134 uint32_t ret = 0, len = 0; in test_redirector_rx() local
182 ret = recv(backend_sock[0], &len, sizeof(len), 0); in test_redirector_rx()
184 len = ntohl(len); in test_redirector_rx()
187 recv_buf = g_malloc(len); in test_redirector_rx()
[all …]
H A Dvirtio-net-test.c40 int len = htonl(sizeof(test)); in rx_test() local
43 .iov_base = &len, in rx_test()
44 .iov_len = sizeof(len), in rx_test()
75 uint32_t len; in tx_test() local
89 ret = recv(socket, &len, sizeof(len), 0); in tx_test()
91 len = ntohl(len); in tx_test()
94 g_assert_cmpint(ret, ==, len); in tx_test()
111 .iov_base = &len, in rx_stop_cont_test()
192 int len; in announce_self() local
208 ret = recv(sv[0], &len, sizeof(len), 0); in announce_self()
[all …]
/qemu/crypto/
H A Dhash-nettle.c51 size_t len; member
57 .len = MD5_DIGEST_SIZE,
63 .len = SHA1_DIGEST_SIZE,
69 .len = SHA224_DIGEST_SIZE,
75 .len = SHA256_DIGEST_SIZE,
81 .len = SHA384_DIGEST_SIZE,
87 .len = SHA512_DIGEST_SIZE,
133 size_t len = iov[i].iov_len; in qcrypto_nettle_hash_bytesv() local
135 while (len) { in qcrypto_nettle_hash_bytesv()
138 len -= shortlen; in qcrypto_nettle_hash_bytesv()
[all …]
H A Dhmac-nettle.c48 size_t len; member
54 .len = MD5_DIGEST_SIZE,
60 .len = SHA1_DIGEST_SIZE,
66 .len = SHA224_DIGEST_SIZE,
72 .len = SHA256_DIGEST_SIZE,
78 .len = SHA384_DIGEST_SIZE,
84 .len = SHA512_DIGEST_SIZE,
146 size_t len = iov[i].iov_len; in qcrypto_nettle_hmac_bytesv() local
148 while (len) { in qcrypto_nettle_hmac_bytesv()
151 len -= shortlen; in qcrypto_nettle_hmac_bytesv()
[all …]
H A Dcipher-builtin.c.inc40 if (unlikely(len & (blocksize - 1))) {
42 len, blocksize);
62 size_t len,
69 while (len) {
73 len -= AES_BLOCK_SIZE;
85 while (len) {
89 len -= AES_BLOCK_SIZE;
103 while (len) {
109 len -= AES_BLOCK_SIZE;
125 while (len) {
[all …]
/qemu/tests/qemu-iotests/tests/
H A Dzoned.out5 start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:1, [type: 2]
8 start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:1, [type: 2]
9 start: 0x80000, len 0x80000, cap 0x80000, wptr 0x80000, zcond:1, [type: 2]
10 start: 0x100000, len 0x80000, cap 0x80000, wptr 0x100000, zcond:1, [type: 2]
11 start: 0x180000, len 0x80000, cap 0x80000, wptr 0x180000, zcond:1, [type: 2]
12 start: 0x200000, len 0x80000, cap 0x80000, wptr 0x200000, zcond:1, [type: 2]
25 start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:3, [type: 2]
38 start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:1, [type: 2]
56 start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:1, [type: 2]
59 start: 0x0, len 0x80000, cap 0x80000, wptr 0x18, zcond:2, [type: 2]
[all …]
/qemu/include/standard-headers/linux/
H A Dinput.h117 uint8_t len; member
139 #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ argument
140 #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ argument
141 #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ argument
142 #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ argument
168 #define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) argument
170 #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ argument
171 #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ argument
172 #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ argument
173 #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ argument
[all …]
/qemu/hw/nvram/
H A Dspapr_nvram.c64 hwaddr offset, buffer, len; in OBJECT_DECLARE_SIMPLE_TYPE() local
80 len = rtas_ld(args, 2); in OBJECT_DECLARE_SIMPLE_TYPE()
82 if (((offset + len) < offset) in OBJECT_DECLARE_SIMPLE_TYPE()
93 cpu_physical_memory_unmap(membuf, len, 1, len); in OBJECT_DECLARE_SIMPLE_TYPE()
96 rtas_st(rets, 1, len); in OBJECT_DECLARE_SIMPLE_TYPE()
105 hwaddr offset, buffer, len; in rtas_nvram_store() local
121 len = rtas_ld(args, 2); in rtas_nvram_store()
123 if (((offset + len) < offset) in rtas_nvram_store()
139 cpu_physical_memory_unmap(membuf, len, 0, len); in rtas_nvram_store()
153 if (len < 0) { in spapr_nvram_realize()
[all …]
/qemu/include/sysemu/
H A Ddma.h76 return address_space_access_valid(as, addr, len, in dma_memory_valid()
95 return dma_memory_rw_relaxed(as, addr, buf, len, in dma_memory_read_relaxed()
103 dma_addr_t len) in dma_memory_write_relaxed() argument
105 return dma_memory_rw_relaxed(as, addr, (void *)buf, len, in dma_memory_write_relaxed()
130 return dma_memory_rw_relaxed(as, addr, buf, len, dir, attrs); in dma_memory_rw()
150 return dma_memory_rw(as, addr, buf, len, in dma_memory_read()
171 return dma_memory_rw(as, addr, (void *)buf, len, in dma_memory_write()
209 hwaddr xlen = *len; in dma_memory_map()
214 *len = xlen; in dma_memory_map()
236 address_space_unmap(as, buffer, (hwaddr)len, in dma_memory_unmap()
[all …]
/qemu/hw/sensor/
H A Dtmp421.c63 uint8_t len; member
173 s->len = 0; in tmp421_read()
183 s->buf[s->len++] = s->config[0]; in tmp421_read()
189 s->buf[s->len++] = s->rate; in tmp421_read()
192 s->buf[s->len++] = s->status; in tmp421_read()
251 if (s->len < 2) { in tmp421_rx()
252 return s->buf[s->len++]; in tmp421_rx()
262 if (s->len == 0) { in tmp421_tx()
266 s->len++; in tmp421_tx()
267 } else if (s->len == 1) { in tmp421_tx()
[all …]
/qemu/bsd-user/
H A Duaccess.c11 abi_long copy_from_user(void *hptr, abi_ulong gaddr, size_t len) in copy_from_user() argument
16 if ((ghptr = lock_user(VERIFY_READ, gaddr, len, 1))) { in copy_from_user()
17 memcpy(hptr, ghptr, len); in copy_from_user()
26 abi_long copy_to_user(abi_ulong gaddr, void *hptr, size_t len) in copy_to_user() argument
31 if ((ghptr = lock_user(VERIFY_WRITE, gaddr, len, 0))) { in copy_to_user()
32 memcpy(ghptr, hptr, len); in copy_to_user()
33 unlock_user(ghptr, gaddr, len); in copy_to_user()
46 int max_len, len; in target_strlen() local
54 len = qemu_strnlen((const char *)ptr, max_len); in target_strlen()
56 guest_addr += len; in target_strlen()
[all …]
/qemu/hw/char/
H A Dsclpconsole-lm.c128 int len; in get_console_data() local
132 len = cons->length; in get_console_data()
134 if (len > avail) { in get_console_data()
139 *size = len; in get_console_data()
205 return len; in write_console_data()
216 int len; in process_mdb() local
219 len = be16_to_cpu(mdbo->length); in process_mdb()
225 assert(len <= SIZE_BUFFER); in process_mdb()
238 int len; in write_event_data() local
253 while (len > 0) { in write_event_data()
[all …]
/qemu/tests/qemu-iotests/
H A D27197 unset c sc off len cmd
157 _run_test sc=0 len=1k
169 _run_test sc=3 len=2k
173 _run_test sc=4 len=6k
181 _run_test sc=16 len=1k
199 _run_test sc=0 len=64k
215 _run_test sc=0 len=64k
244 _run_test sc=12 len=40k
248 _run_test c=1 sc=13 len=2k
252 _run_test c=2 sc=14 len=2k
[all …]
/qemu/pc-bios/s390-ccw/
H A Dmenu.c104 if (idx < len) { in read_prompt()
120 int len; in get_index() local
132 if (len == 0) { in get_index()
137 for (i = 0; i < len; i++) { in get_index()
184 char buf[len + 2]; in zipl_print_entry()
186 ebcdic_to_ascii(data, buf, len); in zipl_print_entry()
187 buf[len] = '\n'; in zipl_print_entry()
188 buf[len + 1] = '\0'; in zipl_print_entry()
197 size_t len; in menu_get_zipl_boot_index() local
217 len = strlen(menu_data); in menu_get_zipl_boot_index()
[all …]

12345678910>>...49