brintos

brintos / linux-shallow public Read only

0
0
Text · 1.0 KiB · 9b6edaa Raw
46 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * timer test specific header4 *5 * Copyright (C) 2018, Google LLC6 */7 8#ifndef SELFTEST_KVM_TIMER_TEST_H9#define SELFTEST_KVM_TIMER_TEST_H10 11#include "kvm_util.h"12 13#define NR_VCPUS_DEF            414#define NR_TEST_ITERS_DEF       515#define TIMER_TEST_PERIOD_MS_DEF    1016#define TIMER_TEST_ERR_MARGIN_US    10017#define TIMER_TEST_MIGRATION_FREQ_MS    218 19/* Timer test cmdline parameters */20struct test_args {21	uint32_t nr_vcpus;22	uint32_t nr_iter;23	uint32_t timer_period_ms;24	uint32_t migration_freq_ms;25	uint32_t timer_err_margin_us;26	/* Members of struct kvm_arm_counter_offset */27	uint64_t counter_offset;28	uint64_t reserved;29};30 31/* Shared variables between host and guest */32struct test_vcpu_shared_data {33	uint32_t nr_iter;34	int guest_stage;35	uint64_t xcnt;36};37 38extern struct test_args test_args;39extern struct kvm_vcpu *vcpus[];40extern struct test_vcpu_shared_data vcpu_shared_data[];41 42struct kvm_vm *test_vm_create(void);43void test_vm_cleanup(struct kvm_vm *vm);44 45#endif /* SELFTEST_KVM_TIMER_TEST_H */46