mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: add API to get the vcpu mapped to specific pcpu.
Per performance consideration, we don't flush vcpu context when doing vcpu swithing (because it's only swithing between vcpu and idle). But when enter S3, we need to call vmclear against all vcpus attached to APs. We need to know which vcpu is attached with which pcpu. This patch introduced API to get vcpu mapped to specific pcpu. Signed-off-by: Yin Fegnwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
@@ -253,6 +253,7 @@ struct vcpu {
|
||||
#define VCPU_RETAIN_RIP(vcpu) ((vcpu)->arch_vcpu.inst_len = 0)
|
||||
|
||||
/* External Interfaces */
|
||||
struct vcpu* get_ever_run_vcpu(int pcpu_id);
|
||||
int create_vcpu(int cpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
|
||||
int start_vcpu(struct vcpu *vcpu);
|
||||
int shutdown_vcpu(struct vcpu *vcpu);
|
||||
|
@@ -21,6 +21,7 @@ struct per_cpu_region {
|
||||
struct dev_handler_node *timer_node;
|
||||
struct shared_buf *earlylog_sbuf;
|
||||
void *vcpu;
|
||||
void *ever_run_vcpu;
|
||||
#ifdef STACK_PROTECTOR
|
||||
struct stack_canary stack_canary;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user