Skip to content

Commit

Permalink
KVM: selftests: Fix RISC-V compilation
Browse files Browse the repository at this point in the history
Due to commit 2b7deea ("Revert "kvm: selftests: move base
kvm_util.h declarations to kvm_util_base.h"") kvm selftests now
requires explicitly including ucall_common.h when needed. The commit
added the directives everywhere they were needed at the time, but, by
merge time, new places had been merged for RISC-V. Add those now to
fix RISC-V's compilation.

Fixes: dee7ea4 ("Merge tag 'kvm-x86-selftests_utils-6.10' of https://github.com/kvm-x86/linux into HEAD")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20240603122045.323064-2-ajones@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
  • Loading branch information
jones-drew authored and avpatel committed Jun 6, 2024
1 parent c66f3b4 commit 0fc670d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/kvm/lib/riscv/ucall.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "kvm_util.h"
#include "processor.h"
#include "sbi.h"

void *ucall_arch_get_ucall(struct kvm_vcpu *vcpu)
{
Expand Down
1 change: 1 addition & 0 deletions tools/testing/selftests/kvm/riscv/ebreak_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
*/
#include "kvm_util.h"
#include "ucall_common.h"

#define LABEL_ADDRESS(v) ((uint64_t)&(v))

Expand Down
1 change: 1 addition & 0 deletions tools/testing/selftests/kvm/riscv/sbi_pmu_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "processor.h"
#include "sbi.h"
#include "arch_timer.h"
#include "ucall_common.h"

/* Maximum counters(firmware + hardware) */
#define RISCV_MAX_PMU_COUNTERS 64
Expand Down

0 comments on commit 0fc670d

Please sign in to comment.