/xen/xen/lib/x86/ |
A D | cpuid.c | 109 if ( i == ARRAY_SIZE(p->cache.raw) ) in x86_cpuid_policy_fill_native() 146 if ( i == ARRAY_SIZE(p->topo.raw) && in x86_cpuid_policy_fill_native() 163 BUILD_BUG_ON(ARRAY_SIZE(p->xstate.raw) > 63); in x86_cpuid_policy_fill_native() 191 ARRAY_SIZE(p->basic.raw) - 1); in x86_cpuid_policy_clear_out_of_range_leaves() 197 for ( i = 0; (i < ARRAY_SIZE(p->cache.raw) && in x86_cpuid_policy_clear_out_of_range_leaves() 208 ARRAY_SIZE(p->feat.raw) - 1); in x86_cpuid_policy_clear_out_of_range_leaves() 214 for ( i = 0; (i < ARRAY_SIZE(p->topo.raw) && in x86_cpuid_policy_clear_out_of_range_leaves() 226 BUILD_BUG_ON(ARRAY_SIZE(p->xstate.raw) > 63); in x86_cpuid_policy_clear_out_of_range_leaves() 232 ARRAY_SIZE(p->xstate.raw) - 1); in x86_cpuid_policy_clear_out_of_range_leaves() 236 ARRAY_SIZE(p->extd.raw) - 1); in x86_cpuid_policy_clear_out_of_range_leaves() [all …]
|
/xen/xen/arch/x86/ |
A D | cpuid.c | 51 rhs = features + ARRAY_SIZE(features); in parse_xen_cpuid() 393 for ( i = 0; i < ARRAY_SIZE(pv_featureset); ++i ) in calculate_pv_max_policy() 421 for ( i = 0; i < ARRAY_SIZE(pv_featureset); ++i ) in calculate_pv_def_policy() 445 for ( i = 0; i < ARRAY_SIZE(hvm_featureset); ++i ) in calculate_hvm_max_policy() 504 for ( i = 0; i < ARRAY_SIZE(hvm_featureset); ++i ) in calculate_hvm_def_policy() 592 for ( i = 0; i < ARRAY_SIZE(max_fs); i++ ) in recalculate_cpuid_policy() 646 for ( i = 0; i < ARRAY_SIZE(fs); i++ ) in recalculate_cpuid_policy() 675 for ( i = 0; i < ARRAY_SIZE(p->cache.raw); ++i ) in recalculate_cpuid_policy() 757 ARRAY_SIZE(p->basic.raw) - 1) ) in guest_cpuid() 763 if ( subleaf >= ARRAY_SIZE(p->cache.raw) ) in guest_cpuid() [all …]
|
A D | srat.c | 55 if ((pxm < ARRAY_SIZE(pxm2node)) && node_found(pxm, pxm)) in pxm_to_node() 58 for (i = 0; i < ARRAY_SIZE(pxm2node); i++) in pxm_to_node() 74 if (pxm < ARRAY_SIZE(pxm2node)) { in setup_node() 85 for (idx = 0; idx < ARRAY_SIZE(pxm2node); idx++) in setup_node() 160 for (i = 0; i < ARRAY_SIZE(pxm2node); i++) in bad_srat() 509 if ((n < ARRAY_SIZE(pxm2node)) && (pxm2node[n].node == n)) in node_to_pxm() 511 for (i = 0; i < ARRAY_SIZE(pxm2node); i++) in node_to_pxm()
|
A D | sysctl.c | 296 PSR_TYPE_L3_CBM, data, ARRAY_SIZE(data)); in arch_do_sysctl() 313 PSR_TYPE_L2_CBM, data, ARRAY_SIZE(data)); in arch_do_sysctl() 330 PSR_TYPE_MBA_THRTL, data, ARRAY_SIZE(data)); in arch_do_sysctl() 389 if ( sysctl->u.cpu_featureset.index < ARRAY_SIZE(policy_table) ) in arch_do_sysctl() 427 sysctl->u.cpu_policy.index >= ARRAY_SIZE(system_policies) ) in arch_do_sysctl() 434 ARRAY_SIZE(system_policies))]; in arch_do_sysctl()
|
A D | extable.c | 153 for ( i = 0; i < ARRAY_SIZE(tests); ++i ) in stub_selftest() 160 memcpy(ptr, tests[i].opc, ARRAY_SIZE(tests[i].opc)); in stub_selftest() 178 i, (int)ARRAY_SIZE(tests[i].opc), tests[i].opc, in stub_selftest()
|
/xen/xen/arch/x86/hvm/viridian/ |
A D | synic.c | 163 vv->vector_to_sintx[vector] = ARRAY_SIZE(vv->sint); in viridian_synic_wrmsr() 286 for ( i = 0; i < ARRAY_SIZE(vv->sint); i++ ) in viridian_synic_vcpu_init() 290 for ( i = 0; i < ARRAY_SIZE(vv->vector_to_sintx); i++ ) in viridian_synic_vcpu_init() 291 vv->vector_to_sintx[i] = ARRAY_SIZE(vv->sint); in viridian_synic_vcpu_init() 377 if ( sintx >= ARRAY_SIZE(vv->sint) ) in viridian_synic_is_auto_eoi_sint() 390 if ( sintx < ARRAY_SIZE(vv->sint) ) in viridian_synic_ack_sint() 391 __clear_bit(array_index_nospec(sintx, ARRAY_SIZE(vv->sint)), in viridian_synic_ack_sint() 401 BUILD_BUG_ON(ARRAY_SIZE(vv->sint) != ARRAY_SIZE(ctxt->sint_msr)); in viridian_synic_save_vcpu_ctxt() 403 for ( i = 0; i < ARRAY_SIZE(vv->sint); i++ ) in viridian_synic_save_vcpu_ctxt() 429 for ( i = 0; i < ARRAY_SIZE(vv->sint); i++ ) in viridian_synic_load_vcpu_ctxt()
|
A D | time.c | 253 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in viridian_time_poll_timers() 266 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in time_vcpu_freeze() 284 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in time_vcpu_thaw() 502 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in viridian_time_vcpu_init() 523 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in viridian_time_vcpu_deinit() 545 BUILD_BUG_ON(ARRAY_SIZE(vv->stimer) != in viridian_time_save_vcpu_ctxt() 546 ARRAY_SIZE(ctxt->stimer_config_msr)); in viridian_time_save_vcpu_ctxt() 547 BUILD_BUG_ON(ARRAY_SIZE(vv->stimer) != in viridian_time_save_vcpu_ctxt() 548 ARRAY_SIZE(ctxt->stimer_count_msr)); in viridian_time_save_vcpu_ctxt() 550 for ( i = 0; i < ARRAY_SIZE(vv->stimer); i++ ) in viridian_time_save_vcpu_ctxt() [all …]
|
/xen/tools/misc/ |
A D | xen-livepatch.c | 61 if (state >= ARRAY_SIZE(names) || !names[state]) in state2str() 338 if ( !flags || idx >= ARRAY_SIZE(flag_options) ) in get_flags() 344 for ( j = 0; j < ARRAY_SIZE(flag_options[idx]); j++ ) in get_flags() 356 if ( j == ARRAY_SIZE(flag_options[idx]) ) in get_flags() 400 if ( idx >= ARRAY_SIZE(action_options) ) in action_func() 574 for ( i = 0; i < ARRAY_SIZE(main_options); i++ ) in main() 578 if ( i == ARRAY_SIZE(main_options) ) in main() 580 for ( j = 0; j < ARRAY_SIZE(action_options); j++ ) in main() 584 if ( j == ARRAY_SIZE(action_options) ) in main() 599 if ( i == ARRAY_SIZE(main_options) ) in main()
|
A D | xen-diag.c | 81 for ( i = 0; i < ARRAY_SIZE(main_options); i++ ) in main() 85 if ( i == ARRAY_SIZE(main_options) ) in main()
|
A D | xen-cpuid.c | 249 for ( i = 0; i < length && i < ARRAY_SIZE(decodes); ++i ) in decode_featureset() 280 for ( i = 0; i < ARRAY_SIZE(decodes); ++i ) in dump_info() 304 for ( i = 0; i < ARRAY_SIZE(featuresets); ++i ) in dump_info() 322 for ( i = 0; i < ARRAY_SIZE(featuresets); ++i ) in dump_info() 495 for ( i = 0; i < ARRAY_SIZE(sys_policies); ++i ) in main()
|
/xen/tools/tests/cpu-policy/ |
A D | test-cpu-policy.c | 58 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_vendor_identification() 93 unsigned int nr = ARRAY_SIZE(leaves); in test_cpuid_current() 194 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_cpuid_serialise_success() 247 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_msr_serialise_success() 328 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_cpuid_deserialise_failure() 386 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_msr_deserialise_failure() 533 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_cpuid_out_of_range_clearing() 585 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_is_compatible_success() 637 for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i ) in test_is_compatible_failure()
|
/xen/xen/arch/x86/pv/ |
A D | hypercall.c | 108 BUILD_BUG_ON(ARRAY_SIZE(pv_hypercall_table) > in pv_hypercall() 109 ARRAY_SIZE(hypercall_args_table)); in pv_hypercall() 111 if ( eax >= ARRAY_SIZE(pv_hypercall_table) ) in pv_hypercall() 117 eax = array_index_nospec(eax, ARRAY_SIZE(pv_hypercall_table)); in pv_hypercall() 244 if ( (op < ARRAY_SIZE(pv_hypercall_table)) && in arch_do_multicall_call() 258 if ( (op < ARRAY_SIZE(pv_hypercall_table)) && in arch_do_multicall_call()
|
/xen/xen/common/ |
A D | kernel.c | 473 if ( copy_to_guest(arg, extraversion, ARRAY_SIZE(extraversion)) ) in DO() 500 if ( copy_to_guest(arg, info, ARRAY_SIZE(info)) ) in DO() 523 if ( copy_to_guest(arg, chgset, ARRAY_SIZE(chgset)) ) in DO() 581 memset(&hdl, 0, ARRAY_SIZE(hdl)); in DO() 583 BUILD_BUG_ON(ARRAY_SIZE(current->domain->handle) != ARRAY_SIZE(hdl)); in DO() 586 ARRAY_SIZE(hdl) ) ) in DO() 593 size_t len = ARRAY_SIZE(saved_cmdline); in DO()
|
A D | keyhandler.c | 85 if ( key >= ARRAY_SIZE(key_table) || !(h = &key_table[key])->fn ) in handle_keypress() 104 BUG_ON(key >= ARRAY_SIZE(key_table)); /* Key in range? */ in register_keyhandler() 116 BUG_ON(key >= ARRAY_SIZE(key_table)); /* Key in range? */ in register_irq_keyhandler() 130 for ( i = 0; i < ARRAY_SIZE(key_table); i++ ) in show_handlers() 443 for ( k = 0; k < ARRAY_SIZE(key_table); k++ ) in run_all_nonirq_keyhandlers() 469 for ( k = 0; k < ARRAY_SIZE(key_table); k++ ) in run_all_keyhandlers()
|
/xen/xen/drivers/char/ |
A D | serial.c | 503 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_init_preirq() 512 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_init_irq() 520 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_init_postirq() 533 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_endboot() 540 if ( (idx >= 0) && (idx < ARRAY_SIZE(com)) && in serial_irq() 549 if ( (idx >= 0) && (idx < ARRAY_SIZE(com)) && in serial_vuart_info() 559 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_suspend() 567 for ( i = 0; i < ARRAY_SIZE(com); i++ ) in serial_resume()
|
/xen/tools/xenstore/ |
A D | xenstored_watch.c | 205 if (get_strings(in, vec, ARRAY_SIZE(vec)) != ARRAY_SIZE(vec)) in do_watch() 265 if (get_strings(in, vec, ARRAY_SIZE(vec)) != ARRAY_SIZE(vec)) in do_unwatch()
|
A D | xenstored_control.c | 168 for (cmd = 0; cmd < ARRAY_SIZE(cmds); cmd++) { in do_control_help() 179 for (cmd = 0; cmd < ARRAY_SIZE(cmds); cmd++) { in do_control_help() 213 for (cmd = 0; cmd < ARRAY_SIZE(cmds); cmd++) in do_control()
|
/xen/xen/arch/x86/guest/xen/ |
A D | pvh-boot.c | 53 if ( ARRAY_SIZE(pvh_mbi_mods) <= pvh_info->nr_modules ) in convert_pvh_info() 55 ARRAY_SIZE(pvh_mbi_mods), pvh_info->nr_modules); in convert_pvh_info() 67 BUG_ON(pvh_info->nr_modules >= ARRAY_SIZE(pvh_mbi_mods)); in convert_pvh_info()
|
/xen/tools/libxc/ |
A D | xc_sr_common.c | 15 if ( type < ARRAY_SIZE(dhdr_types) && dhdr_types[type] ) in dhdr_type_to_str() 48 if ( (type < ARRAY_SIZE(mandatory_rec_types)) && in rec_type_to_str() 84 if ( writev_exact(ctx->fd, parts, ARRAY_SIZE(parts)) ) in write_split_record()
|
A D | xc_cpuid_x86.c | 106 if ( (unsigned int)mask >= ARRAY_SIZE(masks) ) in xc_get_static_cpu_featuremask() 371 for ( unsigned int i = 0; i < ARRAY_SIZE(xend->policy); i++ ) in xc_cpuid_xend_policy() 440 uint32_t len = ARRAY_SIZE(host_featureset); in xc_cpuid_apply_policy() 537 for ( i = 0; i < ARRAY_SIZE(disabled_features); ++i ) in xc_cpuid_apply_policy() 548 for ( i = 0; i < ARRAY_SIZE(disabled_features); ++i ) in xc_cpuid_apply_policy() 593 i < ARRAY_SIZE(p->cache.raw)); ++i ) in xc_cpuid_apply_policy()
|
/xen/tools/include/xen-tools/ |
A D | libs.h | 12 #ifndef ARRAY_SIZE 13 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*a)) macro
|
/xen/xen/arch/x86/hvm/ |
A D | hypercall.c | 209 BUILD_BUG_ON(ARRAY_SIZE(hvm_hypercall_table) > in hvm_hypercall() 210 ARRAY_SIZE(hypercall_args_table)); in hvm_hypercall() 212 if ( eax >= ARRAY_SIZE(hvm_hypercall_table) ) in hvm_hypercall() 218 eax = array_index_nospec(eax, ARRAY_SIZE(hvm_hypercall_table)); in hvm_hypercall()
|
A D | dm.c | 254 if ( data->mem_type >= ARRAY_SIZE(memtype) || in set_mem_type() 258 mem_type = array_index_nospec(data->mem_type, ARRAY_SIZE(memtype)); in set_mem_type() 389 if ( op.op >= ARRAY_SIZE(op_size) ) in dm_op() 395 op.op = array_index_nospec(op.op, ARRAY_SIZE(op_size)); in dm_op() 745 if ( nr_bufs > ARRAY_SIZE(args.buf) ) in compat_dm_op() 749 args.nr_bufs = array_index_nospec(nr_bufs, ARRAY_SIZE(args.buf) + 1); in compat_dm_op() 782 if ( nr_bufs > ARRAY_SIZE(args.buf) ) in do_dm_op() 786 args.nr_bufs = array_index_nospec(nr_bufs, ARRAY_SIZE(args.buf) + 1); in do_dm_op()
|
/xen/xen/arch/x86/mm/ |
A D | mem_access.c | 77 if ( (unsigned int)a >= ARRAY_SIZE(memaccess) ) in _p2m_get_mem_access() 337 case 0 ... ARRAY_SIZE(memaccess) - 1: in xenmem_access_to_p2m_access() 338 xaccess = array_index_nospec(xaccess, ARRAY_SIZE(memaccess)); in xenmem_access_to_p2m_access() 368 if ( altp2m_idx >= min(ARRAY_SIZE(d->arch.altp2m_p2m), MAX_EPTP) || in p2m_set_mem_access() 428 if ( altp2m_idx >= min(ARRAY_SIZE(d->arch.altp2m_p2m), MAX_EPTP) || in p2m_set_mem_access_multi() 495 if ( altp2m_idx >= min(ARRAY_SIZE(d->arch.altp2m_p2m), MAX_EPTP) || in p2m_get_mem_access()
|
/xen/tools/libxl/ |
A D | libxl_create.c | 776 noperm, ARRAY_SIZE(noperm)); in libxl__domain_make() 785 roperm, ARRAY_SIZE(roperm)); in libxl__domain_make() 788 roperm, ARRAY_SIZE(roperm)); in libxl__domain_make() 806 roperm, ARRAY_SIZE(roperm)); in libxl__domain_make() 814 rwperm, ARRAY_SIZE(rwperm)); in libxl__domain_make() 817 rwperm, ARRAY_SIZE(rwperm)); in libxl__domain_make() 820 rwperm, ARRAY_SIZE(rwperm)); in libxl__domain_make() 823 rwperm, ARRAY_SIZE(rwperm)); in libxl__domain_make() 834 rwperm, ARRAY_SIZE(rwperm)); in libxl__domain_make() 858 ARRAY_SIZE(rwperm)); in libxl__domain_make() [all …]
|