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

Re: [Xen-devel] [PATCH v2 3/3] nested vmx: fix CR0/CR4 emulation



> -----Original Message-----
> From: Nakajima, Jun [mailto:jun.nakajima@xxxxxxxxx]
> Sent: Saturday, January 12, 2013 12:46 AM
> To: Xu, Dongxiao
> Cc: Jan Beulich; Dong, Eddie; xen-devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH v2 3/3] nested vmx: fix CR0/CR4 emulation
> 
> 
> One comment:
> 
> > +            case VMX_CONTROL_REG_ACCESS_TYPE_MOV_TO_CR:
> > +            {
> > +                unsigned long gp =
> VMX_CONTROL_REG_ACCESS_GPR(exit_qualification);
> > +                unsigned long *reg;
> > +                if ( (reg = decode_register(gp, guest_cpu_user_regs(), 0))
> == NULL )
> > +                {
> > +                    gdprintk(XENLOG_ERR, "invalid gpr: %lx\n", gp);
> > +                    break;
> > +                }
> > >
> 
> What happens after the "break" (if it really happens), or how the
> error is handled?

Hi Jun,

Thanks for the comment.

In current nvmx_n2_vmexit_handler() function, there is no error code in return 
value. Therefore if an exception happens, the current solution just ignored the 
error and step forward...
There are two places that may trigger error, one is my above code, another is 
the "default" item in switch/case selection logic.

I will write a patch to address this issue, adding a fault indicator in the 
return value.

Thanks,
Dongxiao

> 
> 
> --
> Jun
> Intel Open Source Technology Center

_______________________________________________
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®.