mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
HV:fix "Pointer param should be declared pointer to const"
Fix violations for function whose parameter can be read-only. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -50,7 +50,7 @@ struct acrn_vioapic {
|
||||
};
|
||||
|
||||
void vioapic_init(struct vm *vm);
|
||||
void vioapic_cleanup(struct acrn_vioapic *vioapic);
|
||||
void vioapic_cleanup(const struct acrn_vioapic *vioapic);
|
||||
void vioapic_reset(struct acrn_vioapic *vioapic);
|
||||
|
||||
void vioapic_set_irq(struct vm *vm, uint32_t irq, uint32_t operation);
|
||||
|
||||
@@ -101,7 +101,7 @@ struct acrn_vlapic {
|
||||
|
||||
/* APIC write handlers */
|
||||
void vlapic_set_cr8(struct acrn_vlapic *vlapic, uint64_t val);
|
||||
uint64_t vlapic_get_cr8(struct acrn_vlapic *vlapic);
|
||||
uint64_t vlapic_get_cr8(const struct acrn_vlapic *vlapic);
|
||||
|
||||
/*
|
||||
* Returns 0 if there is no eligible vector that can be delivered to the
|
||||
@@ -113,7 +113,7 @@ uint64_t vlapic_get_cr8(struct acrn_vlapic *vlapic);
|
||||
* Note that the vector does not automatically transition to the ISR as a
|
||||
* result of calling this function.
|
||||
*/
|
||||
int vlapic_pending_intr(struct acrn_vlapic *vlapic, uint32_t *vecptr);
|
||||
int vlapic_pending_intr(const struct acrn_vlapic *vlapic, uint32_t *vecptr);
|
||||
|
||||
/*
|
||||
* Transition 'vector' from IRR to ISR. This function is called with the
|
||||
@@ -172,8 +172,8 @@ void vlapic_set_tmr_one_vec(struct acrn_vlapic *vlapic, uint32_t delmode,
|
||||
uint32_t vector, bool level);
|
||||
|
||||
void vlapic_apicv_batch_set_tmr(struct acrn_vlapic *vlapic);
|
||||
uint32_t vlapic_get_id(struct acrn_vlapic *vlapic);
|
||||
uint8_t vlapic_get_apicid(struct acrn_vlapic *vlapic);
|
||||
uint32_t vlapic_get_id(const struct acrn_vlapic *vlapic);
|
||||
uint8_t vlapic_get_apicid(const struct acrn_vlapic *vlapic);
|
||||
int vlapic_create(struct vcpu *vcpu);
|
||||
/*
|
||||
* @pre vcpu != NULL
|
||||
@@ -181,8 +181,8 @@ int vlapic_create(struct vcpu *vcpu);
|
||||
void vlapic_free(struct vcpu *vcpu);
|
||||
void vlapic_init(struct acrn_vlapic *vlapic);
|
||||
void vlapic_reset(struct acrn_vlapic *vlapic);
|
||||
void vlapic_restore(struct acrn_vlapic *vlapic, struct lapic_regs *regs);
|
||||
bool vlapic_enabled(struct acrn_vlapic *vlapic);
|
||||
void vlapic_restore(struct acrn_vlapic *vlapic, const struct lapic_regs *regs);
|
||||
bool vlapic_enabled(const struct acrn_vlapic *vlapic);
|
||||
uint64_t vlapic_apicv_get_apic_access_addr(void);
|
||||
uint64_t vlapic_apicv_get_apic_page_addr(struct acrn_vlapic *vlapic);
|
||||
void vlapic_apicv_inject_pir(struct acrn_vlapic *vlapic);
|
||||
|
||||
@@ -112,7 +112,7 @@ void setup_io_bitmap(struct vm *vm);
|
||||
void free_io_emulation_resource(struct vm *vm);
|
||||
void allow_guest_pio_access(struct vm *vm, uint16_t port_address,
|
||||
uint32_t nbytes);
|
||||
void register_io_emulation_handler(struct vm *vm, struct vm_io_range *range,
|
||||
void register_io_emulation_handler(struct vm *vm, const struct vm_io_range *range,
|
||||
io_read_fn_t io_read_fn_ptr,
|
||||
io_write_fn_t io_write_fn_ptr);
|
||||
|
||||
@@ -121,7 +121,7 @@ int register_mmio_emulation_handler(struct vm *vm,
|
||||
uint64_t end, void *handler_private_data);
|
||||
void unregister_mmio_emulation_handler(struct vm *vm, uint64_t start,
|
||||
uint64_t end);
|
||||
void emulate_mmio_post(struct vcpu *vcpu, struct io_request *io_req);
|
||||
void emulate_mmio_post(struct vcpu *vcpu, const struct io_request *io_req);
|
||||
void dm_emulate_mmio_post(struct vcpu *vcpu);
|
||||
|
||||
int32_t emulate_io(struct vcpu *vcpu, struct io_request *io_req);
|
||||
@@ -129,6 +129,6 @@ void emulate_io_post(struct vcpu *vcpu);
|
||||
/*
|
||||
* @pre vcpu != NULL && io_req != NULL
|
||||
*/
|
||||
int32_t acrn_insert_request_wait(struct vcpu *vcpu, struct io_request *io_req);
|
||||
int32_t acrn_insert_request_wait(struct vcpu *vcpu, const struct io_request *io_req);
|
||||
|
||||
#endif /* IOREQ_H */
|
||||
|
||||
@@ -73,7 +73,7 @@ int quick_handler_nolock(struct irq_desc *desc, __unused void *handler_data);
|
||||
void init_default_irqs(uint16_t cpu_id);
|
||||
|
||||
void dispatch_exception(struct intr_excp_ctx *ctx);
|
||||
void dispatch_interrupt(struct intr_excp_ctx *ctx);
|
||||
void dispatch_interrupt(const struct intr_excp_ctx *ctx);
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
void partition_mode_dispatch_interrupt(struct intr_excp_ctx *ctx);
|
||||
#endif
|
||||
|
||||
@@ -131,6 +131,6 @@ bool initialize_trusty(struct vcpu *vcpu, uint64_t param);
|
||||
void destroy_secure_world(struct vm *vm, bool need_clr_mem);
|
||||
void save_sworld_context(struct vcpu *vcpu);
|
||||
void restore_sworld_context(struct vcpu *vcpu);
|
||||
void trusty_set_dseed(void *dseed, uint8_t dseed_num);
|
||||
void trusty_set_dseed(const void *dseed, uint8_t dseed_num);
|
||||
|
||||
#endif /* TRUSTY_H_ */
|
||||
|
||||
@@ -468,11 +468,11 @@ extern struct dmar_info *get_dmar_info(void);
|
||||
struct iommu_domain;
|
||||
|
||||
/* Assign a device specified by bus & devfun to a iommu domain */
|
||||
int assign_iommu_device(struct iommu_domain *domain,
|
||||
int assign_iommu_device(const struct iommu_domain *domain,
|
||||
uint8_t bus, uint8_t devfun);
|
||||
|
||||
/* Unassign a device specified by bus & devfun to a iommu domain */
|
||||
int unassign_iommu_device(struct iommu_domain *domain,
|
||||
int unassign_iommu_device(const struct iommu_domain *domain,
|
||||
uint8_t bus, uint8_t devfun);
|
||||
|
||||
/* Create a iommu domain for a VM specified by vm_id */
|
||||
@@ -480,7 +480,7 @@ struct iommu_domain *create_iommu_domain(uint16_t vm_id,
|
||||
uint64_t translation_table, uint32_t addr_width);
|
||||
|
||||
/* Destroy the iommu domain */
|
||||
void destroy_iommu_domain(struct iommu_domain *domain);
|
||||
void destroy_iommu_domain(const struct iommu_domain *domain);
|
||||
|
||||
/* Enable translation of iommu*/
|
||||
void enable_iommu(void);
|
||||
|
||||
Reference in New Issue
Block a user