mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
RISC-V: KVM: Add SBI MPXY extension support for Guest
The SBI MPXY extension is a platform-level functionality so KVM only needs to forward SBI MPXY calls to KVM user-space. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20251017155925.361560-4-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
12fd6c62e9
commit
7050f1d79f
4 changed files with 13 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_dbcn;
|
|||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_susp;
|
||||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_sta;
|
||||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_fwft;
|
||||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_mpxy;
|
||||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental;
|
||||
extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor;
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ enum KVM_RISCV_SBI_EXT_ID {
|
|||
KVM_RISCV_SBI_EXT_STA,
|
||||
KVM_RISCV_SBI_EXT_SUSP,
|
||||
KVM_RISCV_SBI_EXT_FWFT,
|
||||
KVM_RISCV_SBI_EXT_MPXY,
|
||||
KVM_RISCV_SBI_EXT_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,10 @@ static const struct kvm_riscv_sbi_extension_entry sbi_ext[] = {
|
|||
.ext_idx = KVM_RISCV_SBI_EXT_FWFT,
|
||||
.ext_ptr = &vcpu_sbi_ext_fwft,
|
||||
},
|
||||
{
|
||||
.ext_idx = KVM_RISCV_SBI_EXT_MPXY,
|
||||
.ext_ptr = &vcpu_sbi_ext_mpxy,
|
||||
},
|
||||
{
|
||||
.ext_idx = KVM_RISCV_SBI_EXT_EXPERIMENTAL,
|
||||
.ext_ptr = &vcpu_sbi_ext_experimental,
|
||||
|
|
|
|||
|
|
@ -25,3 +25,10 @@ const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_dbcn = {
|
|||
.default_disabled = true,
|
||||
.handler = kvm_riscv_vcpu_sbi_forward_handler,
|
||||
};
|
||||
|
||||
const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_mpxy = {
|
||||
.extid_start = SBI_EXT_MPXY,
|
||||
.extid_end = SBI_EXT_MPXY,
|
||||
.default_disabled = true,
|
||||
.handler = kvm_riscv_vcpu_sbi_forward_handler,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue