| 1 |
|
| 2 | |
| 3 | * timer test specific header
|
| 4 | *
|
| 5 | * Copyright (C) 2018, Google LLC
|
| 6 |
|
| 7 |
|
| 8 | #ifndef SELFTEST_KVM_TIMER_TEST_H
|
| 9 | #define SELFTEST_KVM_TIMER_TEST_H
|
| 10 |
|
| 11 | #include "kvm_util.h"
|
| 12 |
|
| 13 | #define NR_VCPUS_DEF 4
|
| 14 | #define NR_TEST_ITERS_DEF 5
|
| 15 | #define TIMER_TEST_PERIOD_MS_DEF 10
|
| 16 | #define TIMER_TEST_ERR_MARGIN_US 100
|
| 17 | #define TIMER_TEST_MIGRATION_FREQ_MS 2
|
| 18 |
|
| 19 |
|
| 20 | struct test_args {
|
| 21 | u32 nr_vcpus;
|
| 22 | u32 nr_iter;
|
| 23 | u32 timer_period_ms;
|
| 24 | u32 migration_freq_ms;
|
| 25 | u32 timer_err_margin_us;
|
| 26 |
|
| 27 | u64 counter_offset;
|
| 28 | u64 reserved;
|
| 29 | };
|
| 30 |
|
| 31 |
|
| 32 | struct test_vcpu_shared_data {
|
| 33 | u32 nr_iter;
|
| 34 | int guest_stage;
|
| 35 | u64 xcnt;
|
| 36 | };
|
| 37 |
|
| 38 | extern struct test_args test_args;
|
| 39 | extern struct kvm_vcpu *vcpus[];
|
| 40 | extern struct test_vcpu_shared_data vcpu_shared_data[];
|
| 41 |
|
| 42 | struct kvm_vm *test_vm_create(void);
|
| 43 | void test_vm_cleanup(struct kvm_vm *vm);
|
| 44 |
|
| 45 | #endif
|