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:
Yin Fegnwei
2018-06-02 11:14:36 +08:00
committed by lijinxia
parent 2dd4e8f81a
commit fbeafd500a
3 changed files with 9 additions and 0 deletions

View File

@@ -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