[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 09/10] nVMX: virutalize VPID capability to nested VMM.



>>> On 20.12.12 at 16:43, Xiantao Zhang <xiantao.zhang@xxxxxxxxx> wrote:
> +int nvmx_handle_invvpid(struct cpu_user_regs *regs)
> +{
> +    struct vmx_inst_decoded decode;
> +    unsigned long vpid;
> +    u64 inv_type;
> +
> +    if ( !cpu_has_vmx_vpid )
> +        return X86EMUL_EXCEPTION;

Same problem here - you mustn't return X86EMUL_EXCEPTION
without also raising an exception.

Jan

> +
> +    if ( decode_vmx_inst(regs, &decode, &vpid, 0) != X86EMUL_OKAY )
> +        return X86EMUL_EXCEPTION;
> +
> +    inv_type = reg_read(regs, decode.reg2);
> +    gdprintk(XENLOG_DEBUG,"inv_type:%ld, vpid:%lx\n", inv_type, vpid);
> +
> +    switch ( inv_type ) {
> +        /* Just invalidate all tlb entries for all types! */
> +        case INVVPID_INDIVIDUAL_ADDR:
> +        case INVVPID_SINGLE_CONTEXT:
> +        case INVVPID_ALL_CONTEXT:
> +            hvm_asid_flush_vcpu_asid(&vcpu_nestedhvm(current).nv_n2asid);
> +            break;
> +        default:
> +            return X86EMUL_EXCEPTION;
> +    }
> +    vmreturn(regs, VMSUCCEED);
> +
> +    return X86EMUL_OKAY;
> +}
> +
>  /*
>   * Capability reporting
>   */



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.