mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 09:06:30 +00:00
hv:move down structures run_context and ext_context
Now the structures(run_context & ext_context) are defined in vcpu.h,and they are used in the lower-layer modules(wakeup.S), this patch move down the structures from vcpu.h to cpu.h to avoid reversed dependency. Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
4f98cb03a7
commit
60adef33d3
@@ -24,8 +24,7 @@
|
||||
static void init_guest_vmx(struct acrn_vcpu *vcpu, uint64_t cr0, uint64_t cr3,
|
||||
uint64_t cr4)
|
||||
{
|
||||
struct cpu_context *ctx =
|
||||
&vcpu->arch.contexts[vcpu->arch.cur_context];
|
||||
struct guest_cpu_context *ctx = &vcpu->arch.contexts[vcpu->arch.cur_context];
|
||||
struct ext_context *ectx = &ctx->ext_ctx;
|
||||
|
||||
vcpu_set_cr4(vcpu, cr4);
|
||||
@@ -71,8 +70,7 @@ static void init_guest_vmx(struct acrn_vcpu *vcpu, uint64_t cr0, uint64_t cr3,
|
||||
|
||||
static void init_guest_state(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
struct cpu_context *ctx =
|
||||
&vcpu->arch.contexts[vcpu->arch.cur_context];
|
||||
struct guest_cpu_context *ctx = &vcpu->arch.contexts[vcpu->arch.cur_context];
|
||||
|
||||
init_guest_vmx(vcpu, ctx->run_ctx.cr0, ctx->ext_ctx.cr3,
|
||||
ctx->run_ctx.cr4 & ~(CR4_VMXE | CR4_SMXE | CR4_MCE));
|
||||
|
||||
Reference in New Issue
Block a user