mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
HV:fixed "Pointer param should be declared pointer to const"
Pointer param should be declared pointer to const if the parameter is keeped read-only. This patch changes pointer param whose name is vm. Tracked-On:#861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Xie, Nanlin
parent
40dbdcde4f
commit
60b216a460
@@ -17,10 +17,10 @@ int ptdev_intx_pin_remap(struct vm *vm, uint8_t virt_pin,
|
||||
enum ptdev_vpin_source vpin_src);
|
||||
int ptdev_add_intx_remapping(struct vm *vm, uint8_t virt_pin, uint8_t phys_pin,
|
||||
bool pic_pin);
|
||||
void ptdev_remove_intx_remapping(struct vm *vm, uint8_t virt_pin, bool pic_pin);
|
||||
void ptdev_remove_intx_remapping(const struct vm *vm, uint8_t virt_pin, bool pic_pin);
|
||||
int ptdev_add_msix_remapping(struct vm *vm, uint16_t virt_bdf,
|
||||
uint16_t phys_bdf, uint32_t vector_count);
|
||||
void ptdev_remove_msix_remapping(struct vm *vm, uint16_t virt_bdf,
|
||||
void ptdev_remove_msix_remapping(const struct vm *vm, uint16_t virt_bdf,
|
||||
uint32_t vector_count);
|
||||
|
||||
#endif /* ASSIGN_H */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
void vm_setup_cpu_state(struct vm *vm);
|
||||
int vm_load_pm_s_state(struct vm *vm);
|
||||
int validate_pstate(struct vm *vm, uint64_t perf_ctl);
|
||||
int validate_pstate(const struct vm *vm, uint64_t perf_ctl);
|
||||
void register_pm1ab_handler(struct vm *vm);
|
||||
|
||||
#endif /* PM_H */
|
||||
|
||||
@@ -57,7 +57,7 @@ void vioapic_set_irq(struct vm *vm, uint32_t irq, uint32_t operation);
|
||||
void vioapic_set_irq_nolock(struct vm *vm, uint32_t irq, uint32_t operation);
|
||||
void vioapic_update_tmr(struct vcpu *vcpu);
|
||||
|
||||
uint32_t vioapic_pincount(struct vm *vm);
|
||||
uint32_t vioapic_pincount(const struct vm *vm);
|
||||
void vioapic_process_eoi(struct vm *vm, uint32_t vector);
|
||||
void vioapic_get_rte(struct vm *vm, uint32_t pin, union ioapic_rte *rte);
|
||||
int vioapic_mmio_access_handler(struct vcpu *vcpu,
|
||||
|
||||
@@ -194,7 +194,7 @@ struct vm_description {
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline bool is_vm0(struct vm *vm)
|
||||
static inline bool is_vm0(const struct vm *vm)
|
||||
{
|
||||
return (vm->vm_id) == 0U;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ int32_t hcall_pulse_irqline(struct vm *vm, uint16_t vmid, uint64_t param);
|
||||
* @pre Pointer vm shall point to VM0
|
||||
* @return 0 on success, non-zero on error.
|
||||
*/
|
||||
int32_t hcall_set_irqline(struct vm *vm, uint16_t vmid,
|
||||
int32_t hcall_set_irqline(const struct vm *vm, uint16_t vmid,
|
||||
struct acrn_irqline_ops *ops);
|
||||
/**
|
||||
* @brief inject MSI interrupt
|
||||
@@ -502,7 +502,7 @@ int64_t hcall_save_restore_sworld_ctx(struct vcpu *vcpu);
|
||||
* @pre Pointer vm shall point to VM0
|
||||
* @return 0 on success, non-zero on error.
|
||||
*/
|
||||
int32_t hcall_set_callback_vector(struct vm *vm, uint64_t param);
|
||||
int32_t hcall_set_callback_vector(const struct vm *vm, uint64_t param);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -72,7 +72,7 @@ extern spinlock_t ptdev_lock;
|
||||
|
||||
void ptdev_softirq(uint16_t pcpu_id);
|
||||
void ptdev_init(void);
|
||||
void ptdev_release_all_entries(struct vm *vm);
|
||||
void ptdev_release_all_entries(const struct vm *vm);
|
||||
|
||||
struct ptdev_remapping_info *ptdev_dequeue_softirq(struct vm *vm);
|
||||
struct ptdev_remapping_info *alloc_entry(struct vm *vm,
|
||||
|
||||
Reference in New Issue
Block a user