mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +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:
@@ -73,7 +73,7 @@ int32_t hcall_get_api_version(struct vm *vm, uint64_t param)
|
||||
*/
|
||||
static int32_t
|
||||
handle_virt_irqline(const struct vm *vm, uint16_t target_vmid,
|
||||
struct acrn_irqline *param, uint32_t operation)
|
||||
const struct acrn_irqline *param, uint32_t operation)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
uint32_t intr_type;
|
||||
@@ -334,7 +334,7 @@ int32_t hcall_set_vcpu_regs(struct vm *vm, uint16_t vmid, uint64_t param)
|
||||
*@pre Pointer vm shall point to VM0
|
||||
*/
|
||||
int32_t hcall_set_irqline(const struct vm *vm, uint16_t vmid,
|
||||
struct acrn_irqline_ops *ops)
|
||||
const struct acrn_irqline_ops *ops)
|
||||
{
|
||||
uint32_t irq_pic;
|
||||
struct vm *target_vm = get_vm_from_vmid(vmid);
|
||||
@@ -459,7 +459,7 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid, uint16_t vcpu_id)
|
||||
*@pre Pointer vm shall point to VM0
|
||||
*/
|
||||
static int32_t local_set_vm_memory_region(struct vm *vm,
|
||||
struct vm *target_vm, struct vm_memory_region *region)
|
||||
struct vm *target_vm, const struct vm_memory_region *region)
|
||||
{
|
||||
uint64_t hpa, base_paddr;
|
||||
uint64_t prot;
|
||||
@@ -602,7 +602,7 @@ int32_t hcall_set_vm_memory_regions(struct vm *vm, uint64_t param)
|
||||
/**
|
||||
*@pre Pointer vm shall point to VM0
|
||||
*/
|
||||
static int32_t write_protect_page(struct vm *vm, struct wp_data *wp)
|
||||
static int32_t write_protect_page(struct vm *vm,const struct wp_data *wp)
|
||||
{
|
||||
uint64_t hpa, base_paddr;
|
||||
uint64_t prot_set;
|
||||
|
@@ -25,7 +25,7 @@ static void fire_vhm_interrupt(void)
|
||||
vlapic_intr_edge(vcpu, acrn_vhm_vector);
|
||||
}
|
||||
|
||||
static void acrn_print_request(uint16_t vcpu_id, struct vhm_request *req)
|
||||
static void acrn_print_request(uint16_t vcpu_id, const struct vhm_request *req)
|
||||
{
|
||||
switch (req->type) {
|
||||
case REQ_MMIO:
|
||||
@@ -59,7 +59,7 @@ static void acrn_print_request(uint16_t vcpu_id, struct vhm_request *req)
|
||||
* @pre vcpu != NULL && io_req != NULL
|
||||
*/
|
||||
int32_t
|
||||
acrn_insert_request_wait(struct vcpu *vcpu, struct io_request *io_req)
|
||||
acrn_insert_request_wait(struct vcpu *vcpu, const struct io_request *io_req)
|
||||
{
|
||||
union vhm_request_buffer *req_buf = NULL;
|
||||
struct vhm_request *vhm_req;
|
||||
|
Reference in New Issue
Block a user