mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: allocate vpid based on vm_id and vcpu_id mapping
Currently vpid is not released in reset_vcpu() hence the vpid resource could be exhausted easily if guests are re-launched. This patch assigns vpid according to the fixed mapping of runtime vm_id and vcpu_id to guarantee the uniqueness of vpid. Tracked-On: #2700 Signed-off-by: Zide Chen <zide.chen@intel.com> Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -136,13 +136,6 @@ void mmu_modify_or_del(uint64_t *pml4_page, uint64_t vaddr_base, uint64_t size,
|
||||
uint64_t prot_set, uint64_t prot_clr, const struct memory_ops *mem_ops, uint32_t type);
|
||||
void hv_access_memory_region_update(uint64_t base, uint64_t size);
|
||||
|
||||
/**
|
||||
* @brief VPID allocation
|
||||
*
|
||||
* @retval 0 VPID overflow
|
||||
* @retval >0 the valid VPID
|
||||
*/
|
||||
uint16_t allocate_vpid(void);
|
||||
/**
|
||||
* @brief Specified signle VPID flush
|
||||
*
|
||||
|
@@ -325,9 +325,6 @@
|
||||
#define VMX_EPT_INVEPT_SINGLE_CONTEXT (1U << 25U)
|
||||
#define VMX_EPT_INVEPT_GLOBAL_CONTEXT (1U << 26U)
|
||||
|
||||
#define VMX_MIN_NR_VPID 1U
|
||||
#define VMX_MAX_NR_VPID (1U << 5U)
|
||||
|
||||
#define VMX_VPID_TYPE_INDIVIDUAL_ADDR 0UL
|
||||
#define VMX_VPID_TYPE_SINGLE_CONTEXT 1UL
|
||||
#define VMX_VPID_TYPE_ALL_CONTEXT 2UL
|
||||
|
Reference in New Issue
Block a user