• Shuo Liu's avatar
    virt: acrn: Introduce EPT mapping management · 88f537d5
    Shuo Liu authored
    The HSM provides hypervisor services to the ACRN userspace. While
    launching a User VM, ACRN userspace needs to allocate memory and request
    the ACRN Hypervisor to set up the EPT mapping for the VM.
    
    A mapping cache is introduced for accelerating the translation between
    the Service VM kernel virtual address and User VM physical address.
    
    >From the perspective of the hypervisor, the types of GPA of User VM can be
    listed as following:
       1) RAM region, which is used by User VM as system ram.
       2) MMIO region, which is recognized by User VM as MMIO. MMIO region is
          used to be utilized for devices emulation.
    
    Generally, User VM RAM regions mapping is set up before VM started and
    is released in the User VM destruction. MMIO regions mapping may be set
    and unset dynamically during User VM running.
    
    To achieve this, ioctls ACRN_IOCTL_SET_MEMSEG and ACRN_IOCTL_UNSET_MEMSEG
    are introduced in HSM.
    
    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: default avatarZhi Wang <zhi.a.wang@intel.com>
    Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: default avatarShuo Liu <shuo.a.liu@intel.com>
    Link: https://lore.kernel.org/r/20210207031040.49576-9-shuo.a.liu@intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    88f537d5
hypercall.h 2.46 KB