-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: KVM: Mark the existing SBI implementation as v0.1
The existing SBI specification impelementation follows v0.1 specification. The latest specification allows more scalability and performance improvements. Rename the existing implementation as v0.1 and provide a way to allow future extensions. Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup.patel@wdc.com>
- Loading branch information
Atish Patra
authored and
Anup Patel
committed
Jan 6, 2022
1 parent
cc4f602
commit cf70be9
Showing
2 changed files
with
144 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/** | ||
* Copyright (c) 2021 Western Digital Corporation or its affiliates. | ||
* | ||
* Authors: | ||
* Atish Patra <atish.patra@wdc.com> | ||
*/ | ||
|
||
#ifndef __RISCV_KVM_VCPU_SBI_H__ | ||
#define __RISCV_KVM_VCPU_SBI_H__ | ||
|
||
#define KVM_SBI_VERSION_MAJOR 0 | ||
#define KVM_SBI_VERSION_MINOR 2 | ||
|
||
struct kvm_vcpu_sbi_extension { | ||
unsigned long extid_start; | ||
unsigned long extid_end; | ||
/** | ||
* SBI extension handler. It can be defined for a given extension or group of | ||
* extension. But it should always return linux error codes rather than SBI | ||
* specific error codes. | ||
*/ | ||
int (*handler)(struct kvm_vcpu *vcpu, struct kvm_run *run, | ||
unsigned long *out_val, struct kvm_cpu_trap *utrap, | ||
bool *exit); | ||
}; | ||
|
||
const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext(unsigned long extid); | ||
#endif /* __RISCV_KVM_VCPU_SBI_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters