mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-01 17:52:26 +00:00
DM: add vm reset API
vm reset API will be used by guest system reset and S3. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
8d12c06270
commit
b33012aee8
@ -405,6 +405,12 @@ vm_pause(struct vmctx *ctx)
|
||||
ioctl(ctx->fd, IC_PAUSE_VM, &ctx->vmid);
|
||||
}
|
||||
|
||||
void
|
||||
vm_reset(struct vmctx *ctx)
|
||||
{
|
||||
ioctl(ctx->fd, IC_RESET_VM, &ctx->vmid);
|
||||
}
|
||||
|
||||
static int suspend_mode = VM_SUSPEND_NONE;
|
||||
|
||||
void
|
||||
|
@ -72,6 +72,7 @@
|
||||
#define IC_START_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x02)
|
||||
#define IC_PAUSE_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x03)
|
||||
#define IC_CREATE_VCPU _IC_ID(IC_ID, IC_ID_VM_BASE + 0x04)
|
||||
#define IC_RESET_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x05)
|
||||
|
||||
/* IRQ and Interrupts */
|
||||
#define IC_ID_IRQ_BASE 0x20UL
|
||||
|
@ -99,6 +99,7 @@ int vm_get_device_fd(struct vmctx *ctx);
|
||||
struct vmctx *vm_open(const char *name);
|
||||
void vm_close(struct vmctx *ctx);
|
||||
void vm_pause(struct vmctx *ctx);
|
||||
void vm_reset(struct vmctx *ctx);
|
||||
int vm_set_shared_io_page(struct vmctx *ctx, uint64_t page_vma);
|
||||
int vm_create_ioreq_client(struct vmctx *ctx);
|
||||
int vm_destroy_ioreq_client(struct vmctx *ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user