mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-25 11:21:17 +00:00
hv: vcpu: Move vcpu_set_state to common scope
Movement only. Tracked-On: #8830 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -990,19 +990,6 @@ void vcpu_handle_pi_notification(uint32_t vcpu_index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @brief Update the state of vCPU and state of vlapic
|
|
||||||
*
|
|
||||||
* The vlapic state of VM shall be updated for some vCPU
|
|
||||||
* state update cases, such as from VCPU_INIT to VCPU_RUNNING.
|
|
||||||
|
|
||||||
* @pre (vcpu != NULL)
|
|
||||||
*/
|
|
||||||
void vcpu_set_state(struct acrn_vcpu *vcpu, enum vcpu_state new_state)
|
|
||||||
{
|
|
||||||
vcpu->state = new_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: Our goal is to have a vcpu_thread that is common.
|
/* TODO: Our goal is to have a vcpu_thread that is common.
|
||||||
* Leave this to future optimization.
|
* Leave this to future optimization.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,6 +33,19 @@ static void init_vcpu_thread(struct acrn_vcpu *vcpu, uint16_t pcpu_id)
|
|||||||
init_thread_data(&vcpu->thread_obj, &get_vm_config(vm->vm_id)->sched_params);
|
init_thread_data(&vcpu->thread_obj, &get_vm_config(vm->vm_id)->sched_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Update the state of vCPU and state of vlapic
|
||||||
|
*
|
||||||
|
* The vlapic state of VM shall be updated for some vCPU
|
||||||
|
* state update cases, such as from VCPU_INIT to VCPU_RUNNING.
|
||||||
|
|
||||||
|
* @pre (vcpu != NULL)
|
||||||
|
*/
|
||||||
|
void vcpu_set_state(struct acrn_vcpu *vcpu, enum vcpu_state new_state)
|
||||||
|
{
|
||||||
|
vcpu->state = new_state;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief create a vcpu for the target vm
|
* @brief create a vcpu for the target vm
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -649,16 +649,6 @@ bool is_lapic_pt_enabled(struct acrn_vcpu *vcpu);
|
|||||||
*/
|
*/
|
||||||
void vcpu_handle_pi_notification(uint32_t vcpu_index);
|
void vcpu_handle_pi_notification(uint32_t vcpu_index);
|
||||||
|
|
||||||
/*
|
|
||||||
* @brief Update the state of vCPU and state of vlapic
|
|
||||||
*
|
|
||||||
* The vlapic state of VM shall be updated for some vCPU
|
|
||||||
* state update cases, such as from VCPU_INIT to VCPU_RUNNING.
|
|
||||||
|
|
||||||
* @pre (vcpu != NULL)
|
|
||||||
*/
|
|
||||||
void vcpu_set_state(struct acrn_vcpu *vcpu, enum vcpu_state new_state);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -87,6 +87,16 @@ struct guest_mem_dump {
|
|||||||
uint64_t len;
|
uint64_t len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief Update the state of vCPU and state of vlapic
|
||||||
|
*
|
||||||
|
* The vlapic state of VM shall be updated for some vCPU
|
||||||
|
* state update cases, such as from VCPU_INIT to VCPU_RUNNING.
|
||||||
|
|
||||||
|
* @pre (vcpu != NULL)
|
||||||
|
*/
|
||||||
|
void vcpu_set_state(struct acrn_vcpu *vcpu, enum vcpu_state new_state);
|
||||||
|
|
||||||
uint16_t pcpuid_from_vcpu(const struct acrn_vcpu *vcpu);
|
uint16_t pcpuid_from_vcpu(const struct acrn_vcpu *vcpu);
|
||||||
int32_t arch_init_vcpu(struct acrn_vcpu *vcpu);
|
int32_t arch_init_vcpu(struct acrn_vcpu *vcpu);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user