Home
last modified time | relevance | path

Searched full:value (Results 1 – 25 of 94) sorted by relevance

1234

/kvm-unit-tests/lib/x86/asm/
H A Dio.h9 unsigned char value; in inb() local
10 asm volatile("inb %w1, %0" : "=a" (value) : "Nd" ((unsigned short)port)); in inb()
11 return value; in inb()
17 unsigned short value; in inw() local
18 asm volatile("inw %w1, %0" : "=a" (value) : "Nd" ((unsigned short)port)); in inw()
19 return value; in inw()
25 unsigned int value; in inl() local
26 asm volatile("inl %w1, %0" : "=a" (value) : "Nd" ((unsigned short)port)); in inl()
27 return value; in inl()
31 static inline void outb(uint8_t value, unsigned long port) in outb() argument
[all …]
/kvm-unit-tests/riscv/
H A Dsbi-fwft.c23 static struct sbiret fwft_set_raw(unsigned long feature, unsigned long value, unsigned long flags) in fwft_set_raw() argument
25 return sbi_ecall(SBI_EXT_FWFT, SBI_EXT_FWFT_SET, feature, value, flags, 0, 0, 0); in fwft_set_raw()
28 static struct sbiret fwft_set(uint32_t feature, unsigned long value, unsigned long flags) in fwft_set() argument
30 return fwft_set_raw(feature, value, flags); in fwft_set()
44 unsigned long value, unsigned long flags) in fwft_set_and_check_raw() argument
48 ret = fwft_set_raw(feature, value, flags); in fwft_set_and_check_raw()
49 if (!sbiret_report_error(&ret, SBI_SUCCESS, "set to %ld%s", value, str)) in fwft_set_and_check_raw()
53 sbiret_report(&ret, SBI_SUCCESS, value, "get %ld after set%s", value, str); in fwft_set_and_check_raw()
100 sbiret_report(&ret, SBI_SUCCESS, locked_value, "Get value %lu", locked_value); in fwft_feature_lock_test_values()
132 static struct sbiret fwft_misaligned_exc_set(unsigned long value, unsigned long flags) in fwft_misaligned_exc_set() argument
[all …]
H A Dsbi-sse.c127 unsigned long shift, unsigned long *value) in sse_get_event_status_field() argument
138 *value = (status & mask) >> shift; in sse_get_event_status_field()
208 unsigned long *value, long expected_error, const char *str) in sse_read_write_test() argument
212 ret = sbi_sse_read_attrs(event_id, attr, attr_count, value); in sse_read_write_test()
215 ret = sbi_sse_write_attrs(event_id, attr, attr_count, value); in sse_read_write_test()
223 unsigned long value = 0; in sse_test_attrs() local
234 ret = sbi_sse_write_attrs(event_id, ro_attrs[i], 1, &value); in sse_test_attrs()
243 ret = sbi_sse_read_attrs(event_id, i, 1, &value); in sse_test_attrs()
247 if (values[i] != value) in sse_test_attrs()
248 …report_fail("Attribute 0x%x single value read (0x%lx) differs from the one read with multiple attr… in sse_test_attrs()
[all …]
H A Dsbi-tests.h48 bool ch_val = (ret)->value == ex_val; \
57 report_info(fmt ": expected (error: %ld, value: %ld), received: (error: %ld, value %ld)", \
58 ##__VA_ARGS__, ex_err, ex_val, (ret)->error, (ret)->value); \
73 sbiret_report(ret, expected_error, expected_value, "check sbi.error and sbi.value")
82 sbiret_kfail(kfail, ret, expected_error, expected_value, "check sbi.error and sbi.value")
H A Dsbi.c184 ret.value &= 0x7ffffffful; in check_base()
186 if (ret.error || ret.value < 2) { in check_base()
658 while (!ret.error && ret.value == status && !sbi_hsm_timer_fired) { in hart_wait_on_status()
690 else if (ret.value != states->final_state) in hart_wait_state_transition()
691 report_info("hartid %lx status is not '%s' (ret.value=%ld)", hartid, in hart_wait_state_transition()
692 hart_state_str[states->final_state], ret.value); in hart_wait_state_transition()
749 } else if (ret.value != SBI_EXT_HSM_STARTED) { in check_hsm()
750 report_fail("current hart is not started (ret.value=%ld)", ret.value); in check_hsm()
916 /* Ignore the return value since we check the status of each hart anyway */ in check_hsm()
955 /* Ignore the return value since we check the status of each hart anyway */ in check_hsm()
[all …]
/kvm-unit-tests/lib/
H A Dpci-testdev.c15 void (*io_writeb)(u8 value, volatile void *addr);
16 void (*io_writew)(u16 value, volatile void *addr);
17 void (*io_writel)(u32 value, volatile void *addr);
35 static void pio_writeb(u8 value, volatile void *addr) in pio_writeb() argument
37 outb(value, (unsigned long)addr); in pio_writeb()
40 static void pio_writew(u16 value, volatile void *addr) in pio_writew() argument
42 outw(value, (unsigned long)addr); in pio_writew()
45 static void pio_writel(u32 value, volatile void *addr) in pio_writel() argument
47 outl(value, (unsigned long)addr); in pio_writel()
74 static void mmio_writeb(u8 value, volatile void *addr) in mmio_writeb() argument
[all …]
H A Ddevicetree.h54 * - a positive value on match
56 * - a negative FDT_ERR_* value on failure
66 * - a negative FDT_ERR_* value on failure
96 * - a negative FDT_ERR_* value on failure
113 * - a negative FDT_ERR_* value on failure
143 * - a negative FDT_ERR_* value on failure
155 * - a negative FDT_ERR_* value on failure
169 * - a negative FDT_ERR_* value on failure
196 * - a negative FDT_ERR_* value on failure
208 * - a negative FDT_ERR_* value on failure, and @bootargs
[all …]
H A Delf.h22 Elf64_Sxword d_tag; /* entry tag value */
37 Elf32_Sxword r_addend; /* Constant addend used to compute value */
43 Elf64_Sxword r_addend; /* Constant addend used to compute value */
H A Dpci-edu.c20 uint32_t value; in edu_check_alive() local
23 value = edu_reg_readl(dev, EDU_REG_ALIVE); in edu_check_alive()
24 return (live_count - 1 == ~value); in edu_check_alive()
/kvm-unit-tests/lib/s390x/
H A Dsnippet-exit.h34 uint64_t value; in snippet_check_force_exit_value() local
37 value = snippet_get_force_exit_value(vm); in snippet_check_force_exit_value()
38 report(value == value_exp, "guest forced exit with value (0x%lx == 0x%lx)", in snippet_check_force_exit_value()
39 value, value_exp); in snippet_check_force_exit_value()
41 report_fail("guest forced exit with value"); in snippet_check_force_exit_value()
/kvm-unit-tests/lib/libfdt/
H A Dlibfdt.h44 * length, or the phandle value was either 0 or -1, which are
85 * or similar property with a bad format or value */
89 * value. For example: a property expected to contain a string list
90 * is not NUL-terminated within the length of its value. */
95 * unexpected or missing value, property or node. */
144 static inline void fdt32_st(void *property, uint32_t value) in fdt32_st() argument
148 bp[0] = value >> 24; in fdt32_st()
149 bp[1] = (value >> 16) & 0xff; in fdt32_st()
150 bp[2] = (value >> 8) & 0xff; in fdt32_st()
151 bp[3] = value & 0xff; in fdt32_st()
[all …]
/kvm-unit-tests/x86/
H A Dla57.c23 * Note: value for LDT and TSS base might not reflect the actual base in get_test_register_value()
24 * that the CPU currently uses, because the (hidden) base value can't be in get_test_register_value()
52 static bool set_test_register_value(u64 test_register, int test_mode, u64 value) in set_test_register_value() argument
61 dt_ptr.base = value; in set_test_register_value()
74 dt_ptr.base = value; in set_test_register_value()
87 set_gdt_entry_base(sel, value); in set_test_register_value()
102 set_gdt_entry_base(sel, value); in set_test_register_value()
116 wrmsr(msr, value); in set_test_register_value()
119 return wrmsr_safe(msr, value) == 0; in set_test_register_value()
121 return wrmsr_fep_safe(msr, value) == 0; in set_test_register_value()
[all …]
H A Dhyperv_clock.c85 printf("drift on CPU %d, MSR value = %ld, acceptable [%ld, %ld]\n", i, in hv_clock_test()
92 printf("warp on CPU %d, MSR value = %ld prev MSR value = %ld!\n", i, in hv_clock_test()
100 printf("warp on CPU %d, TSC page value = %ld prev TSC page value = %ld!\n", i, in hv_clock_test()
186 "MSR value after enabling"); in main()
215 "MSR value after disabling"); in main()
H A Dmsr.c12 * 2. Custom: by providing command line arguments it is possible to test any MSR and value
15 * 2. value as a base 16 number
22 unsigned long long value; member
31 { .index = msr, .name = #msr, .value = val, .is_64bit_only = false, .keep = ro }
33 { .index = msr, .name = #msr, .value = val, .is_64bit_only = true, .keep = ro }
64 * the desired value as extra bits to set. in __test_msr_rw()
128 __test_msr_rw(msr->index, msr->name, msr->value, msr->keep); in test_msr()
135 msr->value == addr_64) in test_msr()
138 test_wrmsr_fault(msr->index, msr->name, msr->value); in test_msr()
153 .value = strtoull(av[2], NULL, 0x10) in test_custom_msr()
[all …]
/kvm-unit-tests/lib/x86/
H A Datomic.h18 * Atomically reads the value of @v.
28 * @i: required value
30 * Atomically sets the value of @v to @i.
71 * Atomically reads the value of @ptr and returns it.
81 * fact that cmpxchg8b returns the current 64-bit value in atomic64_read()
101 * Atomically reads the value of @v.
111 * @i: required value
113 * Atomically sets the value of @v to @i.
156 * Atomically reads the value of @v.
H A Dintel-iommu.h122 static inline void vtd_writel(unsigned int reg, uint32_t value) in vtd_writel() argument
124 __raw_writel(value, vtd_reg(reg)); in vtd_writel()
127 static inline void vtd_writeq(unsigned int reg, uint64_t value) in vtd_writeq() argument
129 __raw_writeq(value, vtd_reg(reg)); in vtd_writeq()
H A Dapic.c191 void ioapic_write_reg(unsigned reg, u32 value) in ioapic_write_reg() argument
194 *(volatile u32 *)(g_ioapic + 0x10) = value; in ioapic_write_reg()
270 void apic_start_timer(u32 value) in apic_start_timer() argument
273 * APIC timer runs at the 'core crystal clock', divided by the value in in apic_start_timer()
276 apic_write(APIC_TMICT, value); in apic_start_timer()
/kvm-unit-tests/lib/riscv/
H A Dsmp.c69 } while (ret.value == SBI_EXT_HSM_STOP_PENDING); in smp_boot_secondary()
71 assert_msg(ret.value == SBI_EXT_HSM_STOPPED, "CPU%d is not stopped", cpu); in smp_boot_secondary()
85 } while (ret.value == SBI_EXT_HSM_STOP_PENDING); in smp_boot_secondary_nofail()
87 if (ret.value == SBI_EXT_HSM_STOPPED) in smp_boot_secondary_nofail()
90 assert_msg(ret.value == SBI_EXT_HSM_START_PENDING || ret.value == SBI_EXT_HSM_STARTED, in smp_boot_secondary_nofail()
91 "CPU%d is in an unexpected state %ld", cpu, ret.value); in smp_boot_secondary_nofail()
H A Dsbi.c30 ret.value = a1; in sbi_ecall()
203 return ret.value; in __sbi_get_imp_version()
213 return ret.value; in __sbi_get_imp_id()
226 assert(!ret.error && (ret.value & SBI_SPEC_VERSION_MASK) >= sbi_mk_version(0, 2)); in sbi_probe()
231 return ret.value; in sbi_probe()
/kvm-unit-tests/docs/
H A Dunittests.txt23 param = value format.
95 check = <path>=<value>
97 Check a file for a particular value before running a test. The check line
99 parameter needs to be of the form <path>=<value>
101 The path and value cannot contain space, =, or shell wildcard characters.
/kvm-unit-tests/s390x/
H A Dmigration-sck.c32 report(now_after_set >= time_to_set, "TOD clock value is larger than what has been set"); in test_sck_migration()
41 * migration. Implementations can just migrate the guest TOD value or do something more in test_sck_migration()
44 report(now_after_migration >= time_to_set, "TOD clock value did not jump backwards"); in test_sck_migration()
H A Dex.c134 uint64_t target, value; in test_llgfrl() local
140 "0: llgfrl %[value],0\n" in test_llgfrl()
148 [value] "=d" (value) in test_llgfrl()
151 report(target == value, "loaded correct value"); in test_llgfrl()
H A Dmvpg.c87 * before the one contained in the Program Old PSW with the value of the
113 report(clear_pgm_int() == expected, "Key Function Control value %d", i); in test_exceptions()
116 report_skip("Key Function Control value %d", 4); in test_exceptions()
117 report_skip("Key Function Control value %d", 5); in test_exceptions()
130 report(clear_pgm_int() == expected, "Key Function Control value 3"); in test_exceptions()
134 report(clear_pgm_int() == expected, "Key Function Control value %d", i); in test_exceptions()
/kvm-unit-tests/lib/asm-generic/
H A Dio.h175 static inline void outb(uint8_t value, unsigned long port) in outb() argument
177 writeb(value, (volatile void __iomem *)port); in outb()
182 static inline void outw(uint16_t value, unsigned long port) in outw() argument
184 writew(value, (volatile void __iomem *)port); in outw()
189 static inline void outl(uint32_t value, unsigned long port) in outl() argument
191 writel(value, (volatile void __iomem *)port); in outl()
/kvm-unit-tests/scripts/
H A Druntime.bash136 # check a file for a particular value before running a test
138 # but each check parameter needs to be of the form <path>=<value>
145 value=${check_param#*=}
146 if ! [ -f "$path" ] || [ "$(cat $path)" != "$value" ]; then
147 print_result "SKIP" $testname "" "$path not equal to $value"

1234