mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-09 12:08:30 +00:00
hv: virq: fix attempt to change parameter passed by value
The MISRA C stardand do not allow change parameter passed by value Tracked-On: #861 Acked-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
parent
dbd5c1415e
commit
270d2d2727
@ -187,9 +187,12 @@ static int32_t get_excep_class(uint32_t vector)
|
||||
}
|
||||
}
|
||||
|
||||
int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector, uint32_t err_code)
|
||||
int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector_arg, uint32_t err_code_arg)
|
||||
{
|
||||
struct acrn_vcpu_arch *arch = &vcpu->arch;
|
||||
uint32_t vector = vector_arg;
|
||||
uint32_t err_code = err_code_arg;
|
||||
|
||||
/* VECTOR_INVALID is also greater than 32 */
|
||||
if (vector >= 32U) {
|
||||
pr_err("invalid exception vector %d", vector);
|
||||
|
@ -134,15 +134,15 @@ uint32_t irq_to_vector(uint32_t irq);
|
||||
* depends on the exeception class.
|
||||
*
|
||||
* @param[in] vcpu Pointer to vCPU.
|
||||
* @param[in] vector Vector of the exeception.
|
||||
* @param[in] err_code Error Code to be injected.
|
||||
* @param[in] vector_arg Vector of the exeception.
|
||||
* @param[in] err_code_arg Error Code to be injected.
|
||||
*
|
||||
* @retval 0 on success
|
||||
* @retval -EINVAL on error that vector is invalid.
|
||||
*
|
||||
* @pre vcpu != NULL
|
||||
*/
|
||||
int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector, uint32_t err_code);
|
||||
int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector_arg, uint32_t err_code_arg);
|
||||
|
||||
/**
|
||||
* @brief Inject external interrupt to guest.
|
||||
|
Loading…
Reference in New Issue
Block a user