virt: acrn: Introduce an ioctl to set vCPU registers state
authorShuo Liu <shuo.a.liu@intel.com>
Sun, 7 Feb 2021 03:10:29 +0000 (11:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Feb 2021 09:58:19 +0000 (10:58 +0100)
commit2ad2aaee1bc9568d0c146463483d2c926ef20055
tree7dd2b2c147724a3dd4237f7d06b2a9f0774115eb
parent9c5137aedd112f78a968bdd2325de2ea06df46c0
virt: acrn: Introduce an ioctl to set vCPU registers state

A virtual CPU of User VM has different context due to the different
registers state. ACRN userspace needs to set the virtual CPU
registers state (e.g. giving a initial registers state to a virtual
BSP of a User VM).

HSM provides an ioctl ACRN_IOCTL_SET_VCPU_REGS to do the virtual CPU
registers state setting. The ioctl passes the registers state from ACRN
userspace to the hypervisor directly.

Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Yu Wang <yu1.wang@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Link: https://lore.kernel.org/r/20210207031040.49576-8-shuo.a.liu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virt/acrn/hsm.c
drivers/virt/acrn/hypercall.h
include/uapi/linux/acrn.h