/xen/xen/include/asm-x86/ |
A D | bitops.h | 60 ((unsigned int *)addr)[nr >> 5] |= (1u << (nr & 31)); in constant_set_bit() 101 ((unsigned int *)addr)[nr >> 5] &= ~(1u << (nr & 31)); in constant_clear_bit() 125 ((unsigned int *)addr)[nr >> 5] ^= (1u << (nr & 31)); in constant_change_bit() 168 [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); in test_and_set_bit() 193 [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" ); in __test_and_set_bit() 217 [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); in test_and_clear_bit() 242 [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" ); in __test_and_clear_bit() 259 [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" ); in __test_and_change_bit() 283 [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" ); in test_and_change_bit() 294 return ((1U << (nr & 31)) & in constant_test_bit() [all …]
|
A D | guest_atomics.h | 10 #define guest_set_bit(d, nr, p) ((void)(d), set_bit(nr, p)) argument 11 #define guest_clear_bit(d, nr, p) ((void)(d), clear_bit(nr, p)) argument 12 #define guest_change_bit(d, nr, p) ((void)(d), change_bit(nr, p)) argument 13 #define guest_test_bit(d, nr, p) ((void)(d), test_bit(nr, p)) argument 15 #define guest_test_and_set_bit(d, nr, p) \ argument 16 ((void)(d), test_and_set_bit(nr, p)) 17 #define guest_test_and_clear_bit(d, nr, p) \ argument 18 ((void)(d), test_and_clear_bit(nr, p)) 19 #define guest_test_and_change_bit(d, nr, p) \ argument 20 ((void)(d), test_and_change_bit(nr, p))
|
A D | guest_access.h | 45 #define guest_handle_add_offset(hnd, nr) ((hnd).p += (nr)) argument 46 #define guest_handle_subtract_offset(hnd, nr) ((hnd).p -= (nr)) argument 77 #define copy_to_guest_offset(hnd, off, ptr, nr) ({ \ argument 83 raw_copy_to_guest(_d+(off), _s, sizeof(*_s)*(nr)); \ 90 #define copy_from_guest_offset(ptr, hnd, off, nr) ({ \ argument 93 raw_copy_from_guest(_d, _s+(off), sizeof(*_d)*(nr));\ 96 #define clear_guest_offset(hnd, off, nr) ({ \ argument 98 raw_clear_guest(_d+(off), nr); \ 122 array_access_ok((hnd).p, (nr), sizeof(*(hnd).p))) 144 #define __clear_guest_offset(hnd, off, nr) ({ \ argument [all …]
|
/xen/xen/include/asm-arm/ |
A D | bitops.h | 24 #define BITOP_MASK(nr) (1UL << ((nr) % BITOP_BITS_PER_WORD)) argument 25 #define BITOP_WORD(nr) ((nr) / BITOP_BITS_PER_WORD) argument 47 void set_bit(int nr, volatile void *p); 48 void clear_bit(int nr, volatile void *p); 49 void change_bit(int nr, volatile void *p); 50 int test_and_set_bit(int nr, volatile void *p); 51 int test_and_clear_bit(int nr, volatile void *p); 88 unsigned int mask = BITOP_MASK(nr); in __test_and_set_bit() 108 unsigned int mask = BITOP_MASK(nr); in __test_and_clear_bit() 121 unsigned int mask = BITOP_MASK(nr); in __test_and_change_bit() [all …]
|
A D | guest_access.h | 33 #define guest_handle_add_offset(hnd, nr) ((hnd).p += (nr)) argument 34 #define guest_handle_subtract_offset(hnd, nr) ((hnd).p -= (nr)) argument 66 #define copy_to_guest_offset(hnd, off, ptr, nr) ({ \ argument 72 raw_copy_to_guest(_d+(off), _s, sizeof(*_s)*(nr)); \ 79 #define clear_guest_offset(hnd, off, nr) ({ \ argument 81 raw_clear_guest(_d+(off), nr); \ 88 #define copy_from_guest_offset(ptr, hnd, off, nr) ({ \ argument 91 raw_copy_from_guest(_d, _s+(off), sizeof(*_d)*(nr));\ 114 #define guest_handle_okay(hnd, nr) (1) argument 117 #define __copy_to_guest_offset(hnd, off, ptr, nr) ({ \ argument [all …]
|
A D | guest_atomics.h | 25 static inline void guest_##name(struct domain *d, int nr, volatile void *p) \ 29 if ( name##_timeout(nr, p, this_cpu(guest_safe_atomic_max)) ) \ 35 name(nr, p); \ 40 static inline int guest_##name(struct domain *d, int nr, volatile void *p) \ 47 succeed = name##_timeout(nr, p, &oldbit, \ 55 oldbit = name(nr, p); \ 68 #define guest_test_bit(d, nr, p) ((void)(d), test_bit(nr, p)) in guest_bitop() argument
|
/xen/tools/firmware/hvmloader/ |
A D | e820.c | 176 nr++; in build_e820_table() 185 nr++; in build_e820_table() 202 nr++; in build_e820_table() 220 nr++; in build_e820_table() 239 nr++; in build_e820_table() 244 nr++; in build_e820_table() 247 e820[nr].size = (uint32_t)-e820[nr].addr; in build_e820_table() 249 nr++; in build_e820_table() 254 e820[nr].size = (uint32_t)-e820[nr].addr; in build_e820_table() 256 nr++; in build_e820_table() [all …]
|
/xen/tools/libxc/ |
A D | xc_bitops.h | 37 static inline int test_bit(int nr, const void *_addr) in test_bit() argument 40 return (BITMAP_ENTRY(nr, addr) >> BITMAP_SHIFT(nr)) & 1; in test_bit() 43 static inline void clear_bit(int nr, void *_addr) in clear_bit() argument 46 BITMAP_ENTRY(nr, addr) &= ~(1UL << BITMAP_SHIFT(nr)); in clear_bit() 49 static inline void set_bit(int nr, void *_addr) in set_bit() argument 52 BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr)); in set_bit() 57 int oldbit = test_bit(nr, addr); in test_and_clear_bit() 58 clear_bit(nr, addr); in test_and_clear_bit() 62 static inline int test_and_set_bit(int nr, void *addr) in test_and_set_bit() argument 64 int oldbit = test_bit(nr, addr); in test_and_set_bit() [all …]
|
A D | xc_mem_access.c | 30 uint32_t nr) in xc_set_mem_access() argument 38 .nr = nr in xc_set_mem_access() 48 uint32_t nr) in xc_set_mem_access_multi() argument 50 DECLARE_HYPERCALL_BOUNCE(access, nr, XC_HYPERCALL_BUFFER_BOUNCE_IN); in xc_set_mem_access_multi() 51 DECLARE_HYPERCALL_BOUNCE(pages, nr * sizeof(uint64_t), in xc_set_mem_access_multi() 61 .nr = nr, in xc_set_mem_access_multi()
|
A D | xc_psr.c | 168 uint32_t evtid, nr = 0; in xc_psr_cmt_get_data() local 189 entries[nr].rsvd = 0; in xc_psr_cmt_get_data() 190 nr++; in xc_psr_cmt_get_data() 194 entries[nr].val = 0; in xc_psr_cmt_get_data() 195 entries[nr].rsvd = 0; in xc_psr_cmt_get_data() 196 nr++; in xc_psr_cmt_get_data() 200 tsc_entry = &entries[nr]; in xc_psr_cmt_get_data() 203 entries[nr].val = 0; in xc_psr_cmt_get_data() 204 entries[nr].rsvd = 0; in xc_psr_cmt_get_data() 205 nr++; in xc_psr_cmt_get_data() [all …]
|
/xen/xen/include/xen/ |
A D | guest_access.h | 14 #define copy_to_guest(hnd, ptr, nr) \ argument 15 copy_to_guest_offset(hnd, 0, ptr, nr) 17 #define copy_from_guest(ptr, hnd, nr) \ argument 18 copy_from_guest_offset(ptr, hnd, 0, nr) 20 #define clear_guest(hnd, nr) \ argument 21 clear_guest_offset(hnd, 0, nr) 23 #define __copy_to_guest(hnd, ptr, nr) \ argument 24 __copy_to_guest_offset(hnd, 0, ptr, nr) 26 #define __copy_from_guest(ptr, hnd, nr) \ argument 27 __copy_from_guest_offset(ptr, hnd, 0, nr) [all …]
|
A D | compat.h | 32 #define compat_handle_add_offset(hnd, nr) \ argument 33 ((hnd).c += (nr) * sizeof(**(hnd)._)) 49 #define copy_to_compat_offset(hnd, off, ptr, nr) ({ \ argument 53 raw_copy_to_guest(_d + (off), _s, sizeof(*_s) * (nr)); \ 60 #define copy_from_compat_offset(ptr, hnd, off, nr) ({ \ argument 63 raw_copy_from_guest(_d, _s + (off), sizeof(*_d) * (nr)); \ 67 copy_to_compat_offset(hnd, 0, ptr, nr) 70 copy_from_compat_offset(ptr, hnd, 0, nr) 112 __copy_to_compat_offset(hnd, 0, ptr, nr) 115 __copy_from_compat_offset(ptr, hnd, 0, nr) [all …]
|
A D | softirq.h | 27 void open_softirq(int nr, softirq_handler handler); 29 void cpumask_raise_softirq(const cpumask_t *, unsigned int nr); 30 void cpu_raise_softirq(unsigned int cpu, unsigned int nr); 31 void raise_softirq(unsigned int nr);
|
/xen/tools/libxl/ |
A D | libxl_linux.c | 51 int nr = 0; in get_hotplug_env() local 55 env[nr++] = "script"; in get_hotplug_env() 56 env[nr++] = script; in get_hotplug_env() 62 env[nr++] = "backend"; in get_hotplug_env() 69 env[nr++] = "netdev"; in get_hotplug_env() 99 env[nr++] = NULL; in get_hotplug_env() 100 assert(nr <= arraysize); in get_hotplug_env() 113 int nr = 0, rc = 0; in libxl__hotplug_nic() local 144 (*args)[nr++] = script; in libxl__hotplug_nic() 169 int nr = 0, rc = 0; in libxl__hotplug_disk() local [all …]
|
A D | libxl_freebsd.c | 88 int nr = 0; in libxl__hotplug_env_nic() local 106 (*env)[nr++] = NULL; in libxl__hotplug_env_nic() 107 assert(nr == arraysize); in libxl__hotplug_env_nic() 120 int nr = 0, rc; in libxl__hotplug_nic() local 154 (*args)[nr++] = script; in libxl__hotplug_nic() 155 (*args)[nr++] = be_path; in libxl__hotplug_nic() 157 (*args)[nr++] = NULL; in libxl__hotplug_nic() 158 assert(nr == arraysize); in libxl__hotplug_nic() 171 int nr = 0, rc; in libxl__hotplug_disk() local 184 (*args)[nr++] = script; in libxl__hotplug_disk() [all …]
|
A D | libxl_colo_nic.c | 89 int arraysize, nr = 0; in setup_async_exec() local 103 env[nr++] = "vifname"; in setup_async_exec() 107 env[nr++] = "mode"; in setup_async_exec() 112 env[nr++] = "index"; in setup_async_exec() 114 env[nr++] = "bridge"; in setup_async_exec() 116 env[nr++] = NULL; in setup_async_exec() 117 assert(nr == arraysize); in setup_async_exec() 119 arraysize = 3; nr = 0; in setup_async_exec() 122 args[nr++] = op; in setup_async_exec() 123 args[nr++] = NULL; in setup_async_exec() [all …]
|
A D | libxl_x86.c | 60 nr = *nr_entries; in e820_sanitize() 61 if (!nr) in e820_sanitize() 64 if (nr > E820MAX) in e820_sanitize() 227 nr = idx; in e820_sanitize() 251 *nr = rc; in e820_host_sanitize() 264 uint32_t nr; in libxl__e820_alloc() local 275 nr = E820MAX; in libxl__e820_alloc() 717 nr++; in domain_construct_memmap() 727 nr++; in domain_construct_memmap() 736 nr++; in domain_construct_memmap() [all …]
|
/xen/xen/arch/arm/arm64/lib/ |
A D | bitops.c | 32 static always_inline bool int_##name(int nr, volatile void *p, bool timeout,\ 35 volatile uint32_t *ptr = (uint32_t *)p + BITOP_WORD((unsigned int)nr); \ 36 const uint32_t mask = BITOP_MASK((unsigned int)nr); \ 55 void name(int nr, volatile void *p) \ 57 if ( !int_##name(nr, p, false, 0) ) \ 61 bool name##_timeout(int nr, volatile void *p, unsigned int max_try) \ 63 return int_##name(nr, p, true, max_try); \ 67 static always_inline bool int_##name(int nr, volatile void *p, int *oldbit, \ 70 volatile uint32_t *ptr = (uint32_t *)p + BITOP_WORD((unsigned int)nr); \ 71 unsigned int bit = (unsigned int)nr % BITOP_BITS_PER_WORD; \ [all …]
|
/xen/xen/arch/arm/arm32/lib/ |
A D | bitops.c | 33 static always_inline bool int_##name(int nr, volatile void *p, bool timeout,\ 36 volatile uint32_t *ptr = (uint32_t *)p + BITOP_WORD((unsigned int)nr); \ 37 const uint32_t mask = BITOP_MASK((unsigned int)nr); \ 59 void name(int nr, volatile void *p) \ 61 if ( !int_##name(nr, p, false, 0) ) \ 65 bool name##_timeout(int nr, volatile void *p, unsigned int max_try) \ 67 return int_##name(nr, p, true, max_try); \ 71 static always_inline bool int_##name(int nr, volatile void *p, int *oldbit, \ 74 volatile uint32_t *ptr = (uint32_t *)p + BITOP_WORD((unsigned int)nr); \ 75 unsigned int bit = (unsigned int)nr % BITOP_BITS_PER_WORD; \ [all …]
|
/xen/stubdom/vtpmmgr/ |
A D | manage-vtpmmgr.pl | 52 my($nr, @vtpms) = unpack 'N(H32)*', tpm_cmd_nohdr 0x1C2, pack 'NNN', 0x02000201, $group, 0; 53 if ($nr > @vtpms) { 56 @vtpms = () if $nr == 0; # unpack returns an empty string in this case 65 my $nr = unpack 'N', tpm_cmd_nohdr 0x1C2, pack 'N', 0x02000101; 66 cmd_list_group $_ for (0..($nr - 1)); 94 my $nr = shift; 95 tpm_cmd_nohdr 0x1C2, pack 'NN', 0x02000103, $nr; 99 my $nr = shift; 104 tpm_cmd_nohdr 0x1C2, pack 'NNa*', 0x02000106, $nr, $cmd;
|
/xen/xen/common/ |
A D | softirq.c | 77 void open_softirq(int nr, softirq_handler handler) in open_softirq() argument 79 ASSERT(nr < NR_SOFTIRQS); in open_softirq() 80 softirq_handlers[nr] = handler; in open_softirq() 83 void cpumask_raise_softirq(const cpumask_t *mask, unsigned int nr) in cpumask_raise_softirq() argument 97 if ( !test_and_set_bit(nr, &softirq_pending(cpu)) && in cpumask_raise_softirq() 106 void cpu_raise_softirq(unsigned int cpu, unsigned int nr) in cpu_raise_softirq() argument 110 if ( test_and_set_bit(nr, &softirq_pending(cpu)) in cpu_raise_softirq() 140 void raise_softirq(unsigned int nr) in raise_softirq() argument 142 set_bit(nr, &softirq_pending(smp_processor_id())); in raise_softirq()
|
/xen/xen/lib/x86/ |
A D | private.h | 41 #define copy_to_buffer_offset(dst, index, src, nr) \ argument 46 typeof(nr) nr_ = (nr), i_; \ 54 #define copy_from_buffer_offset(dst, src, index, nr) \ argument 59 typeof(nr) nr_ = (nr), i_; \
|
/xen/xen/arch/x86/guest/hyperv/ |
A D | util.c | 34 int nr = 1; in cpumask_to_vpset() local 57 if ( vcpu_bank >= nr ) in cpumask_to_vpset() 58 nr = vcpu_bank + 1; in cpumask_to_vpset() 62 vpset->valid_bank_mask = ~0ULL >> (64 - nr); in cpumask_to_vpset() 64 return nr; in cpumask_to_vpset()
|
/xen/xen/drivers/passthrough/amd/ |
A D | iommu_intr.c | 149 slot = (slot + nr - 1) & ~(nr - 1); in alloc_intremap_entry() 150 if ( slot + nr <= end ) in alloc_intremap_entry() 152 while ( nr-- ) in alloc_intremap_entry() 156 slot = (end + nr) & ~(nr - 1); in alloc_intremap_entry() 524 for ( i = 0; i < nr; ++i ) in update_intremap_entry_from_msi_msg() 552 ASSERT(nr); in update_intremap_entry_from_msi_msg() 624 unsigned int i, nr = 1; in amd_iommu_msi_msg_update_ire() local 635 nr = msi_desc->msi.nvec; in amd_iommu_msi_msg_update_ire() 683 offset |= nr; in amd_iommu_read_msi_from_ire() 753 if ( !nr ) in amd_iommu_alloc_intremap_table() [all …]
|
/xen/tools/fuzz/cpu-policy/ |
A D | afl-policy-fuzzer.c | 26 unsigned int nr = CPUID_MAX_SERIALISED_LEAVES; in check_cpuid() local 53 rc = x86_cpuid_copy_to_buffer(cp, leaves, &nr); in check_cpuid() 55 assert(nr <= CPUID_MAX_SERIALISED_LEAVES); in check_cpuid() 58 rc = x86_cpuid_copy_from_buffer(&new, leaves, nr, NULL, NULL); in check_cpuid() 85 unsigned int nr = MSR_MAX_SERIALISED_ENTRIES; in check_msr() local 91 rc = x86_msr_copy_to_buffer(mp, msrs, &nr); in check_msr() 93 assert(nr <= MSR_MAX_SERIALISED_ENTRIES); in check_msr() 95 rc = x86_msr_copy_from_buffer(&new, msrs, nr, NULL); in check_msr()
|