mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: iommu: remove snoop related code
ACRN disables Snoop Control in VT-d DMAR engines for simplifing the implementation. Also, since the snoop behavior of PCIE transactions can be controlled by guest drivers, some devices may take the advantage of the NO_SNOOP_ATTRIBUTE of PCIE transactions for better performance when snoop is not needed. No matter ACRN enables or disables Snoop Control, the DMA operations of passthrough devices behave correctly from guests' point of view. This patch is used to clean all the snoop related code. Tracked-On: #4509 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com>
This commit is contained in:
@@ -108,8 +108,6 @@
|
||||
/* End of ept_mem_type */
|
||||
|
||||
#define EPT_MT_MASK (7UL << EPT_MT_SHIFT)
|
||||
/* VTD: Second-Level Paging Entries: Snoop Control */
|
||||
#define EPT_SNOOP_CTRL (1UL << 11U)
|
||||
#define EPT_VE (1UL << 63U)
|
||||
/* EPT leaf entry bits (bit 52 - bit 63) should be maksed when calculate PFN */
|
||||
#define EPT_PFN_HIGH_MASK 0xFFF0000000000000UL
|
||||
|
@@ -56,7 +56,6 @@ struct iommu_domain {
|
||||
uint16_t vm_id;
|
||||
uint32_t addr_width; /* address width of the domain */
|
||||
uint64_t trans_table_ptr;
|
||||
bool iommu_snoop;
|
||||
};
|
||||
|
||||
union source {
|
||||
@@ -605,7 +604,7 @@ struct iommu_domain;
|
||||
* @pre domain != NULL
|
||||
*
|
||||
*/
|
||||
int32_t move_pt_device(const struct iommu_domain *from_domain, struct iommu_domain *to_domain, uint8_t bus, uint8_t devfun);
|
||||
int32_t move_pt_device(const struct iommu_domain *from_domain, const struct iommu_domain *to_domain, uint8_t bus, uint8_t devfun);
|
||||
|
||||
/**
|
||||
* @brief Create a iommu domain for a VM specified by vm_id.
|
||||
@@ -676,17 +675,6 @@ void resume_iommu(void);
|
||||
*/
|
||||
int32_t init_iommu(void);
|
||||
|
||||
/**
|
||||
* @brief check the iommu if support cache snoop.
|
||||
*
|
||||
* @param[in] iommu pointer to iommu domain to check
|
||||
*
|
||||
* @retval true support
|
||||
* @retval false not support
|
||||
*
|
||||
*/
|
||||
bool iommu_snoop_supported(const struct iommu_domain *iommu);
|
||||
|
||||
/**
|
||||
* @brief Assign RTE for Interrupt Remapping Table.
|
||||
*
|
||||
|
Reference in New Issue
Block a user