From 80b392a8542d6e1fc5e93eafb90eb4724f394dc4 Mon Sep 17 00:00:00 2001 From: Tw Date: Thu, 20 Dec 2018 09:38:34 +0800 Subject: [PATCH] hv:vtd: fix MISRA-C violations on pointer param should be declared pointer to const This patch fix MISRA-C violations in arch/x86/vtd.c on pointer param should be declared pointer to const. Tracked-On: #861 Signed-off-by: Tw Acked-by: Anthony Xu --- hypervisor/arch/x86/vtd.c | 2 +- hypervisor/include/arch/x86/vtd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c index b4ed13b74..e91af43f0 100644 --- a/hypervisor/arch/x86/vtd.c +++ b/hypervisor/arch/x86/vtd.c @@ -141,7 +141,7 @@ static inline uint8_t* get_ctx_table(uint32_t dmar_index, uint8_t bus_no) return ctx_tables[dmar_index].buses[bus_no].contents; } -bool iommu_snoop_supported(struct acrn_vm *vm) +bool iommu_snoop_supported(const struct acrn_vm *vm) { bool ret; diff --git a/hypervisor/include/arch/x86/vtd.h b/hypervisor/include/arch/x86/vtd.h index 7efe001a8..12787b6c3 100644 --- a/hypervisor/include/arch/x86/vtd.h +++ b/hypervisor/include/arch/x86/vtd.h @@ -622,7 +622,7 @@ void init_iommu_vm0_domain(struct acrn_vm *vm0); * @retval false not support * */ -bool iommu_snoop_supported(struct acrn_vm *vm); +bool iommu_snoop_supported(const struct acrn_vm *vm); /** * @}