|
7 | 7 |
|
8 | 8 | #define _GNU_SOURCE /* for program_invocation_name */
|
9 | 9 |
|
| 10 | +#include <linux/compiler.h> |
| 11 | + |
10 | 12 | #include "kvm_util.h"
|
11 | 13 | #include "../kvm_util_internal.h"
|
12 | 14 | #include "processor.h"
|
@@ -67,15 +69,13 @@ static uint64_t ptrs_per_pgd(struct kvm_vm *vm)
|
67 | 69 | return 1 << (vm->va_bits - shift);
|
68 | 70 | }
|
69 | 71 |
|
70 |
| -static uint64_t ptrs_per_pte(struct kvm_vm *vm) |
| 72 | +static uint64_t __maybe_unused ptrs_per_pte(struct kvm_vm *vm) |
71 | 73 | {
|
72 | 74 | return 1 << (vm->page_shift - 3);
|
73 | 75 | }
|
74 | 76 |
|
75 | 77 | void virt_pgd_alloc(struct kvm_vm *vm, uint32_t pgd_memslot)
|
76 | 78 | {
|
77 |
| - int rc; |
78 |
| - |
79 | 79 | if (!vm->pgd_created) {
|
80 | 80 | vm_paddr_t paddr = vm_phy_pages_alloc(vm,
|
81 | 81 | page_align(vm, ptrs_per_pgd(vm) * 8) / vm->page_size,
|
@@ -181,6 +181,7 @@ vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva)
|
181 | 181 | unmapped_gva:
|
182 | 182 | TEST_ASSERT(false, "No mapping for vm virtual address, "
|
183 | 183 | "gva: 0x%lx", gva);
|
| 184 | + exit(1); |
184 | 185 | }
|
185 | 186 |
|
186 | 187 | static void pte_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent, uint64_t page, int level)
|
@@ -312,6 +313,6 @@ void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent)
|
312 | 313 | get_reg(vm, vcpuid, ARM64_CORE_REG(regs.pstate), &pstate);
|
313 | 314 | get_reg(vm, vcpuid, ARM64_CORE_REG(regs.pc), &pc);
|
314 | 315 |
|
315 |
| - fprintf(stream, "%*spstate: 0x%.16llx pc: 0x%.16llx\n", |
| 316 | + fprintf(stream, "%*spstate: 0x%.16lx pc: 0x%.16lx\n", |
316 | 317 | indent, "", pstate, pc);
|
317 | 318 | }
|
0 commit comments