mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-16 22:39:29 +00:00
hv: fix integer violations
The operands to shift operations (<<, >>) shall be unsigned integers. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -30,12 +30,12 @@ static uint64_t x86_arch_capabilities;
|
||||
|
||||
/* TODO: add more capability per requirement */
|
||||
/* APICv features */
|
||||
#define VAPIC_FEATURE_VIRT_ACCESS (1U << 0)
|
||||
#define VAPIC_FEATURE_VIRT_REG (1U << 1)
|
||||
#define VAPIC_FEATURE_INTR_DELIVERY (1U << 2)
|
||||
#define VAPIC_FEATURE_TPR_SHADOW (1U << 3)
|
||||
#define VAPIC_FEATURE_POST_INTR (1U << 4)
|
||||
#define VAPIC_FEATURE_VX2APIC_MODE (1U << 5)
|
||||
#define VAPIC_FEATURE_VIRT_ACCESS (1U << 0U)
|
||||
#define VAPIC_FEATURE_VIRT_REG (1U << 1U)
|
||||
#define VAPIC_FEATURE_INTR_DELIVERY (1U << 2U)
|
||||
#define VAPIC_FEATURE_TPR_SHADOW (1U << 3U)
|
||||
#define VAPIC_FEATURE_POST_INTR (1U << 4U)
|
||||
#define VAPIC_FEATURE_VX2APIC_MODE (1U << 5U)
|
||||
|
||||
struct cpu_capability {
|
||||
uint8_t apicv_features;
|
||||
|
@@ -1077,7 +1077,7 @@ remove_iommu_device(const struct iommu_domain *domain, uint16_t segment,
|
||||
context_table_addr = dmar_get_bitslice(root_entry->lower,
|
||||
ROOT_ENTRY_LOWER_CTP_MASK,
|
||||
ROOT_ENTRY_LOWER_CTP_POS);
|
||||
context_table_addr = context_table_addr << 12;
|
||||
context_table_addr = context_table_addr << CPU_PAGE_SHIFT;
|
||||
context_table =
|
||||
(struct dmar_context_entry *)hpa2hva(context_table_addr);
|
||||
|
||||
|
Reference in New Issue
Block a user