hv: riscv: Add ACRN specific SBI extension skeleton

This is used to implement hypercall in the future.

Tracked-On: #8841
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
Yifan Liu
2025-10-21 08:14:08 +00:00
committed by acrnsi-robot
parent 867373716d
commit 7388ad45b3
5 changed files with 52 additions and 0 deletions

View File

@@ -13,6 +13,13 @@
#define MAX_VSBI_EXTENSION_NAME 16
/* TODO: This ID is distributed by SBI.
* For now just hardcode a random value that isn't used.
* Change to official ID when ACRN gets an ID.
*/
#define SBI_ACRN_IMPL_ID 0x900
#define SBI_EID_ACRN (SBI_EID_FIRMWARE_START + SBI_ACRN_IMPL_ID)
struct vsbi_ret {
uint64_t value;
bool vcpu_retain_pc;

View File

@@ -29,6 +29,9 @@ enum sbi_eid {
/* Vendor extensions must lie within this range */
SBI_EID_VENDOR_START = 0x09000000,
SBI_EID_VENDOR_END = 0x09FFFFFF,
SBI_EID_FIRMWARE_START = 0x0A000000,
SBI_EID_FIRMWARE_END = 0x0AFFFFFF,
};
#define SBI_BASE_FID_GET_SPEC_VERSION 0x0