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

Re: [Xen-devel] [PATCH 05/10] nested vmx: fix DR access VM exit


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>
  • Date: Wed, 5 Dec 2012 01:27:19 +0000
  • Accept-language: en-US
  • Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 05 Dec 2012 01:27:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHN0gaCbm8V1zNvbEy6Yby5h4nAEZgJay+w
  • Thread-topic: [Xen-devel] [PATCH 05/10] nested vmx: fix DR access VM exit

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Tuesday, December 04, 2012 6:02 PM
> To: Xu, Dongxiao
> Cc: xen-devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH 05/10] nested vmx: fix DR access VM exit
> 
> >>> On 04.12.12 at 06:53, Dongxiao Xu <dongxiao.xu@xxxxxxxxx> wrote:
> > For DR register, we use lazy restore mechanism when access it.
> > Therefore when receiving such VM exit, L0 should be responsible to
> > switch to the right DR values, then inject to L1 hypervisor.
> >
> > Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
> > ---
> >  xen/arch/x86/hvm/vmx/vvmx.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
> > index cf3797c..0ac78af 100644
> > --- a/xen/arch/x86/hvm/vmx/vvmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> > @@ -1654,7 +1654,8 @@ int nvmx_n2_vmexit_handler(struct
> cpu_user_regs *regs,
> >      case EXIT_REASON_DR_ACCESS:
> >          ctrl = __n2_exec_control(v);
> >          if ( ctrl & CPU_BASED_MOV_DR_EXITING )
> > -            nvcpu->nv_vmexit_pending = 1;
> > +            if ( v->arch.hvm_vcpu.flag_dr_dirty )
> > +                nvcpu->nv_vmexit_pending = 1;
> 
> Personally I'd prefer if you combined the two if-s.

Will merge it in updated pull request.

Thanks,
Dongxiao

> 
> Jan
> 
> >          break;
> >      case EXIT_REASON_INVLPG:
> >          ctrl = __n2_exec_control(v);
> > --
> > 1.7.1
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-devel
> 
> 


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