dm: add API to set vcpu regs of guest

Add ioctl parameter and API to set vcpu regs. The guest software
loader will call this API to set guest vcpu registers.

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-09-26 11:13:33 +08:00
committed by wenlingz
parent 3cfbc004f5
commit 853b1c74cb
5 changed files with 84 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ struct vmctx {
void *vrtc;
void *vpit;
void *ioc_dev;
/* BSP state. guest loader needs to fill it */
struct acrn_set_vcpu_regs bsp_regs;
};
/*
@@ -148,6 +151,7 @@ int vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
int vm_reset_ptdev_intx_info(struct vmctx *ctx, int virt_pin, bool pic_pin);
int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id);
int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs);
int vm_get_cpu_state(struct vmctx *ctx, void *state_buf);
int vm_intr_monitor(struct vmctx *ctx, void *intr_buf);