hv: Remove redundant get_dmar_info API calls

get_dmar_info API is called from multiple functions in vtd.c. This patch
calls get_dmar_info once during init and uses the cached info during
runtime.

Tracked-On: #2657
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Sainath Grandhi
2019-02-26 17:41:03 -08:00
committed by Xie, Nanlin
parent 308d4e8c4e
commit b49df10a23
3 changed files with 65 additions and 74 deletions

View File

@@ -130,6 +130,10 @@ static struct dmar_info sbl_dmar_info = {
.drhd_units = drhd_info_array,
};
/**
* @post return != NULL
* @post return->drhd_count > 0U
*/
struct dmar_info *get_dmar_info(void)
{
return &sbl_dmar_info;