Exemple #1
0
void
nestedhvm_vcpu_reset(struct vcpu *v)
{
    struct nestedvcpu *nv = &vcpu_nestedhvm(v);

    nv->nv_vmentry_pending = 0;
    nv->nv_vmexit_pending = 0;
    nv->nv_vmswitch_in_progress = 0;
    nv->nv_ioport80 = 0;
    nv->nv_ioportED = 0;

    if (nv->nv_vvmcx)
        hvm_unmap_guest_frame(nv->nv_vvmcx);
    nv->nv_vvmcx = NULL;
    nv->nv_vvmcxaddr = VMCX_EADDR;
    nv->nv_flushp2m = 0;
    nv->nv_p2m = NULL;

    hvm_asid_flush_vcpu_asid(&nv->nv_n2asid);

    if ( hvm_funcs.nhvm_vcpu_reset )
        hvm_funcs.nhvm_vcpu_reset(v);

    /* vcpu is in host mode */
    nestedhvm_vcpu_exit_guestmode(v);
}
Exemple #2
0
void hvm_asid_flush_vcpu(struct vcpu *v)
{
    hvm_asid_flush_vcpu_asid(&v->arch.hvm_vcpu.n1asid);
    hvm_asid_flush_vcpu_asid(&vcpu_nestedhvm(v).nv_n2asid);
}