hv: add hypercall to set vcpu init state

DM will use this hypercall to initialize the UOS BSP state.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-10-03 19:29:01 +08:00
committed by wenlingz
parent 66b53f8248
commit 3cfbc004f5
5 changed files with 72 additions and 0 deletions

View File

@@ -310,6 +310,22 @@ struct acrn_vcpu_regs {
uint16_t reserved_16[4];
};
/**
* @brief Info to set vcpu state
*
* the pamameter for HC_SET_VCPU_STATE
*/
struct acrn_set_vcpu_regs {
/** the virtual CPU ID for the VCPU to set state */
uint16_t vcpu_id;
/** reserved space to make cpu_state aligned to 8 bytes */
uint16_t reserved0[3];
/** the structure to hold vcpu state */
struct acrn_vcpu_regs vcpu_regs;
} __attribute__((aligned(8)));
/**
* @brief Info to set ioreq buffer for a created VM
*

View File

@@ -37,6 +37,7 @@
#define HC_PAUSE_VM BASE_HC_ID(HC_ID, HC_ID_VM_BASE + 0x03UL)
#define HC_CREATE_VCPU BASE_HC_ID(HC_ID, HC_ID_VM_BASE + 0x04UL)
#define HC_RESET_VM BASE_HC_ID(HC_ID, HC_ID_VM_BASE + 0x05UL)
#define HC_SET_VCPU_REGS BASE_HC_ID(HC_ID, HC_ID_VM_BASE + 0x06UL)
/* IRQ and Interrupts */
#define HC_ID_IRQ_BASE 0x20UL