diff options
author | 2018-03-28 09:45:34 +0200 | |
---|---|---|
committer | 2018-04-04 19:11:00 +0200 | |
commit | 6089ae0bd5e15fc150adce5bc694e87e00513825 (patch) | |
tree | 68ef0918d9b8680cd4b9de9109a090eef63a5849 /tools/testing/selftests/kvm/lib/x86.c | |
parent | kvm: selftests: add API testing infrastructure (diff) | |
download | linux-dev-6089ae0bd5e15fc150adce5bc694e87e00513825.tar.xz linux-dev-6089ae0bd5e15fc150adce5bc694e87e00513825.zip |
kvm: selftests: add sync_regs_test
This includes the infrastructure to map the test into the guest and
run code from the test program inside a VM.
Signed-off-by: Ken Hofsass <hofsass@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/x86.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/x86.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86.c b/tools/testing/selftests/kvm/lib/x86.c index 12df46280b23..2f17675f4275 100644 --- a/tools/testing/selftests/kvm/lib/x86.c +++ b/tools/testing/selftests/kvm/lib/x86.c @@ -687,6 +687,9 @@ struct kvm_vm *vm_create_default(uint32_t vcpuid, void *guest_code) /* Create VM */ vm = vm_create(VM_MODE_FLAT48PG, DEFAULT_GUEST_PHY_PAGES, O_RDWR); + /* Setup guest code */ + kvm_vm_elf_load(vm, program_invocation_name, 0, 0); + /* Setup IRQ Chip */ vm_create_irqchip(vm); |